summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-03-15 15:09:24 +1100
committerNeilBrown <neilb@suse.de>2011-03-15 15:09:24 +1100
commit33b0edd78ad33207434f2944e81a09a91ddafd10 (patch)
treecbeee7f667b27d658a480d416dca59cd581e68b8
parentc7079c84412848c11d21b99bd3702701fa5ca5d6 (diff)
downloadmdadm-33b0edd78ad33207434f2944e81a09a91ddafd10.tar.gz
DDF Allow a RAID1 to be 'partially optimal'.
If a RAID1 is meant to have more than 2 device and while it doesn't have that many, it still has more than 1, then according to the DDF spec it is "partially optional" rather than "degraded" So make that so. Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--super-ddf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 6f162b9..3407344 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -3254,6 +3254,8 @@ static void ddf_set_disk(struct active_array *a, int n, int state)
case DDF_RAID1:
if (working == 0)
state = DDF_state_failed;
+ else if (working == 2 && state == DDF_state_degraded)
+ state = DDF_state_part_optimal;
break;
case DDF_RAID4:
case DDF_RAID5: