summaryrefslogtreecommitdiffstats
path: root/Create.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-02-25 02:45:57 +0100
committerDan Williams <dan.j.williams@intel.com>2009-02-25 02:45:57 +0100
commit18fde300feeb9e7c054510b0655b316c025c7a94 (patch)
tree514e57896e7a4593dc2903e9ae53a9333d02292a /Create.c
parentCreate: wait_for container creation (diff)
downloadmdadm-18fde300feeb9e7c054510b0655b316c025c7a94.tar.xz
mdadm-18fde300feeb9e7c054510b0655b316c025c7a94.zip
Create: fixup 'insert_point', dependent on 'subdevs', for auto-layout
'subdevs' is read from the container in the auto-layout case so reset subdevs dependent default values. 'insert_point' without this change is always 2 blocking creation of arrays with > 2 raid disks. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'Create.c')
-rw-r--r--Create.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Create.c b/Create.c
index 191e1134..d33f8914 100644
--- a/Create.c
+++ b/Create.c
@@ -187,8 +187,12 @@ int Create(struct supertype *st, char *mddev,
else
st = NULL;
}
- if (have_container)
+ if (have_container) {
subdevs = raiddisks;
+ first_missing = subdevs * 2;
+ second_missing = subdevs * 2;
+ insert_point = subdevs * 2;
+ }
}
if (fd >= 0)
close(fd);