]> www.infradead.org Git - users/hch/block.git/commit
block: bypass the STABLE_WRITES flag for protection information
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Jun 2024 08:48:20 +0000 (10:48 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 14 Jun 2024 16:20:06 +0000 (10:20 -0600)
commit3c3e85ddffae93eba1a257eb6939bf5dc1e93b9e
treeb69e5827ba95b9079e2d89e05b30ddb0fcf6a193
parent43c5dbe98a3953e07f4fbf89aa137b9207d52378
block: bypass the STABLE_WRITES flag for protection information

Currently registering a checksum-enabled (aka PI) integrity profile sets
the QUEUE_FLAG_STABLE_WRITE flag, and unregistering it clears the flag.
This can incorrectly clear the flag when the driver requires stable
writes even without PI, e.g. in case of iSCSI or NVMe/TCP with data
digest enabled.

Fix this by looking at the csum_type directly in bdev_stable_writes and
not setting the queue flag.  Also remove the blk_queue_stable_writes
helper as the only user in nvme wants to only look at the actual
QUEUE_FLAG_STABLE_WRITE flag as it inherits the integrity configuration
by other means.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20240613084839.1044015-11-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-integrity.c
drivers/nvme/host/multipath.c
include/linux/blkdev.h