]> www.infradead.org Git - users/hch/block.git/commit
block: bypass the STABLE_WRITES flag for protection information
authorChristoph Hellwig <hch@lst.de>
Mon, 3 Jun 2024 08:58:54 +0000 (10:58 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 6 Jun 2024 09:41:38 +0000 (11:41 +0200)
commit1ada72311b186c09486ca039d47f71e8877bf0ca
treecd32dbc02d50a361e9bdffc591b2c6b84a8dfa6c
parent23854ce86d6c48d3ab36f660b56cf69f03d3df9b
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>
block/blk-integrity.c
drivers/nvme/host/multipath.c
include/linux/blkdev.h