summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown2005-09-10 01:24:00 +0200
committerLinus Torvalds2005-09-10 01:39:14 +0200
commitb325a32e5732d7aef70ca3c58acb3953ed20f66c (patch)
tree5ac799ede4268c49dcec604074ed148104717c09 /drivers/md/md.c
parent[PATCH] md: add information about superblock version to /proc/mdstat (diff)
downloadkernel-qcow2-linux-b325a32e5732d7aef70ca3c58acb3953ed20f66c.tar.gz
kernel-qcow2-linux-b325a32e5732d7aef70ca3c58acb3953ed20f66c.tar.xz
kernel-qcow2-linux-b325a32e5732d7aef70ca3c58acb3953ed20f66c.zip
[PATCH] md: report spare drives in /proc/mdstat
Just like failed drives have (F), so spare drives now have (S). Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 0a13016829da..f27e8f644dfe 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3334,7 +3334,8 @@ static int md_seq_show(struct seq_file *seq, void *v)
if (rdev->faulty) {
seq_printf(seq, "(F)");
continue;
- }
+ } else if (rdev->raid_disk < 0)
+ seq_printf(seq, "(S)"); /* spare */
size += rdev->size;
}