]> www.infradead.org Git - users/hch/misc.git/commit
block: split struct bio_integrity_data
authorChristoph Hellwig <hch@lst.de>
Mon, 20 Jan 2025 06:04:02 +0000 (07:04 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 3 Feb 2025 09:18:37 +0000 (10:18 +0100)
commitf08e9d973ef71daf81ae6cd7eb64acf21a5a036e
treec16db8b24e9145a001425fed1fa3979befcd12e1
parentb0ea9ae0012fce04619e4dc49d99a54447d558f7
block: split struct bio_integrity_data

Many of the fields in struct bio_integrity_data are only needed for
the default integrity buffer in the block layer, and the variable
sized array at the end of the structure makes it very hard to embed
into caller allocated structures.

Reduce struct bio_integrity_data to the minimal structure needed in
common code, and create containing structures for the payload + bvec
allocation for submitter provided buffers, and the default integrity
code.  Stop using mempools for the submitter buffers as they don't sit
below the I/O stack, and instead always use the mempool for automatic
integrity metadata instead of depending on bio_set that is submitter
controlled and thus often doesn't have the mempool initialized.

Signed-off-by: Christoph Hellwig <hch@lst.de>
block/bio-integrity.c
block/bio.c
block/blk.h
block/integrity-default.c
block/t10-pi.c
drivers/md/dm-integrity.c
drivers/md/dm-table.c
drivers/md/md.c
drivers/target/target_core_iblock.c
include/linux/bio-integrity.h
include/linux/bio.h