From: Shaohua Li <shli@fb.com>
To: linux-raid@vger.kernel.org
Cc: Kernel-team@fb.com, songliubraving@fb.com, hch@infradead.org,
dan.j.williams@intel.com, neilb@suse.de
Subject: [PATCH 1/9] MD: fix info output for journal disk
Date: Thu, 8 Oct 2015 21:54:05 -0700 [thread overview]
Message-ID: <2537e2bcb31eaf918df28f25d096b31c2b9daa70.1444360850.git.shli@fb.com> (raw)
In-Reply-To: <cover.1444360850.git.shli@fb.com>
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 | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 0729cc7..daf42bb 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);
@@ -7335,18 +7336,21 @@ static int md_seq_show(struct seq_file *seq, void *v)
rcu_read_lock();
rdev_for_each_rcu(rdev, mddev) {
char b[BDEVNAME_SIZE];
+ bool skip = false;
seq_printf(seq, " %s[%d]",
bdevname(rdev->bdev,b), rdev->desc_nr);
if (test_bit(WriteMostly, &rdev->flags))
seq_printf(seq, "(W)");
if (test_bit(Faulty, &rdev->flags)) {
seq_printf(seq, "(F)");
- continue;
+ skip = true;
}
if (test_bit(Journal, &rdev->flags)) {
seq_printf(seq, "(J)");
- continue;
+ skip = true;
}
+ if (skip)
+ continue;
if (rdev->raid_disk < 0)
seq_printf(seq, "(S)"); /* spare */
if (test_bit(Replacement, &rdev->flags))
--
2.4.6
next prev parent reply other threads:[~2015-10-09 4:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 4:54 [PATCH 0/9] raid5-cache fixes Shaohua Li
2015-10-09 4:54 ` Shaohua Li [this message]
2015-10-12 5:37 ` [PATCH 1/9] MD: fix info output for journal disk Neil Brown
2015-10-12 17:01 ` Shaohua Li
2015-10-12 23:26 ` Neil Brown
2015-10-12 23:38 ` Shaohua Li
2015-10-09 4:54 ` [PATCH 2/9] raid5-cache: add trim support for log Shaohua Li
2015-10-12 6:00 ` Neil Brown
2015-10-12 16:57 ` Shaohua Li
2015-10-09 4:54 ` [PATCH 3/9] raid5: journal disk can't be removed Shaohua Li
2015-10-09 4:54 ` [PATCH 4/9] raid5-cache: IO error handling Shaohua Li
2015-10-09 4:54 ` [PATCH 5/9] MD: add new bit to indicate raid array with journal Shaohua Li
2015-10-09 4:54 ` [PATCH 6/9] raid5-cache: start raid5 readonly if journal is missing Shaohua Li
2015-10-09 4:54 ` [PATCH 7/9] MD: kick out journal disk if it's not fresh Shaohua Li
2015-10-09 4:54 ` [PATCH 8/9] MD: set journal disk ->raid_disk Shaohua Li
2015-10-09 4:54 ` [PATCH 9/9] MD: when RAID journal is missing/faulty, block RESTART_ARRAY_RW Shaohua Li
2015-10-12 6:17 ` [PATCH 0/9] raid5-cache fixes Neil Brown
2015-10-13 21:03 ` Neil Brown
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=2537e2bcb31eaf918df28f25d096b31c2b9daa70.1444360850.git.shli@fb.com \
--to=shli@fb.com \
--cc=Kernel-team@fb.com \
--cc=dan.j.williams@intel.com \
--cc=hch@infradead.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--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).