From: NeilBrown Date: Thu, 14 Jan 2016 02:22:17 +0000 (+1100) Subject: Create: fix regression in setting raid_disk X-Git-Tag: mdadm-3.4~10 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=commitdiff_plain;h=f170a5a9a0b5dbdd502b1014cfe040bf83da5ccf Create: fix regression in setting raid_disk Recent commit caused 'missing' declarations to not be handled correctly. Fixes: cc1799c3ddc9 ("Enable create array with write journal (--write-journal DEVICE).") Signed-off-by: NeilBrown --- diff --git a/Create.c b/Create.c index 21d13747..40f1b7ea 100644 --- a/Create.c +++ b/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)