md: Add prompt message about wantreplacement disk in /proc/mdstat
PATCH 4/4 md: Add prompt message about wantreplacement disk in /proc/mdstat
From file "/proc/mdstat",we only get the disk which replacing.But we can't get the disk which want repalce.So add the info.
Signed-off-by Jianpeng Ma <[email protected]>
--- drivers/md/md.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/md/md.c +2 -0
@@ -7017,6 +7017,8 @@ static int md_seq_show(struct seq_file *seq, void *v)seq_printf (seq,"(S)" );/* spare */ if (test_bit (Replacement, &rdev->flags))seq_printf (seq,"(R)" ); +if (test_bit (WantReplacement, &rdev->flags)) +seq_printf (seq,"(WR)" ); sectors += rdev->sectors; }
Signature · 1 line
1.7.9.5
Quoted 13 lines · On Thu, 28 Feb 2013 15:50:28 +0800 majianpeng <[email protected]> wrote:
From file "/proc/mdstat",we only get the disk which replacing.But we can't get the disk which want repalce.So add the info.
Signed-off-by Jianpeng Ma <[email protected]>--- drivers/md/md.c | 2 ++ 1 file changed, 2 insertions(+)drivers/md/md.c +0
-0
drivers/md/md.c static int md_seq_show(struct seq_file *seq, void *v) · line 7024
Quoted 8 lines
drivers/md/md.c +2
-0@@ -7017,6 +7017,8 @@ static int md_seq_show(struct seq_file *seq, void *v)seq_printf (seq,"(S)" );/* spare */ if (test_bit (Replacement, &rdev->flags))seq_printf (seq,"(R)" ); +if (test_bit (WantReplacement, &rdev->flags)) +seq_printf (seq,"(WR)" ); sectors += rdev->sectors; }
If you really need it you can get it from /sys.
not applied.
NeilBrown