Lines Matching refs:mirrors

270 			rdev_dec_pending(conf->mirrors[i].rdev, r1_bio->mddev);  in put_buf()
342 conf->mirrors[disk].head_position = in update_head_pos()
370 struct md_rdev *rdev = conf->mirrors[r1_bio->read_disk].rdev; in raid1_end_read_request()
454 struct md_rdev *rdev = conf->mirrors[mirror].rdev; in raid1_end_write_request()
646 rdev = rcu_dereference(conf->mirrors[disk].rdev); in read_balance()
713 dist = abs(this_sector - conf->mirrors[disk].head_position); in read_balance()
719 if (conf->mirrors[disk].next_seq_sect == this_sector in read_balance()
722 struct raid1_info *mirror = &conf->mirrors[disk]; in read_balance()
777 rdev = rcu_dereference(conf->mirrors[best_disk].rdev); in read_balance()
783 if (conf->mirrors[best_disk].next_seq_sect != this_sector) in read_balance()
784 conf->mirrors[best_disk].seq_start = this_sector; in read_balance()
786 conf->mirrors[best_disk].next_seq_sect = this_sector + sectors; in read_balance()
1241 rdev = rcu_dereference(conf->mirrors[r1_bio->read_disk].rdev); in raid1_read_request()
1282 mirror = conf->mirrors + rdisk; in raid1_read_request()
1404 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); in raid1_write_request()
1478 rdev_dec_pending(conf->mirrors[j].rdev, mddev); in raid1_write_request()
1520 struct md_rdev *rdev = conf->mirrors[i].rdev; in raid1_write_request()
1635 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); in raid1_status()
1707 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); in print_conf()
1745 struct md_rdev *rdev = conf->mirrors[i].rdev; in raid1_spare_active()
1746 struct md_rdev *repl = conf->mirrors[conf->raid_disks + i].rdev; in raid1_spare_active()
1806 conf->mirrors[rdev->saved_raid_disk].rdev == NULL) in raid1_add_disk()
1810 p = conf->mirrors + mirror; in raid1_add_disk()
1848 struct raid1_info *p = conf->mirrors + number; in raid1_remove_disk()
1851 p = conf->mirrors + conf->raid_disks + number; in raid1_remove_disk()
1879 if (conf->mirrors[conf->raid_disks + number].rdev) { in raid1_remove_disk()
1885 conf->mirrors[conf->raid_disks + number].rdev; in raid1_remove_disk()
1900 conf->mirrors[conf->raid_disks + number].rdev = NULL; in raid1_remove_disk()
1969 struct md_rdev *rdev = conf->mirrors[find_bio_disk(r1_bio, bio)].rdev; in end_sync_write()
1980 !is_badblock(conf->mirrors[r1_bio->read_disk].rdev, in end_sync_write()
2031 rdev = conf->mirrors[r1_bio->read_disk].rdev; in fix_sync_read_error()
2057 rdev = conf->mirrors[d].rdev; in fix_sync_read_error()
2081 rdev = conf->mirrors[d].rdev; in fix_sync_read_error()
2110 rdev = conf->mirrors[d].rdev; in fix_sync_read_error()
2125 rdev = conf->mirrors[d].rdev; in fix_sync_read_error()
2165 bio_reset(b, conf->mirrors[i].rdev->bdev, REQ_OP_READ); in process_checks()
2168 conf->mirrors[i].rdev->data_offset; in process_checks()
2180 rdev_dec_pending(conf->mirrors[primary].rdev, mddev); in process_checks()
2218 rdev_dec_pending(conf->mirrors[i].rdev, mddev); in process_checks()
2252 if (test_bit(Faulty, &conf->mirrors[i].rdev->flags)) { in sync_request_write()
2258 if (test_bit(FailFast, &conf->mirrors[i].rdev->flags)) in sync_request_write()
2263 md_sync_acct(conf->mirrors[i].rdev->bdev, bio_sectors(wbio)); in sync_request_write()
2298 rdev = rcu_dereference(conf->mirrors[d].rdev); in fix_read_error()
2322 struct md_rdev *rdev = conf->mirrors[read_disk].rdev; in fix_read_error()
2334 rdev = rcu_dereference(conf->mirrors[d].rdev); in fix_read_error()
2351 rdev = rcu_dereference(conf->mirrors[d].rdev); in fix_read_error()
2378 struct md_rdev *rdev = conf->mirrors[i].rdev; in narrow_write_error()
2448 struct md_rdev *rdev = conf->mirrors[m].rdev; in handle_sync_write_finished()
2473 struct md_rdev *rdev = conf->mirrors[m].rdev; in handle_write_finished()
2486 conf->mirrors[m].rdev); in handle_write_finished()
2490 rdev_dec_pending(conf->mirrors[m].rdev, in handle_write_finished()
2532 rdev = conf->mirrors[r1_bio->read_disk].rdev; in handle_read_error()
2767 rdev = rcu_dereference(conf->mirrors[i].rdev); in raid1_sync_request()
2837 struct md_rdev *rdev = conf->mirrors[i].rdev; in raid1_sync_request()
3003 conf->mirrors = kzalloc(array3_size(sizeof(struct raid1_info), in setup_conf()
3006 if (!conf->mirrors) in setup_conf()
3036 disk = conf->mirrors + mddev->raid_disks + disk_idx; in setup_conf()
3038 disk = conf->mirrors + disk_idx; in setup_conf()
3060 disk = conf->mirrors + i; in setup_conf()
3096 kfree(conf->mirrors); in setup_conf()
3154 if (conf->mirrors[i].rdev == NULL || in raid1_run()
3155 !test_bit(In_sync, &conf->mirrors[i].rdev->flags) || in raid1_run()
3156 test_bit(Faulty, &conf->mirrors[i].rdev->flags)) in raid1_run()
3204 kfree(conf->mirrors); in raid1_free()
3287 if (conf->mirrors[d].rdev) in raid1_reshape()
3321 struct md_rdev *rdev = conf->mirrors[d].rdev; in raid1_reshape()
3333 kfree(conf->mirrors); in raid1_reshape()
3334 conf->mirrors = newmirrors; in raid1_reshape()