]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
ddf: Failed should suppress Online and others.
authorNeilBrown <neilb@suse.de>
Thu, 10 Mar 2011 07:14:43 +0000 (18:14 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 10 Mar 2011 07:14:43 +0000 (18:14 +1100)
so the notes say, so make it so.

Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c

index 35515c4bad1142eef23f4ea20bd19de4dc47c135..5f7a193ee65ba3c7a5e2dd1b3e07bf0aec914164 100644 (file)
@@ -1158,6 +1158,9 @@ static void examine_pds(struct ddf_super *sb)
                       (type&8) ? "spare" : "",
                       (type&16)? ", foreign" : "",
                       (type&32)? "pass-through" : "");
+               if (state & DDF_Failed)
+                       /* This over-rides these three */
+                       state &= ~(DDF_Online|DDF_Rebuilding|DDF_Transition);
                printf("/%s%s%s%s%s%s%s",
                       (state&1)? "Online": "Offline",
                       (state&2)? ", Failed": "",