]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
DDF Allow a RAID1 to be 'partially optimal'.
authorNeilBrown <neilb@suse.de>
Tue, 15 Mar 2011 04:09:24 +0000 (15:09 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 15 Mar 2011 04:09:24 +0000 (15:09 +1100)
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>
super-ddf.c

index 6f162b9aab1744109bf65dd3fadaad48f84c6789..3407344ac043db86b4d23668d524a7de7e0e4366 100644 (file)
@@ -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: