[PATCHv3 09/10] blk-integrity: consider entire bio list for merging

Keith Busch kbusch at meta.com
Wed Sep 4 08:26:04 PDT 2024


From: Keith Busch <kbusch at kernel.org>

If a bio is merged to a req, the entire bio list is merged, so don't
temporarily unchain it when counting segments for consideration.

Signed-off-by: Keith Busch <kbusch at kernel.org>
---
 block/blk-integrity.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/block/blk-integrity.c b/block/blk-integrity.c
index f9367f3a04208..985de64409cf5 100644
--- a/block/blk-integrity.c
+++ b/block/blk-integrity.c
@@ -92,7 +92,6 @@ bool blk_integrity_merge_bio(struct request_queue *q, struct request *req,
 			     struct bio *bio)
 {
 	int nr_integrity_segs;
-	struct bio *next = bio->bi_next;
 
 	if (blk_integrity_rq(req) == 0 && bio_integrity(bio) == NULL)
 		return true;
@@ -103,10 +102,7 @@ bool blk_integrity_merge_bio(struct request_queue *q, struct request *req,
 	if (bio_integrity(req->bio)->bip_flags != bio_integrity(bio)->bip_flags)
 		return false;
 
-	bio->bi_next = NULL;
 	nr_integrity_segs = blk_rq_count_integrity_segs(bio);
-	bio->bi_next = next;
-
 	if (req->nr_integrity_segments + nr_integrity_segs >
 	    q->limits.max_integrity_segments)
 		return false;
-- 
2.43.5




More information about the Linux-nvme mailing list