summaryrefslogtreecommitdiff
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2015-10-13 02:59:50 +0300
committerNeilBrown <neilb@suse.com>2015-11-01 05:48:29 +0300
commit9efdca16e0182eca489a519f576019fd9c0c1b25 (patch)
treea71dede6a1223fefbb946a837e808bd1bbe6bc67 /drivers/md/md.c
parent6143e2cecb9ef9c7d3392c9c2583f231705413a5 (diff)
downloadlinux-9efdca16e0182eca489a519f576019fd9c0c1b25.tar.xz
MD: fix info output for journal disk
journal disk can be faulty. The Journal and Faulty aren't exclusive with each other. Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 5744829b7d05..e4e2731f7660 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5874,7 +5874,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);
@@ -7363,14 +7364,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))