From: NeilBrown Date: Thu, 18 Dec 2008 03:11:59 +0000 (+1100) Subject: Assemble: don't assume array is 'clean' unless all devices think it is. X-Git-Tag: mdadm-2.6.9~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4e9a6ff778cdc58dcc6897e74cf5ee1d3f73e1f7;p=thirdparty%2Fmdadm.git Assemble: don't assume array is 'clean' unless all devices think it is. This is only significant for --assemble --force where some old devices might be included into the array. If anything looks like it isn't clean, the kernel will not allow a degraded array to be started. Signed-off-by: NeilBrown --- diff --git a/Assemble.c b/Assemble.c index 1d378702..3ee028b4 100644 --- a/Assemble.c +++ b/Assemble.c @@ -749,6 +749,8 @@ int Assemble(struct supertype *st, char *mddev, int mdfd, continue; devices[j].i.disk.state = desired_state; + if (!(devices[j].i.array.state & 1)) + clean = 0; if (st->ss->update_super(st, &devices[j].i, "assemble", NULL, verbose, 0, NULL)) {