Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

md: fix mssing blktrace bio split events

If bio is split by internal handling like chunksize or badblocks, the
corresponding trace_block_split() is missing, resulting in blktrace
inability to catch BIO split events and making it harder to analyze the
BIO sequence.

Cc: stable@vger.kernel.org
Fixes: 4b1faf931650 ("block: Kill bio_pair_split()")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Yu Kuai and committed by
Jens Axboe
22f16621 ea3d1f10

+19
+1
drivers/md/md-linear.c
··· 266 266 } 267 267 268 268 bio_chain(split, bio); 269 + trace_block_split(split, bio->bi_iter.bi_sector); 269 270 submit_bio_noacct(bio); 270 271 bio = split; 271 272 }
+4
drivers/md/raid0.c
··· 472 472 bio_endio(bio); 473 473 return; 474 474 } 475 + 475 476 bio_chain(split, bio); 477 + trace_block_split(split, bio->bi_iter.bi_sector); 476 478 submit_bio_noacct(bio); 477 479 bio = split; 478 480 end = zone->zone_end; ··· 622 620 bio_endio(bio); 623 621 return true; 624 622 } 623 + 625 624 bio_chain(split, bio); 625 + trace_block_split(split, bio->bi_iter.bi_sector); 626 626 raid0_map_submit_bio(mddev, bio); 627 627 bio = split; 628 628 }
+4
drivers/md/raid1.c
··· 1384 1384 error = PTR_ERR(split); 1385 1385 goto err_handle; 1386 1386 } 1387 + 1387 1388 bio_chain(split, bio); 1389 + trace_block_split(split, bio->bi_iter.bi_sector); 1388 1390 submit_bio_noacct(bio); 1389 1391 bio = split; 1390 1392 r1_bio->master_bio = bio; ··· 1618 1616 error = PTR_ERR(split); 1619 1617 goto err_handle; 1620 1618 } 1619 + 1621 1620 bio_chain(split, bio); 1621 + trace_block_split(split, bio->bi_iter.bi_sector); 1622 1622 submit_bio_noacct(bio); 1623 1623 bio = split; 1624 1624 r1_bio->master_bio = bio;
+8
drivers/md/raid10.c
··· 1209 1209 error = PTR_ERR(split); 1210 1210 goto err_handle; 1211 1211 } 1212 + 1212 1213 bio_chain(split, bio); 1214 + trace_block_split(split, bio->bi_iter.bi_sector); 1213 1215 allow_barrier(conf); 1214 1216 submit_bio_noacct(bio); 1215 1217 wait_barrier(conf, false); ··· 1497 1495 error = PTR_ERR(split); 1498 1496 goto err_handle; 1499 1497 } 1498 + 1500 1499 bio_chain(split, bio); 1500 + trace_block_split(split, bio->bi_iter.bi_sector); 1501 1501 allow_barrier(conf); 1502 1502 submit_bio_noacct(bio); 1503 1503 wait_barrier(conf, false); ··· 1683 1679 bio_endio(bio); 1684 1680 return 0; 1685 1681 } 1682 + 1686 1683 bio_chain(split, bio); 1684 + trace_block_split(split, bio->bi_iter.bi_sector); 1687 1685 allow_barrier(conf); 1688 1686 /* Resend the fist split part */ 1689 1687 submit_bio_noacct(split); ··· 1700 1694 bio_endio(bio); 1701 1695 return 0; 1702 1696 } 1697 + 1703 1698 bio_chain(split, bio); 1699 + trace_block_split(split, bio->bi_iter.bi_sector); 1704 1700 allow_barrier(conf); 1705 1701 /* Resend the second split part */ 1706 1702 submit_bio_noacct(bio);
+2
drivers/md/raid5.c
··· 5493 5493 5494 5494 if (sectors < bio_sectors(raid_bio)) { 5495 5495 struct r5conf *conf = mddev->private; 5496 + 5496 5497 split = bio_split(raid_bio, sectors, GFP_NOIO, &conf->bio_split); 5497 5498 bio_chain(split, raid_bio); 5499 + trace_block_split(split, raid_bio->bi_iter.bi_sector); 5498 5500 submit_bio_noacct(raid_bio); 5499 5501 raid_bio = split; 5500 5502 }