Lines Matching refs:raid_bio
5500 static int raid5_read_one_chunk(struct mddev *mddev, struct bio *raid_bio) in raid5_read_one_chunk() argument
5509 if (!in_chunk_boundary(mddev, raid_bio)) { in raid5_read_one_chunk()
5514 sector = raid5_compute_sector(conf, raid_bio->bi_iter.bi_sector, 0, in raid5_read_one_chunk()
5516 end_sector = sector + bio_sectors(raid_bio); in raid5_read_one_chunk()
5537 if (is_badblock(rdev, sector, bio_sectors(raid_bio), &first_bad, in raid5_read_one_chunk()
5543 md_account_bio(mddev, &raid_bio); in raid5_read_one_chunk()
5544 raid_bio->bi_next = (void *)rdev; in raid5_read_one_chunk()
5546 align_bio = bio_alloc_clone(rdev->bdev, raid_bio, GFP_NOIO, in raid5_read_one_chunk()
5549 align_bio->bi_private = raid_bio; in raid5_read_one_chunk()
5576 raid_bio->bi_iter.bi_sector); in raid5_read_one_chunk()
5585 static struct bio *chunk_aligned_read(struct mddev *mddev, struct bio *raid_bio) in chunk_aligned_read() argument
5588 sector_t sector = raid_bio->bi_iter.bi_sector; in chunk_aligned_read()
5592 if (sectors < bio_sectors(raid_bio)) { in chunk_aligned_read()
5594 split = bio_split(raid_bio, sectors, GFP_NOIO, &conf->bio_split); in chunk_aligned_read()
5595 bio_chain(split, raid_bio); in chunk_aligned_read()
5596 submit_bio_noacct(raid_bio); in chunk_aligned_read()
5597 raid_bio = split; in chunk_aligned_read()
5600 if (!raid5_read_one_chunk(mddev, raid_bio)) in chunk_aligned_read()
5601 return raid_bio; in chunk_aligned_read()
6627 static int retry_aligned_read(struct r5conf *conf, struct bio *raid_bio, in retry_aligned_read() argument
6646 logical_sector = raid_bio->bi_iter.bi_sector & in retry_aligned_read()
6650 last_sector = bio_end_sector(raid_bio); in retry_aligned_read()
6665 conf->retry_read_aligned = raid_bio; in retry_aligned_read()
6670 if (!add_stripe_bio(sh, raid_bio, dd_idx, 0, 0)) { in retry_aligned_read()
6672 conf->retry_read_aligned = raid_bio; in retry_aligned_read()
6683 bio_endio(raid_bio); in retry_aligned_read()