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/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>

authored by

Yu Kuai and committed by
Jens Axboe
6529d41d 9e8a5b37

+3 -12
+3 -12
drivers/md/md-linear.c
··· 256 256 257 257 if (unlikely(bio_end_sector(bio) > end_sector)) { 258 258 /* This bio crosses a device boundary, so we have to split it */ 259 - struct bio *split = bio_split(bio, end_sector - bio_sector, 260 - GFP_NOIO, &mddev->bio_set); 261 - 262 - if (IS_ERR(split)) { 263 - bio->bi_status = errno_to_blk_status(PTR_ERR(split)); 264 - bio_endio(bio); 259 + bio = bio_submit_split_bioset(bio, end_sector - bio_sector, 260 + &mddev->bio_set); 261 + if (!bio) 265 262 return true; 266 - } 267 - 268 - bio_chain(split, bio); 269 - trace_block_split(split, bio->bi_iter.bi_sector); 270 - submit_bio_noacct(bio); 271 - bio = split; 272 263 } 273 264 274 265 md_account_bio(mddev, &bio);