From: Neil Brown <neilb@suse.de>
To: Shaohua Li <shli@fb.com>, linux-raid@vger.kernel.org
Cc: Kernel-team@fb.com, songliubraving@fb.com, hch@infradead.org,
dan.j.williams@intel.com
Subject: Re: [PATCH V2] MD: fix info output for journal disk
Date: Wed, 14 Oct 2015 07:50:22 +1100 [thread overview]
Message-ID: <87bnc2ze5t.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <6e6d9cd5bc79883cfb22a62b9bdc98b161aad301.1444694209.git.shli@fb.com>
[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]
Shaohua Li <shli@fb.com> writes:
> journal disk can be faulty. The Journal and Faulty aren't exclusive with
> each other.
>
> Signed-off-by: Shaohua Li <shli@fb.com>
> ---
> drivers/md/md.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 0729cc7..f1114a6 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -5857,7 +5857,8 @@ static int get_disk_info(struct mddev *mddev, void __user * arg)
> else if (test_bit(In_sync, &rdev->flags)) {
> info.state |= (1<<MD_DISK_ACTIVE);
> info.state |= (1<<MD_DISK_SYNC);
> - } else if (test_bit(Journal, &rdev->flags))
> + }
> + if (test_bit(Journal, &rdev->flags))
> info.state |= (1<<MD_DISK_JOURNAL);
> if (test_bit(WriteMostly, &rdev->flags))
> info.state |= (1<<MD_DISK_WRITEMOSTLY);
> @@ -7339,14 +7340,12 @@ static int md_seq_show(struct seq_file *seq, void *v)
> bdevname(rdev->bdev,b), rdev->desc_nr);
> if (test_bit(WriteMostly, &rdev->flags))
> seq_printf(seq, "(W)");
> + if (test_bit(Journal, &rdev->flags))
> + seq_printf(seq, "(J)");
> if (test_bit(Faulty, &rdev->flags)) {
> seq_printf(seq, "(F)");
> continue;
> }
> - if (test_bit(Journal, &rdev->flags)) {
> - seq_printf(seq, "(J)");
> - continue;
> - }
> if (rdev->raid_disk < 0)
> seq_printf(seq, "(S)"); /* spare */
> if (test_bit(Replacement, &rdev->flags))
> --
> 2.4.6
Applied, thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
prev parent reply other threads:[~2015-10-13 20:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 23:59 [PATCH V2] MD: fix info output for journal disk Shaohua Li
2015-10-13 20:50 ` Neil Brown [this message]
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=87bnc2ze5t.fsf@notabene.neil.brown.name \
--to=neilb@suse.de \
--cc=Kernel-team@fb.com \
--cc=dan.j.williams@intel.com \
--cc=hch@infradead.org \
--cc=linux-raid@vger.kernel.org \
--cc=shli@fb.com \
--cc=songliubraving@fb.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;
as well as URLs for NNTP newsgroup(s).