Lines Matching refs:r10bio
73 static void reshape_request_write(struct mddev *mddev, struct r10bio *r10_bio);
98 * for resync bio, r10bio pointer can be retrieved from the per-bio
101 static inline struct r10bio *get_resync_r10bio(struct bio *bio)
109 int size = offsetof(struct r10bio, devs[conf->geo.raid_disks]);
111 /* allocate a r10bio with room for raid_disks entries in the
134 struct r10bio *r10_bio;
232 struct r10bio *r10bio = __r10_bio;
237 struct bio *bio = r10bio->devs[j].bio;
246 bio = r10bio->devs[j].repl_bio;
256 rbio_pool_free(r10bio, conf);
259 static void put_all_bios(struct r10conf *conf, struct r10bio *r10_bio)
275 static void free_r10bio(struct r10bio *r10_bio)
283 static void put_buf(struct r10bio *r10_bio)
298 static void reschedule_retry(struct r10bio *r10_bio)
320 static void raid_end_bio_io(struct r10bio *r10_bio)
341 static inline void update_head_pos(int slot, struct r10bio *r10_bio)
352 static int find_bio_disk(struct r10conf *conf, struct r10bio *r10_bio,
379 struct r10bio *r10_bio = bio->bi_private;
428 static void close_write(struct r10bio *r10_bio)
438 static void one_write_done(struct r10bio *r10_bio)
455 struct r10bio *r10_bio = bio->bi_private;
587 static void __raid10_find_phys(struct geom *geo, struct r10bio *r10bio)
604 chunk = r10bio->sector >> geo->chunk_shift;
605 sector = r10bio->sector & geo->chunk_mask;
620 r10bio->devs[slot].devnum = d;
621 r10bio->devs[slot].addr = s;
638 r10bio->devs[slot].devnum = d;
639 r10bio->devs[slot].addr = s;
650 static void raid10_find_phys(struct r10conf *conf, struct r10bio *r10bio)
655 ((r10bio->sector >= conf->reshape_progress) !=
657 set_bit(R10BIO_Previous, &r10bio->state);
660 clear_bit(R10BIO_Previous, &r10bio->state);
662 __raid10_find_phys(geo, r10bio);
730 struct r10bio *r10_bio,
1098 static sector_t choose_data_offset(struct r10bio *r10_bio,
1173 struct r10bio *r10_bio, bool io_accounting)
1269 static void raid10_write_one_disk(struct mddev *mddev, struct r10bio *r10_bio,
1343 static void wait_blocked_dev(struct mddev *mddev, struct r10bio *r10_bio)
1408 struct r10bio *r10_bio)
1571 struct r10bio *r10_bio;
1591 static void raid_end_discard_bio(struct r10bio *r10bio)
1593 struct r10conf *conf = r10bio->mddev->private;
1594 struct r10bio *first_r10bio;
1596 while (atomic_dec_and_test(&r10bio->remaining)) {
1600 if (!test_bit(R10BIO_Discard, &r10bio->state)) {
1601 first_r10bio = (struct r10bio *)r10bio->master_bio;
1602 free_r10bio(r10bio);
1603 r10bio = first_r10bio;
1605 md_write_end(r10bio->mddev);
1606 bio_endio(r10bio->master_bio);
1607 free_r10bio(r10bio);
1615 struct r10bio *r10_bio = bio->bi_private;
1656 struct r10bio *r10_bio, *first_r10bio;
1769 * For far layout it needs more than one r10bio to cover all regions.
1770 * Inspired by raid10_sync_request, we can use the first r10bio->master_bio
1771 * to record the discard bio. Other r10bio->master_bio record the first
1772 * r10bio. The first r10bio only release after all other r10bios finish.
1773 * The discard bio returns only first r10bio finishes
2278 static void __end_sync_read(struct r10bio *r10_bio, struct bio *bio, int d)
2306 struct r10bio *r10_bio = get_resync_r10bio(bio);
2316 struct r10bio *r10_bio = bio->bi_private;
2321 static void end_sync_request(struct r10bio *r10_bio)
2337 struct r10bio *r10_bio2 = (struct r10bio *)r10_bio->master_bio;
2350 struct r10bio *r10_bio = get_resync_r10bio(bio);
2403 static void sync_request_write(struct mddev *mddev, struct r10bio *r10_bio)
2534 static void fix_recovery_read_error(struct r10bio *r10_bio)
2617 static void recovery_request_write(struct mddev *mddev, struct r10bio *r10_bio)
2726 static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10bio *r10_bio)
2903 static int narrow_write_error(struct r10bio *r10_bio, int i)
2964 static void handle_read_error(struct mddev *mddev, struct r10bio *r10_bio)
3002 static void handle_write_completed(struct r10conf *conf, struct r10bio *r10_bio)
3106 struct r10bio *r10_bio;
3126 r10_bio = list_first_entry(&tmp, struct r10bio,
3149 r10_bio = list_entry(head->prev, struct r10bio, retry_list);
3195 static struct r10bio *raid10_alloc_init_r10buf(struct r10conf *conf)
3197 struct r10bio *r10bio = mempool_alloc(&conf->r10buf_pool, GFP_NOIO);
3210 bio = r10bio->devs[i].bio;
3214 bio = r10bio->devs[i].repl_bio;
3221 return r10bio;
3297 struct r10bio *r10_bio;
3429 * Both must result in an r10bio with a list of bios that
3431 * and bi_private set to the r10bio.
3451 struct r10bio *rb2;
3693 struct r10bio *rb2 = r10_bio;
3694 r10_bio = (struct r10bio*) rb2->master_bio;
4813 struct r10bio *r10_bio;
5048 static void end_reshape_request(struct r10bio *r10_bio);
5050 struct r10bio *r10_bio);
5051 static void reshape_request_write(struct mddev *mddev, struct r10bio *r10_bio)
5130 struct r10bio *r10_bio)
5135 struct r10bio *r10b;
5206 struct r10bio *r10_bio = get_resync_r10bio(bio);
5231 static void end_reshape_request(struct r10bio *r10_bio)