From: NeilBrown Date: Tue, 15 Mar 2011 04:09:24 +0000 (+1100) Subject: DDF Allow a RAID1 to be 'partially optimal'. X-Git-Tag: mdadm-3.1.5~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33b0edd78ad33207434f2944e81a09a91ddafd10;p=thirdparty%2Fmdadm.git 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 --- diff --git a/super-ddf.c b/super-ddf.c index 6f162b9a..3407344a 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: