linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/4] md: Add prompt message about wantreplacement disk in /proc/mdstat
@ 2013-02-28  7:50 majianpeng
  2013-03-04  2:05 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: majianpeng @ 2013-02-28  7:50 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-raid

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 <majianpeng@gmail.com>
---
 drivers/md/md.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 3db3d1b..4935dbe 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -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;
 		}
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 4/4] md: Add prompt message about wantreplacement disk in /proc/mdstat
  2013-02-28  7:50 [PATCH 4/4] md: Add prompt message about wantreplacement disk in /proc/mdstat majianpeng
@ 2013-03-04  2:05 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2013-03-04  2:05 UTC (permalink / raw)
  To: majianpeng; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

On Thu, 28 Feb 2013 15:50:28 +0800 majianpeng <majianpeng@gmail.com> 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 <majianpeng@gmail.com>
> ---
>  drivers/md/md.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 3db3d1b..4935dbe 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-04  2:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-28  7:50 [PATCH 4/4] md: Add prompt message about wantreplacement disk in /proc/mdstat majianpeng
2013-03-04  2:05 ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).