Lines Matching refs:rdev2

1405 	struct md_rdev *rdev2;  in super_90_sync()  local
1475 rdev_for_each(rdev2, mddev) { in super_90_sync()
1478 int is_active = test_bit(In_sync, &rdev2->flags); in super_90_sync()
1480 if (rdev2->raid_disk >= 0 && in super_90_sync()
1487 if (rdev2->raid_disk < 0 || in super_90_sync()
1488 test_bit(Faulty, &rdev2->flags)) in super_90_sync()
1491 desc_nr = rdev2->raid_disk; in super_90_sync()
1494 rdev2->desc_nr = desc_nr; in super_90_sync()
1495 d = &sb->disks[rdev2->desc_nr]; in super_90_sync()
1497 d->number = rdev2->desc_nr; in super_90_sync()
1498 d->major = MAJOR(rdev2->bdev->bd_dev); in super_90_sync()
1499 d->minor = MINOR(rdev2->bdev->bd_dev); in super_90_sync()
1501 d->raid_disk = rdev2->raid_disk; in super_90_sync()
1503 d->raid_disk = rdev2->desc_nr; /* compatibility */ in super_90_sync()
1504 if (test_bit(Faulty, &rdev2->flags)) in super_90_sync()
1508 if (test_bit(In_sync, &rdev2->flags)) in super_90_sync()
1517 if (test_bit(WriteMostly, &rdev2->flags)) in super_90_sync()
1519 if (test_bit(FailFast, &rdev2->flags)) in super_90_sync()
1993 struct md_rdev *rdev2; in super_1_sync() local
2111 rdev_for_each(rdev2, mddev) in super_1_sync()
2112 if (rdev2->desc_nr+1 > max_dev) in super_1_sync()
2113 max_dev = rdev2->desc_nr+1; in super_1_sync()
2141 rdev_for_each(rdev2, mddev) { in super_1_sync()
2142 i = rdev2->desc_nr; in super_1_sync()
2143 if (test_bit(Faulty, &rdev2->flags)) in super_1_sync()
2145 else if (test_bit(In_sync, &rdev2->flags)) in super_1_sync()
2146 sb->dev_roles[i] = cpu_to_le16(rdev2->raid_disk); in super_1_sync()
2147 else if (test_bit(Journal, &rdev2->flags)) in super_1_sync()
2149 else if (rdev2->raid_disk >= 0) in super_1_sync()
2150 sb->dev_roles[i] = cpu_to_le16(rdev2->raid_disk); in super_1_sync()
2293 struct md_rdev *rdev, *rdev2; in match_mddev_units() local
2301 rdev_for_each_rcu(rdev2, mddev2) { in match_mddev_units()
2302 if (test_bit(Faulty, &rdev2->flags) || in match_mddev_units()
2303 test_bit(Journal, &rdev2->flags) || in match_mddev_units()
2304 rdev2->raid_disk == -1) in match_mddev_units()
2306 if (rdev->bdev->bd_disk == rdev2->bdev->bd_disk) { in match_mddev_units()
3340 struct md_rdev *rdev2; in md_rdev_overlaps() local
3346 rdev_for_each(rdev2, mddev) { in md_rdev_overlaps()
3347 if (rdev != rdev2 && rdev->bdev == rdev2->bdev && in md_rdev_overlaps()
3348 md_rdevs_overlap(rdev, rdev2)) { in md_rdev_overlaps()
5980 struct md_rdev *rdev2; in md_run() local
5984 rdev_for_each(rdev2, mddev) { in md_run()
5985 if (rdev < rdev2 && in md_run()
5987 rdev2->bdev->bd_disk) { in md_run()
5991 rdev2->bdev); in md_run()
6884 struct md_rdev *rdev2; in md_add_new_disk() local
6888 rdev_for_each(rdev2, mddev) { in md_add_new_disk()
6889 if (test_bit(Journal, &rdev2->flags)) { in md_add_new_disk()
9772 struct md_rdev *rdev2, *tmp; in check_sb_changes() local
9788 rdev_for_each_safe(rdev2, tmp, mddev) { in check_sb_changes()
9789 if (test_bit(Faulty, &rdev2->flags)) in check_sb_changes()
9793 role = le16_to_cpu(sb->dev_roles[rdev2->desc_nr]); in check_sb_changes()
9795 if (test_bit(Candidate, &rdev2->flags)) { in check_sb_changes()
9798 rdev2->bdev); in check_sb_changes()
9799 md_kick_rdev_from_array(rdev2); in check_sb_changes()
9803 clear_bit(Candidate, &rdev2->flags); in check_sb_changes()
9806 if (role != rdev2->raid_disk) { in check_sb_changes()
9810 if (rdev2->raid_disk == -1 && role != MD_DISK_ROLE_SPARE && in check_sb_changes()
9813 rdev2->saved_raid_disk = role; in check_sb_changes()
9814 ret = remove_and_add_spares(mddev, rdev2); in check_sb_changes()
9816 rdev2->bdev); in check_sb_changes()
9829 md_error(mddev, rdev2); in check_sb_changes()
9830 clear_bit(Blocked, &rdev2->flags); in check_sb_changes()