|
| 1 | +block: make sure ->nr_integrity_segments is cloned in blk_rq_prep_clone |
| 2 | + |
| 3 | +jira LE-3460 |
| 4 | +Rebuild_History Non-Buildable kernel-6.12.0-55.18.1.el10_0 |
| 5 | +commit-author Ming Lei < [email protected]> |
| 6 | +commit fc0e982b8a3a169b1c654d9a1aa45bf292943ef2 |
| 7 | +Empty-Commit: Cherry-Pick Conflicts during history rebuild. |
| 8 | +Will be included in final tarball splat. Ref for failed cherry-pick at: |
| 9 | +ciq/ciq_backports/kernel-6.12.0-55.18.1.el10_0/fc0e982b.failed |
| 10 | + |
| 11 | +Make sure ->nr_integrity_segments is cloned in blk_rq_prep_clone(), |
| 12 | +otherwise requests cloned by device-mapper multipath will not have the |
| 13 | +proper nr_integrity_segments values set, then BUG() is hit from |
| 14 | +sg_alloc_table_chained(). |
| 15 | + |
| 16 | +Fixes: b0fd271d5fba ("block: add request clone interface (v2)") |
| 17 | + |
| 18 | + Cc: Christoph Hellwig < [email protected]> |
| 19 | + Signed-off-by: Ming Lei < [email protected]> |
| 20 | + Reviewed-by: Christoph Hellwig < [email protected]> |
| 21 | +Link: https://lore.kernel.org/r/ [email protected] |
| 22 | + Signed-off-by: Jens Axboe < [email protected]> |
| 23 | +(cherry picked from commit fc0e982b8a3a169b1c654d9a1aa45bf292943ef2) |
| 24 | + Signed-off-by: Jonathan Maple < [email protected]> |
| 25 | + |
| 26 | +# Conflicts: |
| 27 | +# block/blk-mq.c |
| 28 | +diff --cc block/blk-mq.c |
| 29 | +index cf626e061dd7,f1030d589a1b..000000000000 |
| 30 | +--- a/block/blk-mq.c |
| 31 | ++++ b/block/blk-mq.c |
| 32 | +@@@ -3187,8 -3314,7 +3187,12 @@@ int blk_rq_prep_clone(struct request *r |
| 33 | + rq->special_vec = rq_src->special_vec; |
| 34 | + } |
| 35 | + rq->nr_phys_segments = rq_src->nr_phys_segments; |
| 36 | +++<<<<<<< HEAD |
| 37 | + + rq->ioprio = rq_src->ioprio; |
| 38 | + + rq->write_hint = rq_src->write_hint; |
| 39 | +++======= |
| 40 | ++ rq->nr_integrity_segments = rq_src->nr_integrity_segments; |
| 41 | +++>>>>>>> fc0e982b8a3a (block: make sure ->nr_integrity_segments is cloned in blk_rq_prep_clone) |
| 42 | + |
| 43 | + if (rq->bio && blk_crypto_rq_bio_prep(rq, rq->bio, gfp_mask) < 0) |
| 44 | + goto free_and_out; |
| 45 | +* Unmerged path block/blk-mq.c |
0 commit comments