]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: allow --force to work even when event counts are 0.
authorNeilBrown <neilb@suse.de>
Thu, 27 Nov 2008 04:46:51 +0000 (15:46 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 27 Nov 2008 04:46:51 +0000 (15:46 +1100)
If any superblocks in a confused array had an event count of 0,
"mdadm -Af" would not update the event counts to assemble the array.
I don't remember why that text is there, and it has caused at least
one situation to be difficult to recover from.  So remove the
test.  --force means --force!

Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c

index 79f091269e68f843cbf9bd03978b8c739f3cf80c..1d3787022adec681aec9ddbb3e3ef98e2dfcfb35 100644 (file)
@@ -632,7 +632,6 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
                        int j = best[i];
                        if (j>=0 &&
                            !devices[j].uptodate &&
-                           devices[j].i.events > 0 &&
                            (chosen_drive < 0 ||
                             devices[j].i.events
                             > devices[chosen_drive].i.events))
@@ -690,7 +689,6 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
                        int j = best[i];
                        if (j >= 0 &&
                            !devices[j].uptodate &&
-                           devices[j].i.events > 0 &&
                            devices[j].i.events == current_events) {
                                chosen_drive = j;
                                goto add_another;