mirror of
https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9.git
synced 2026-09-09 00:08:12 +08:00
md/md-linear: convert to use bio_submit_split_bioset()
JIRA: https://issues.redhat.com/browse/RHEL-154215 commit 6529d41d87827f9a27f6c0c6d34c2b77b250b6c6 Author: Yu Kuai <yukuai3@huawei.com> Date: Wed Sep 10 14:30:52 2025 +0800 md/md-linear: convert to use bio_submit_split_bioset() Unify bio split code, prepare to fix reordered split IO. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Ming Lei <ming.lei@redhat.com>
This commit is contained in:
+3
-12
@@ -256,19 +256,10 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio)
|
||||
|
||||
if (unlikely(bio_end_sector(bio) > end_sector)) {
|
||||
/* This bio crosses a device boundary, so we have to split it */
|
||||
struct bio *split = bio_split(bio, end_sector - bio_sector,
|
||||
GFP_NOIO, &mddev->bio_set);
|
||||
|
||||
if (IS_ERR(split)) {
|
||||
bio->bi_status = errno_to_blk_status(PTR_ERR(split));
|
||||
bio_endio(bio);
|
||||
bio = bio_submit_split_bioset(bio, end_sector - bio_sector,
|
||||
&mddev->bio_set);
|
||||
if (!bio)
|
||||
return true;
|
||||
}
|
||||
|
||||
bio_chain(split, bio);
|
||||
trace_block_split(split, bio->bi_iter.bi_sector);
|
||||
submit_bio_noacct(bio);
|
||||
bio = split;
|
||||
}
|
||||
|
||||
md_account_bio(mddev, &bio);
|
||||
|
||||
Reference in New Issue
Block a user