Lines Matching refs:rdev2

1397 	struct md_rdev *rdev2;  in super_90_sync()  local
1467 rdev_for_each(rdev2, mddev) { in super_90_sync()
1470 int is_active = test_bit(In_sync, &rdev2->flags); in super_90_sync()
1472 if (rdev2->raid_disk >= 0 && in super_90_sync()
1479 if (rdev2->raid_disk < 0 || in super_90_sync()
1480 test_bit(Faulty, &rdev2->flags)) in super_90_sync()
1483 desc_nr = rdev2->raid_disk; in super_90_sync()
1486 rdev2->desc_nr = desc_nr; in super_90_sync()
1487 d = &sb->disks[rdev2->desc_nr]; in super_90_sync()
1489 d->number = rdev2->desc_nr; in super_90_sync()
1490 d->major = MAJOR(rdev2->bdev->bd_dev); in super_90_sync()
1491 d->minor = MINOR(rdev2->bdev->bd_dev); in super_90_sync()
1493 d->raid_disk = rdev2->raid_disk; in super_90_sync()
1495 d->raid_disk = rdev2->desc_nr; /* compatibility */ in super_90_sync()
1496 if (test_bit(Faulty, &rdev2->flags)) in super_90_sync()
1500 if (test_bit(In_sync, &rdev2->flags)) in super_90_sync()
1509 if (test_bit(WriteMostly, &rdev2->flags)) in super_90_sync()
1511 if (test_bit(FailFast, &rdev2->flags)) in super_90_sync()
1953 struct md_rdev *rdev2; in super_1_sync() local
2071 rdev_for_each(rdev2, mddev) in super_1_sync()
2072 if (rdev2->desc_nr+1 > max_dev) in super_1_sync()
2073 max_dev = rdev2->desc_nr+1; in super_1_sync()
2101 rdev_for_each(rdev2, mddev) { in super_1_sync()
2102 i = rdev2->desc_nr; in super_1_sync()
2103 if (test_bit(Faulty, &rdev2->flags)) in super_1_sync()
2105 else if (test_bit(In_sync, &rdev2->flags)) in super_1_sync()
2106 sb->dev_roles[i] = cpu_to_le16(rdev2->raid_disk); in super_1_sync()
2107 else if (test_bit(Journal, &rdev2->flags)) in super_1_sync()
2109 else if (rdev2->raid_disk >= 0) in super_1_sync()
2110 sb->dev_roles[i] = cpu_to_le16(rdev2->raid_disk); in super_1_sync()
2253 struct md_rdev *rdev, *rdev2; in match_mddev_units() local
2261 rdev_for_each_rcu(rdev2, mddev2) { in match_mddev_units()
2262 if (test_bit(Faulty, &rdev2->flags) || in match_mddev_units()
2263 test_bit(Journal, &rdev2->flags) || in match_mddev_units()
2264 rdev2->raid_disk == -1) in match_mddev_units()
2266 if (rdev->bdev->bd_disk == rdev2->bdev->bd_disk) { in match_mddev_units()
3330 struct md_rdev *rdev2; in md_rdev_overlaps() local
3336 rdev_for_each(rdev2, mddev) { in md_rdev_overlaps()
3337 if (rdev != rdev2 && rdev->bdev == rdev2->bdev && in md_rdev_overlaps()
3338 md_rdevs_overlap(rdev, rdev2)) { in md_rdev_overlaps()
5899 struct md_rdev *rdev2; in md_run() local
5903 rdev_for_each(rdev2, mddev) { in md_run()
5904 if (rdev < rdev2 && in md_run()
5906 rdev2->bdev->bd_disk) { in md_run()
5910 rdev2->bdev); in md_run()
6781 struct md_rdev *rdev2; in md_add_new_disk() local
6785 rdev_for_each(rdev2, mddev) { in md_add_new_disk()
6786 if (test_bit(Journal, &rdev2->flags)) { in md_add_new_disk()
9662 struct md_rdev *rdev2, *tmp; in check_sb_changes() local
9678 rdev_for_each_safe(rdev2, tmp, mddev) { in check_sb_changes()
9679 if (test_bit(Faulty, &rdev2->flags)) in check_sb_changes()
9683 role = le16_to_cpu(sb->dev_roles[rdev2->desc_nr]); in check_sb_changes()
9685 if (test_bit(Candidate, &rdev2->flags)) { in check_sb_changes()
9688 rdev2->bdev); in check_sb_changes()
9689 md_kick_rdev_from_array(rdev2); in check_sb_changes()
9693 clear_bit(Candidate, &rdev2->flags); in check_sb_changes()
9696 if (role != rdev2->raid_disk) { in check_sb_changes()
9700 if (rdev2->raid_disk == -1 && role != MD_DISK_ROLE_SPARE && in check_sb_changes()
9703 rdev2->saved_raid_disk = role; in check_sb_changes()
9704 ret = remove_and_add_spares(mddev, rdev2); in check_sb_changes()
9706 rdev2->bdev); in check_sb_changes()
9719 md_error(mddev, rdev2); in check_sb_changes()
9720 clear_bit(Blocked, &rdev2->flags); in check_sb_changes()