From: Song Liu <songliubraving@fb.com>
To: linux-raid@vger.kernel.org
Cc: yizhan@redhat.com, Song Liu <songliubraving@fb.com>,
Shaohua Li <shli@fb.com>
Subject: [PATCH] md: do not count journal as spare in GET_ARRAY_INFO
Date: Thu, 11 Aug 2016 17:14:45 -0700 [thread overview]
Message-ID: <1470960885-2860586-1-git-send-email-songliubraving@fb.com> (raw)
GET_ARRAY_INFO counts journal as spare (spare_disks), which is not
accurate. This patch fixes this.
Reported-by: Yi Zhang <yizhan@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
---
drivers/md/md.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 2c3ab6f..df595a8 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5851,6 +5851,9 @@ static int get_array_info(struct mddev *mddev, void __user *arg)
working++;
if (test_bit(In_sync, &rdev->flags))
insync++;
+ else if (test_bit(Journal, &rdev->flags))
+ /* TODO: add journal count to md_u.h */
+ ;
else
spare++;
}
--
2.8.0.rc2
next reply other threads:[~2016-08-12 0:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-12 0:14 Song Liu [this message]
2016-08-17 1:33 ` [PATCH] md: do not count journal as spare in GET_ARRAY_INFO Shaohua Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1470960885-2860586-1-git-send-email-songliubraving@fb.com \
--to=songliubraving@fb.com \
--cc=linux-raid@vger.kernel.org \
--cc=shli@fb.com \
--cc=yizhan@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox