public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHv8 0/2] block for-7.1/integrity rebase for mem alignment
@ 2026-03-13 14:46 Keith Busch
  2026-03-13 14:47 ` [PATCHv8 1/2] blk-integrity: support arbitrary buffer alignment Keith Busch
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Keith Busch @ 2026-03-13 14:46 UTC (permalink / raw)
  To: linux-nvme, linux-block, axboe; +Cc: hch, martin.petersen, csander, Keith Busch

From: Keith Busch <kbusch@kernel.org>

This is the rebased version of the flexible t10 alignment feature on top
of block's for-7.1/block-integrity branch to apply atop Christoph's
fs-integrity:

  https://lore.kernel.org/linux-block/20260223132021.292832-1-hch@lst.de/

The only change from the previous version is to incorporate the function
name changes and verify's status code return type that were introduced
in the file system integrity support patch set.

I've also included the ublk support for this feature since it was
previously accepted and has a dependency on patch 1.

For reference, here is the resulting diff from the previous version's
implementation before fs-integrity to this new one after fs support:

---
--- block/t10-pi.c.orig	2026-03-12 16:04:57.191719482 -0700
+++ block/t10-pi.c	2026-03-12 16:09:04.304084389 -0700
@@ -304,7 +304,8 @@
 	return ret;
 }
 
-static void blk_integrity_iterate(struct bio *bio, struct bvec_iter *data_iter,
+static blk_status_t blk_integrity_iterate(struct bio *bio,
+					  struct bvec_iter *data_iter,
 				  bool verify)
 {
 	struct blk_integrity *bi = blk_get_integrity(bio->bi_bdev->bd_disk);
@@ -342,11 +343,10 @@
 		kunmap_local(kaddr);
 	}
 
-	if (ret)
-		bio->bi_status = ret;
+	return ret;
 }
 
-void blk_integrity_generate(struct bio *bio)
+void bio_integrity_generate(struct bio *bio)
 {
 	struct blk_integrity *bi = blk_get_integrity(bio->bi_bdev->bd_disk);
 
@@ -361,7 +361,7 @@
 	}
 }
 
-void blk_integrity_verify_iter(struct bio *bio, struct bvec_iter *saved_iter)
+blk_status_t bio_integrity_verify(struct bio *bio, struct bvec_iter *saved_iter)
 {
 	struct blk_integrity *bi = blk_get_integrity(bio->bi_bdev->bd_disk);
 
@@ -369,11 +369,12 @@
 	case BLK_INTEGRITY_CSUM_CRC64:
 	case BLK_INTEGRITY_CSUM_CRC:
 	case BLK_INTEGRITY_CSUM_IP:
-		blk_integrity_iterate(bio, saved_iter, true);
-		break;
+		return blk_integrity_iterate(bio, saved_iter, true);
 	default:
 		break;
 	}
+
+	return BLK_STS_OK;
 }
 
 /*
--

Caleb Sander Mateos (1):
  ublk: report BLK_SPLIT_INTERVAL_CAPABLE

Keith Busch (1):
  blk-integrity: support arbitrary buffer alignment

 block/blk-settings.c          |  12 +-
 block/t10-pi.c                | 816 +++++++++++++++++++---------------
 drivers/block/ublk_drv.c      |   2 +-
 drivers/nvme/host/core.c      |   1 +
 include/linux/blk-integrity.h |   1 +
 5 files changed, 466 insertions(+), 366 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-03-23 17:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13 14:46 [PATCHv8 0/2] block for-7.1/integrity rebase for mem alignment Keith Busch
2026-03-13 14:47 ` [PATCHv8 1/2] blk-integrity: support arbitrary buffer alignment Keith Busch
2026-03-13 14:47 ` [PATCHv8 2/2] ublk: report BLK_SPLIT_INTERVAL_CAPABLE Keith Busch
2026-03-14 14:14 ` [PATCHv8 0/2] block for-7.1/integrity rebase for mem alignment Jens Axboe
2026-03-23 17:12   ` Keith Busch
2026-03-23 17:14     ` Jens Axboe
2026-03-23 17:21       ` Keith Busch
2026-03-23 17:23         ` Jens Axboe
2026-03-23 17:26           ` Keith Busch
2026-03-23 17:27             ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox