summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-12-14 17:30:51 +1100
committerNeil Brown <neilb@suse.de>2006-12-14 17:30:51 +1100
commit67a8c82d6069e7cf7b3fef00d1442bb2fff6fecc (patch)
treec31f8dbcc341a199b606ee3397cbbc35dcfa2bab /Assemble.c
parent434b77559edef7bfd3e5f5366a2a00039baf7b48 (diff)
downloadmdadm-67a8c82d6069e7cf7b3fef00d1442bb2fff6fecc.tar.gz
mdadm-67a8c82d6069e7cf7b3fef00d1442bb2fff6fecc.tar.xz
mdadm-67a8c82d6069e7cf7b3fef00d1442bb2fff6fecc.zip
Make Assemble/Force work on raid6 with 2 missing devices.
Previously it onl worked when one missing device. Also split the "force" update_super method into two and it is really serving two functions.
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Assemble.c b/Assemble.c
index 6ca54f9..23e3583 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -656,7 +656,9 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
continue;
}
info.events = devices[most_recent].events;
- st->ss->update_super(&info, super, "force", devices[chosen_drive].devname, verbose, 0, NULL);
+ st->ss->update_super(&info, super, "force-one",
+ devices[chosen_drive].devname, verbose,
+ 0, NULL);
if (st->ss->store_super(st, fd, super)) {
close(fd);
@@ -752,10 +754,10 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
}
#endif
}
- if (force && okcnt == info.array.raid_disks-1) {
- /* FIXME check event count */
- change += st->ss->update_super(&info, super, "force",
- devices[chosen_drive].devname, verbose, 0, NULL);
+ if (force && okcnt < info.array.raid_disks) {
+ change += st->ss->update_super(&info, super, "force-array",
+ devices[chosen_drive].devname, verbose,
+ 0, NULL);
}
if (change) {