]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: don't assume array is 'clean' unless all devices think it is.
authorNeilBrown <neilb@suse.de>
Thu, 18 Dec 2008 03:11:59 +0000 (14:11 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 18 Dec 2008 03:11:59 +0000 (14:11 +1100)
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 <neilb@suse.de>
Assemble.c

index 1d3787022adec681aec9ddbb3e3ef98e2dfcfb35..3ee028b461619a1379827e1bfce84c245a1aebfc 100644 (file)
@@ -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)) {