Lines Matching refs:desc_nr

829 		if (rdev->desc_nr == nr)  in md_find_rdev_nr_rcu()
1208 rdev->desc_nr = -1; in super_90_load()
1210 rdev->desc_nr = sb->this_disk.number; in super_90_load()
1214 (rdev->desc_nr >= 0 && in super_90_load()
1215 rdev->desc_nr < MD_SB_DISKS && in super_90_load()
1216 sb->disks[rdev->desc_nr].state & in super_90_load()
1345 if (sb->disks[rdev->desc_nr].state & ( in super_90_validate()
1364 desc = sb->disks + rdev->desc_nr; in super_90_validate()
1469 int desc_nr; in super_90_sync() local
1483 desc_nr = rdev2->raid_disk; in super_90_sync()
1485 desc_nr = next_spare++; 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()
1495 d->raid_disk = rdev2->desc_nr; /* compatibility */ in super_90_sync()
1531 sb->this_disk = sb->disks[rdev->desc_nr]; in super_90_sync()
1678 rdev->desc_nr = -1; in super_1_load()
1680 rdev->desc_nr = le32_to_cpu(sb->dev_number); in super_1_load()
1735 (rdev->desc_nr >= 0 && in super_1_load()
1736 rdev->desc_nr < le32_to_cpu(sb->max_dev) && in super_1_load()
1737 (le16_to_cpu(sb->dev_roles[rdev->desc_nr]) < MD_DISK_ROLE_MAX || in super_1_load()
1738 le16_to_cpu(sb->dev_roles[rdev->desc_nr]) == MD_DISK_ROLE_JOURNAL))) in super_1_load()
1875 if (rdev->desc_nr >= 0 && in super_1_validate()
1876 rdev->desc_nr < le32_to_cpu(sb->max_dev) && in super_1_validate()
1877 (le16_to_cpu(sb->dev_roles[rdev->desc_nr]) < MD_DISK_ROLE_MAX || in super_1_validate()
1878 le16_to_cpu(sb->dev_roles[rdev->desc_nr]) == MD_DISK_ROLE_JOURNAL)) in super_1_validate()
1896 if (rdev->desc_nr < 0 || in super_1_validate()
1897 rdev->desc_nr >= le32_to_cpu(sb->max_dev)) { in super_1_validate()
1899 rdev->desc_nr = -1; in super_1_validate()
1901 role = le16_to_cpu(sb->dev_roles[rdev->desc_nr]); in super_1_validate()
2072 if (rdev2->desc_nr+1 > max_dev) in super_1_sync()
2073 max_dev = rdev2->desc_nr+1; in super_1_sync()
2102 i = rdev2->desc_nr; in super_1_sync()
2400 if (rdev->desc_nr < 0) { in bind_rdev_to_array()
2406 rdev->desc_nr = choice; in bind_rdev_to_array()
2408 if (md_find_rdev_nr_rcu(mddev, rdev->desc_nr)) { in bind_rdev_to_array()
2415 mddev->max_disks && rdev->desc_nr >= mddev->max_disks) { in bind_rdev_to_array()
2618 role = le16_to_cpu(sb->dev_roles[rdev->desc_nr]); in does_sb_need_changing()
3632 rdev->desc_nr = -1; in md_rdev_init()
3759 (rdev->desc_nr >= mddev->max_disks || in analyze_sbs()
3777 rdev->desc_nr = i++; in analyze_sbs()
3778 rdev->raid_disk = rdev->desc_nr; in analyze_sbs()
6856 rdev->desc_nr = info->number; in md_add_new_disk()
6970 rdev->desc_nr = -1; in hot_add_disk()
8259 seq_printf(seq, " %pg[%d]", rdev->bdev, rdev->desc_nr); in md_seq_show()
9683 role = le16_to_cpu(sb->dev_roles[rdev2->desc_nr]); in check_sb_changes()
9778 __func__, __LINE__, rdev->desc_nr, err); in read_rdev()
9813 if (iter->desc_nr == nr) { in md_reload_sb()