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

Unify bio split code, prepare to fix ordering of 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
9e8a5b37 6fc07785

+4 -6
+4 -6
drivers/md/raid5.c
··· 5486 5486 5487 5487 static struct bio *chunk_aligned_read(struct mddev *mddev, struct bio *raid_bio) 5488 5488 { 5489 - struct bio *split; 5490 5489 sector_t sector = raid_bio->bi_iter.bi_sector; 5491 5490 unsigned chunk_sects = mddev->chunk_sectors; 5492 5491 unsigned sectors = chunk_sects - (sector & (chunk_sects-1)); ··· 5493 5494 if (sectors < bio_sectors(raid_bio)) { 5494 5495 struct r5conf *conf = mddev->private; 5495 5496 5496 - split = bio_split(raid_bio, sectors, GFP_NOIO, &conf->bio_split); 5497 - bio_chain(split, raid_bio); 5498 - trace_block_split(split, raid_bio->bi_iter.bi_sector); 5499 - submit_bio_noacct(raid_bio); 5500 - raid_bio = split; 5497 + raid_bio = bio_submit_split_bioset(raid_bio, sectors, 5498 + &conf->bio_split); 5499 + if (!raid_bio) 5500 + return NULL; 5501 5501 } 5502 5502 5503 5503 if (!raid5_read_one_chunk(mddev, raid_bio))