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>
This commit is contained in:
parent
6143e2cecb
commit
9efdca16e0
1 changed files with 4 additions and 5 deletions
|
@ -5874,7 +5874,8 @@ static int get_disk_info(struct mddev *mddev, void __user * arg)
|
||||||
else if (test_bit(In_sync, &rdev->flags)) {
|
else if (test_bit(In_sync, &rdev->flags)) {
|
||||||
info.state |= (1<<MD_DISK_ACTIVE);
|
info.state |= (1<<MD_DISK_ACTIVE);
|
||||||
info.state |= (1<<MD_DISK_SYNC);
|
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);
|
info.state |= (1<<MD_DISK_JOURNAL);
|
||||||
if (test_bit(WriteMostly, &rdev->flags))
|
if (test_bit(WriteMostly, &rdev->flags))
|
||||||
info.state |= (1<<MD_DISK_WRITEMOSTLY);
|
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);
|
bdevname(rdev->bdev,b), rdev->desc_nr);
|
||||||
if (test_bit(WriteMostly, &rdev->flags))
|
if (test_bit(WriteMostly, &rdev->flags))
|
||||||
seq_printf(seq, "(W)");
|
seq_printf(seq, "(W)");
|
||||||
|
if (test_bit(Journal, &rdev->flags))
|
||||||
|
seq_printf(seq, "(J)");
|
||||||
if (test_bit(Faulty, &rdev->flags)) {
|
if (test_bit(Faulty, &rdev->flags)) {
|
||||||
seq_printf(seq, "(F)");
|
seq_printf(seq, "(F)");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (test_bit(Journal, &rdev->flags)) {
|
|
||||||
seq_printf(seq, "(J)");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (rdev->raid_disk < 0)
|
if (rdev->raid_disk < 0)
|
||||||
seq_printf(seq, "(S)"); /* spare */
|
seq_printf(seq, "(S)"); /* spare */
|
||||||
if (test_bit(Replacement, &rdev->flags))
|
if (test_bit(Replacement, &rdev->flags))
|
||||||
|
|
Loading…
Add table
Reference in a new issue