diff options
author | Neil Brown <neilb@suse.de> | 2006-12-14 17:30:51 +1100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-12-14 17:30:51 +1100 |
commit | 67a8c82d6069e7cf7b3fef00d1442bb2fff6fecc (patch) | |
tree | c31f8dbcc341a199b606ee3397cbbc35dcfa2bab /super1.c | |
parent | 434b77559edef7bfd3e5f5366a2a00039baf7b48 (diff) | |
download | mdadm-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 'super1.c')
-rw-r--r-- | super1.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -485,10 +485,18 @@ static int update_super1(struct mdinfo *info, void *sbv, char *update, int rv = 0; struct mdp_superblock_1 *sb = sbv; - if (strcmp(update, "force")==0) { + if (strcmp(update, "force-one")==0) { + /* Not enough devices for a working array, + * so bring this one up-to-date + */ if (sb->events != __cpu_to_le64(info->events)) rv = 1; sb->events = __cpu_to_le64(info->events); + } + if (strcmp(update, "force-array")==0) { + /* Degraded array and 'force' requests to + * maybe need to mark it 'clean'. + */ switch(__le32_to_cpu(sb->level)) { case 5: case 4: case 6: /* need to force clean */ |