]> 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 22:34:49 +0000 (09:34 +1100)
committerNeilBrown <neilb@suse.de>
Sun, 21 Oct 2012 23:32:40 +0000 (10:32 +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 07a00cbcb4220594c252971b37450274fd98ac44..946b5e9be783150b9d713aebc03ee143d1d5f2b9 100644 (file)
--- a/Detail.c
+++ b/Detail.c
@@ -543,7 +543,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) {