]> www.infradead.org Git - users/hch/misc.git/commit
block: ensure correct integrity capability propagation in stacked devices
authorAnuj Gupta <anuj20.g@samsung.com>
Wed, 5 Mar 2025 06:30:32 +0000 (12:00 +0530)
committerJens Axboe <axboe@kernel.dk>
Thu, 6 Mar 2025 15:01:37 +0000 (08:01 -0700)
commit677e332e4885a17def5efa4788b6e725a737b63c
tree550bb37c2f4ca37aa894f84f09f7f3465364c7c0
parent6cc477c36875ea5329b8bfbdf4d91f83dc653c91
block: ensure correct integrity capability propagation in stacked devices

queue_limits_stack_integrity() incorrectly sets
BLK_INTEGRITY_DEVICE_CAPABLE for a DM device even when none of its
underlying devices support integrity. This happens because the flag is
inherited unconditionally. Ensure that integrity capabilities are
correctly propagated only when the underlying devices actually support
integrity.

Reported-by: M Nikhil <nikh1092@linux.ibm.com>
Link: https://lore.kernel.org/linux-block/f6130475-3ccd-45d2-abde-3ccceada0f0a@linux.ibm.com/
Fixes: c6e56cf6b2e7 ("block: move integrity information into queue_limits")
Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250305063033.1813-2-anuj20.g@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-settings.c