summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-10-22 09:34:49 +1100
committerNeilBrown <neilb@suse.de>2012-10-22 10:32:40 +1100
commite1e539f952d8afa2c2bc856f5aa9c93d51468f71 (patch)
tree7ff25213ff63cc80ee2f3cbce725b940522f8099
parent31bff5816238397b165c04cd8cf9124d4c0ce041 (diff)
downloadmdadm-e1e539f952d8afa2c2bc856f5aa9c93d51468f71.tar.gz
Detail: don't report a faulty device as 'spare' or 'rebuilding'.
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>
-rw-r--r--Detail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Detail.c b/Detail.c
index 07a00cb..946b5e9 100644
--- 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) {