diff options
-rw-r--r-- | drivers/md/md.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index e4e161372a3e..9f76e0cd7805 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1062,6 +1062,11 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version) | |||
1062 | if (rdev->sb_size & bmask) | 1062 | if (rdev->sb_size & bmask) |
1063 | rdev-> sb_size = (rdev->sb_size | bmask)+1; | 1063 | rdev-> sb_size = (rdev->sb_size | bmask)+1; |
1064 | 1064 | ||
1065 | if (sb->level == cpu_to_le32(LEVEL_MULTIPATH)) | ||
1066 | rdev->desc_nr = -1; | ||
1067 | else | ||
1068 | rdev->desc_nr = le32_to_cpu(sb->dev_number); | ||
1069 | |||
1065 | if (refdev == 0) | 1070 | if (refdev == 0) |
1066 | ret = 1; | 1071 | ret = 1; |
1067 | else { | 1072 | else { |
@@ -1171,7 +1176,6 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1171 | } | 1176 | } |
1172 | if (mddev->level != LEVEL_MULTIPATH) { | 1177 | if (mddev->level != LEVEL_MULTIPATH) { |
1173 | int role; | 1178 | int role; |
1174 | rdev->desc_nr = le32_to_cpu(sb->dev_number); | ||
1175 | role = le16_to_cpu(sb->dev_roles[rdev->desc_nr]); | 1179 | role = le16_to_cpu(sb->dev_roles[rdev->desc_nr]); |
1176 | switch(role) { | 1180 | switch(role) { |
1177 | case 0xffff: /* spare */ | 1181 | case 0xffff: /* spare */ |