Lines Matching refs:rdev2
1186 mdk_rdev_t *rdev2;
1257 list_for_each_entry(rdev2, &mddev->disks, same_set) {
1260 int is_active = test_bit(In_sync, &rdev2->flags);
1262 if (rdev2->raid_disk >= 0 &&
1269 if (rdev2->raid_disk < 0 ||
1270 test_bit(Faulty, &rdev2->flags))
1273 desc_nr = rdev2->raid_disk;
1276 rdev2->desc_nr = desc_nr;
1277 d = &sb->disks[rdev2->desc_nr];
1279 d->number = rdev2->desc_nr;
1280 d->major = MAJOR(rdev2->bdev->bd_dev);
1281 d->minor = MINOR(rdev2->bdev->bd_dev);
1283 d->raid_disk = rdev2->raid_disk;
1285 d->raid_disk = rdev2->desc_nr; /* compatibility */
1286 if (test_bit(Faulty, &rdev2->flags))
1290 if (test_bit(In_sync, &rdev2->flags))
1299 if (test_bit(WriteMostly, &rdev2->flags))
1591 mdk_rdev_t *rdev2;
1642 list_for_each_entry(rdev2, &mddev->disks, same_set)
1643 if (rdev2->desc_nr+1 > max_dev)
1644 max_dev = rdev2->desc_nr+1;
1659 list_for_each_entry(rdev2, &mddev->disks, same_set) {
1660 i = rdev2->desc_nr;
1661 if (test_bit(Faulty, &rdev2->flags))
1663 else if (test_bit(In_sync, &rdev2->flags))
1664 sb->dev_roles[i] = cpu_to_le16(rdev2->raid_disk);
1665 else if (rdev2->raid_disk >= 0)
1666 sb->dev_roles[i] = cpu_to_le16(rdev2->raid_disk);
1731 mdk_rdev_t *rdev, *rdev2;
1735 rdev_for_each_rcu(rdev2, mddev2)
1737 rdev2->bdev->bd_contains) {
2462 mdk_rdev_t *rdev2;
2473 list_for_each_entry(rdev2, &rdev->mddev->disks, same_set)
2474 if (rdev2->raid_disk == slot)
2606 mdk_rdev_t *rdev2;
2609 list_for_each_entry(rdev2, &mddev->disks, same_set)
2610 if (test_bit(AllReserved, &rdev2->flags) ||
2611 (rdev->bdev == rdev2->bdev &&
2612 rdev != rdev2 &&
2614 rdev2->data_offset,
2615 rdev2->sectors))) {
4484 mdk_rdev_t *rdev2;
4488 list_for_each_entry(rdev2, &mddev->disks, same_set) {
4489 if (rdev < rdev2 &&
4491 rdev2->bdev->bd_contains) {
4498 bdevname(rdev2->bdev,b2));