Create: fix regression in setting raid_disk
Recent commit caused 'missing' declarations to not be handled correctly.
Fixes: cc1799c3dd
("Enable create array with write journal (--write-journal DEVICE).")
Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
parent
ef639064b6
commit
f170a5a9a0
5
Create.c
5
Create.c
|
@ -851,11 +851,14 @@ int Create(struct supertype *st, char *mddev,
|
|||
if (dnum >= total_slots)
|
||||
abort();
|
||||
if (dnum == insert_point) {
|
||||
raid_disk_num += 1;
|
||||
moved_disk = dv;
|
||||
continue;
|
||||
}
|
||||
if (strcasecmp(dv->devname, "missing")==0)
|
||||
if (strcasecmp(dv->devname, "missing")==0) {
|
||||
raid_disk_num += 1;
|
||||
continue;
|
||||
}
|
||||
if (have_container)
|
||||
moved_disk = NULL;
|
||||
if (have_container && dnum < info.array.raid_disks - 1)
|
||||
|
|
Loading…
Reference in New Issue