summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-09-05 13:47:06 -0600
committerJens Axboe <axboe@kernel.dk>2024-09-05 13:47:06 -0600
commit9714452af1e5b8a7567e4ef2d576787b32034d0a (patch)
tree2fd1f8c3991ac40e5de6bf79708b2ce5e54b260a /drivers
parent697ba0b6ec4ae04afb67d3911799b5e2043b4455 (diff)
parent2d2b3bc145b9d5b5c6f07d22291723ddb024ca76 (diff)
Merge tag 'md-6.12-20240905' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.12/block
Pull MD fix from Song: "This patch, from Mateusz Kusiak, improves the information reported in /proc/mdstat." * tag 'md-6.12-20240905' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: Report failed arrays as broken in mdstat
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/md.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 414146111425..b669971d4782 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8327,14 +8327,19 @@ static int md_seq_show(struct seq_file *seq, void *v)
spin_unlock(&all_mddevs_lock);
spin_lock(&mddev->lock);
if (mddev->pers || mddev->raid_disks || !list_empty(&mddev->disks)) {
- seq_printf(seq, "%s : %sactive", mdname(mddev),
- mddev->pers ? "" : "in");
+ seq_printf(seq, "%s : ", mdname(mddev));
if (mddev->pers) {
+ if (test_bit(MD_BROKEN, &mddev->flags))
+ seq_printf(seq, "broken");
+ else
+ seq_printf(seq, "active");
if (mddev->ro == MD_RDONLY)
seq_printf(seq, " (read-only)");
if (mddev->ro == MD_AUTO_READ)
seq_printf(seq, " (auto-read-only)");
seq_printf(seq, " %s", mddev->pers->name);
+ } else {
+ seq_printf(seq, "inactive");
}
sectors = 0;