]> www.infradead.org Git - users/hch/block.git/commit
block: remove the blk_integrity_profile structure
authorChristoph Hellwig <hch@lst.de>
Mon, 3 Jun 2024 08:55:40 +0000 (10:55 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 6 Jun 2024 09:39:50 +0000 (11:39 +0200)
commit89c50cab1fd7f9af386b7704f3632e4884332174
tree0738196d23edd6497a64726622e6c19e23e0265a
parentde5b92322ce357ef17ca1a7e623ca2575ff4042c
block: remove the blk_integrity_profile structure

Block layer integrity configuration is a bit complex right now, as it
indirects through operation vectors for a simple two-dimensional
configuration:

 a) the checksum type of none, ip checksum, crc, crc64
 b) the presence or absence of a reference tag

Remove the integrity profile, and instead add a separate csum_type flag
which replaces the existing ip-checksum field and a new flag that
indicates the presence of the reference tag.

This removes up to two layers of indirect calls, remove the need to
offload the no-op verification of non-PI metadata to a workqueue and
generally simplifies the code. The downside is that block/t10-pi.c now
has to be built into the kernel when CONFIG_BLK_DEV_INTEGRITY is
supported.  Given that both nvme and SCSI require t10-pi.ko, it is loaded
for all usual configurations that enabled CONFIG_BLK_DEV_INTEGRITY
already, though.

Signed-off-by: Christoph Hellwig <hch@lst.de>
19 files changed:
block/Kconfig
block/Makefile
block/bio-integrity.c
block/blk-integrity.c
block/blk-mq.c
block/blk.h
block/t10-pi.c
drivers/md/dm-crypt.c
drivers/nvme/host/Kconfig
drivers/nvme/host/core.c
drivers/nvme/target/Kconfig
drivers/nvme/target/io-cmd-bdev.c
drivers/scsi/Kconfig
drivers/scsi/sd.c
drivers/scsi/sd_dif.c
drivers/target/target_core_iblock.c
include/linux/blk-integrity.h
include/linux/blkdev.h
include/linux/t10-pi.h