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>
This commit is contained in:
Dan Williams 2009-02-24 18:45:57 -07:00
parent a9b8734a23
commit 18fde300fe
1 changed files with 5 additions and 1 deletions

View File

@ -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);