]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Detail: don't report a faulty device as 'spare' or 'rebuilding'.
authorNeilBrown <neilb@suse.de>
Sun, 21 Oct 2012 23:38:11 +0000 (10:38 +1100)
committerNeilBrown <neilb@suse.de>
Sun, 21 Oct 2012 23:38:11 +0000 (10:38 +1100)
If a device is faulty, then that is all there is too it.
Even if it isn't 'removed' yet, it shouldn't be reported as 'spare'
or 'rebuilding'.

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

index 8ca3a962f8e87c26520ee3c3fd44dc5b7ccc4fd2..3a2799d58ff9bcad1411701181d0ca6d4723656f 100644 (file)
--- a/Detail.c
+++ b/Detail.c
@@ -563,7 +563,8 @@ This is pretty boring
                        if (disk.state & (1<<MD_DISK_REMOVED)) printf(" removed");
                        if (disk.state & (1<<MD_DISK_WRITEMOSTLY)) printf(" writemostly");
                        if ((disk.state &
-                            ((1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC)|(1<<MD_DISK_REMOVED)))
+                            ((1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC)
+                             |(1<<MD_DISK_REMOVED)|(1<<MD_DISK_FAULTY)))
                            == 0) {
                                printf(" spare");
                                if (is_26) {