]> www.infradead.org Git - users/hch/block.git/commit
block: move integrity information into queue_limits block-integrity-limits
authorChristoph Hellwig <hch@lst.de>
Thu, 6 Jun 2024 09:36:15 +0000 (11:36 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 6 Jun 2024 09:42:19 +0000 (11:42 +0200)
commita0cba7ed6dc65c5bb36d3f96fddd8844cab5de01
tree9d17ac7452b9ce666a476a37bc57aaf636f742ff
parent401e4989315e2a763ab262f7a3aa75cfc119cb1c
block: move integrity information into queue_limits

Move the integrity information into the queue limits so that it can be
set atomically with other queue limits, and that the sysfs changes to
the read_verify and write_generate flags are properly synchronized.
This also allows to provide a more useful helper to stack the integrity
fields, although it still is separate from the main stacking function
as not all stackable devices want to inherit the integrity settings.
Even with that it greatly simplifies the code in md and dm.

Note that the integrity field is moved as-is into the queue limits.
While there are good arguments for removing the separate blk_integrity
structure, this would cause a lot of churn and might better be done at a
later time if desired.  However the integrity field in the queue_limits
structure is now unconditional so that various ifdefs can be avoided or
replaced with IS_ENABLED().  Given that tiny size of it that seems like
a worthwhile trade off.

Signed-off-by: Christoph Hellwig <hch@lst.de>
21 files changed:
Documentation/block/data-integrity.rst
block/blk-integrity.c
block/blk-settings.c
block/t10-pi.c
drivers/md/dm-core.h
drivers/md/dm-integrity.c
drivers/md/dm-table.c
drivers/md/md.c
drivers/md/md.h
drivers/md/raid0.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
drivers/nvdimm/btt.c
drivers/nvme/host/core.c
drivers/scsi/sd.c
drivers/scsi/sd.h
drivers/scsi/sd_dif.c
include/linux/blk-integrity.h
include/linux/blkdev.h
include/linux/t10-pi.h