Lines Matching refs:mirrors
270 rdev_dec_pending(conf->mirrors[i].rdev, r1_bio->mddev); in put_buf()
341 conf->mirrors[disk].head_position = in update_head_pos()
369 struct md_rdev *rdev = conf->mirrors[r1_bio->read_disk].rdev; in raid1_end_read_request()
453 struct md_rdev *rdev = conf->mirrors[mirror].rdev; in raid1_end_write_request()
645 rdev = rcu_dereference(conf->mirrors[disk].rdev); in read_balance()
712 dist = abs(this_sector - conf->mirrors[disk].head_position); in read_balance()
718 if (conf->mirrors[disk].next_seq_sect == this_sector in read_balance()
721 struct raid1_info *mirror = &conf->mirrors[disk]; in read_balance()
776 rdev = rcu_dereference(conf->mirrors[best_disk].rdev); in read_balance()
782 if (conf->mirrors[best_disk].next_seq_sect != this_sector) in read_balance()
783 conf->mirrors[best_disk].seq_start = this_sector; in read_balance()
785 conf->mirrors[best_disk].next_seq_sect = this_sector + sectors; in read_balance()
1240 rdev = rcu_dereference(conf->mirrors[r1_bio->read_disk].rdev); in raid1_read_request()
1281 mirror = conf->mirrors + rdisk; in raid1_read_request()
1401 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); in raid1_write_request()
1475 rdev_dec_pending(conf->mirrors[j].rdev, mddev); in raid1_write_request()
1517 struct md_rdev *rdev = conf->mirrors[i].rdev; in raid1_write_request()
1623 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); in raid1_status()
1695 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev); in print_conf()
1733 struct md_rdev *rdev = conf->mirrors[i].rdev; in raid1_spare_active()
1734 struct md_rdev *repl = conf->mirrors[conf->raid_disks + i].rdev; in raid1_spare_active()
1794 conf->mirrors[rdev->saved_raid_disk].rdev == NULL) in raid1_add_disk()
1798 p = conf->mirrors + mirror; in raid1_add_disk()
1822 p = conf->mirrors + repl_slot; in raid1_add_disk()
1840 struct raid1_info *p = conf->mirrors + number; in raid1_remove_disk()
1846 p = conf->mirrors + conf->raid_disks + number; in raid1_remove_disk()
1874 if (conf->mirrors[conf->raid_disks + number].rdev) { in raid1_remove_disk()
1880 conf->mirrors[conf->raid_disks + number].rdev; in raid1_remove_disk()
1895 conf->mirrors[conf->raid_disks + number].rdev = NULL; in raid1_remove_disk()
1964 struct md_rdev *rdev = conf->mirrors[find_bio_disk(r1_bio, bio)].rdev; in end_sync_write()
1975 !is_badblock(conf->mirrors[r1_bio->read_disk].rdev, in end_sync_write()
2026 rdev = conf->mirrors[r1_bio->read_disk].rdev; in fix_sync_read_error()
2052 rdev = conf->mirrors[d].rdev; in fix_sync_read_error()
2076 rdev = conf->mirrors[d].rdev; in fix_sync_read_error()
2105 rdev = conf->mirrors[d].rdev; in fix_sync_read_error()
2120 rdev = conf->mirrors[d].rdev; in fix_sync_read_error()
2160 bio_reset(b, conf->mirrors[i].rdev->bdev, REQ_OP_READ); in process_checks()
2163 conf->mirrors[i].rdev->data_offset; in process_checks()
2175 rdev_dec_pending(conf->mirrors[primary].rdev, mddev); in process_checks()
2213 rdev_dec_pending(conf->mirrors[i].rdev, mddev); in process_checks()
2247 if (test_bit(Faulty, &conf->mirrors[i].rdev->flags)) { in sync_request_write()
2253 if (test_bit(FailFast, &conf->mirrors[i].rdev->flags)) in sync_request_write()
2258 md_sync_acct(conf->mirrors[i].rdev->bdev, bio_sectors(wbio)); in sync_request_write()
2293 rdev = rcu_dereference(conf->mirrors[d].rdev); in fix_read_error()
2317 struct md_rdev *rdev = conf->mirrors[read_disk].rdev; in fix_read_error()
2329 rdev = rcu_dereference(conf->mirrors[d].rdev); in fix_read_error()
2346 rdev = rcu_dereference(conf->mirrors[d].rdev); in fix_read_error()
2373 struct md_rdev *rdev = conf->mirrors[i].rdev; in narrow_write_error()
2443 struct md_rdev *rdev = conf->mirrors[m].rdev; in handle_sync_write_finished()
2468 struct md_rdev *rdev = conf->mirrors[m].rdev; in handle_write_finished()
2481 conf->mirrors[m].rdev); in handle_write_finished()
2485 rdev_dec_pending(conf->mirrors[m].rdev, in handle_write_finished()
2528 rdev = conf->mirrors[r1_bio->read_disk].rdev; in handle_read_error()
2764 rdev = rcu_dereference(conf->mirrors[i].rdev); in raid1_sync_request()
2834 struct md_rdev *rdev = conf->mirrors[i].rdev; in raid1_sync_request()
3000 conf->mirrors = kzalloc(array3_size(sizeof(struct raid1_info), in setup_conf()
3003 if (!conf->mirrors) in setup_conf()
3033 disk = conf->mirrors + mddev->raid_disks + disk_idx; in setup_conf()
3035 disk = conf->mirrors + disk_idx; in setup_conf()
3057 disk = conf->mirrors + i; in setup_conf()
3094 kfree(conf->mirrors); in setup_conf()
3152 if (conf->mirrors[i].rdev == NULL || in raid1_run()
3153 !test_bit(In_sync, &conf->mirrors[i].rdev->flags) || in raid1_run()
3154 test_bit(Faulty, &conf->mirrors[i].rdev->flags)) in raid1_run()
3202 kfree(conf->mirrors); in raid1_free()
3285 if (conf->mirrors[d].rdev) in raid1_reshape()
3319 struct md_rdev *rdev = conf->mirrors[d].rdev; in raid1_reshape()
3331 kfree(conf->mirrors); in raid1_reshape()
3332 conf->mirrors = newmirrors; in raid1_reshape()