From 9efdca16e0182eca489a519f576019fd9c0c1b25 Mon Sep 17 00:00:00 2001 From: Shaohua Li Date: Mon, 12 Oct 2015 16:59:50 -0700 Subject: 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 Signed-off-by: NeilBrown --- drivers/md/md.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/md/md.c') 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<flags)) + } + if (test_bit(Journal, &rdev->flags)) info.state |= (1<flags)) info.state |= (1<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)) -- cgit v1.2.3