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/raid0: convert raid0_make_request() to use bio_submit_split_bioset()

Currently, raid0_make_request() will remap the original bio to underlying
disks to prevent reordered IO. Now that bio_submit_split_bioset() will put
original bio to the head of current->bio_list, it's safe converting to use
this helper and bio will still be ordered.

CC: Jan Kara <jack@suse.cz>
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
e0ed2bca b2f59740

+2 -11
+2 -11
drivers/md/raid0.c
··· 607 607 : sector_div(sector, chunk_sects)); 608 608 609 609 if (sectors < bio_sectors(bio)) { 610 - struct bio *split = bio_split(bio, sectors, GFP_NOIO, 610 + bio = bio_submit_split_bioset(bio, sectors, 611 611 &mddev->bio_set); 612 - 613 - if (IS_ERR(split)) { 614 - bio->bi_status = errno_to_blk_status(PTR_ERR(split)); 615 - bio_endio(bio); 612 + if (!bio) 616 613 return true; 617 - } 618 - 619 - bio_chain(split, bio); 620 - trace_block_split(split, bio->bi_iter.bi_sector); 621 - raid0_map_submit_bio(mddev, bio); 622 - bio = split; 623 614 } 624 615 625 616 raid0_map_submit_bio(mddev, bio);