summaryrefslogtreecommitdiffstats
path: root/super-intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c
index 999b970..7bcfcdb 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1536,12 +1536,27 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info)
if (super->current_vol >= 0) {
getinfo_super_imsm_volume(st, info);
return;
+ } else {
+ struct mdinfo vol_info;
+
+ super->current_vol = 0;
+ getinfo_super_imsm_volume(st, &vol_info);
+ super->current_vol = -1;
+ info->array.raid_disks = vol_info.array.raid_disks;
}
/* Set raid_disks to zero so that Assemble will always pull in valid
* spares
- */
+ *
+ * Note: my testing with assemble shows that it still works even
+ * when we set the raid_disks to a proper setting. However, without
+ * this it is impossible to tell when a container has the right
+ * number of disks to start cleanly without violating layering
+ * boundaries. So, not violating layering boundaries trumps spare
+ * disk issues. Doug Ledford
+ *
info->array.raid_disks = 0;
+ */
info->array.level = LEVEL_CONTAINER;
info->array.layout = 0;
info->array.md_minor = -1;