Commit 9714452a authored by Jens Axboe's avatar Jens Axboe

Merge tag 'md-6.12-20240905' of...

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
parents 697ba0b6 2d2b3bc1
...@@ -8327,14 +8327,19 @@ static int md_seq_show(struct seq_file *seq, void *v) ...@@ -8327,14 +8327,19 @@ static int md_seq_show(struct seq_file *seq, void *v)
spin_unlock(&all_mddevs_lock); spin_unlock(&all_mddevs_lock);
spin_lock(&mddev->lock); spin_lock(&mddev->lock);
if (mddev->pers || mddev->raid_disks || !list_empty(&mddev->disks)) { if (mddev->pers || mddev->raid_disks || !list_empty(&mddev->disks)) {
seq_printf(seq, "%s : %sactive", mdname(mddev), seq_printf(seq, "%s : ", mdname(mddev));
mddev->pers ? "" : "in");
if (mddev->pers) { if (mddev->pers) {
if (test_bit(MD_BROKEN, &mddev->flags))
seq_printf(seq, "broken");
else
seq_printf(seq, "active");
if (mddev->ro == MD_RDONLY) if (mddev->ro == MD_RDONLY)
seq_printf(seq, " (read-only)"); seq_printf(seq, " (read-only)");
if (mddev->ro == MD_AUTO_READ) if (mddev->ro == MD_AUTO_READ)
seq_printf(seq, " (auto-read-only)"); seq_printf(seq, " (auto-read-only)");
seq_printf(seq, " %s", mddev->pers->name); seq_printf(seq, " %s", mddev->pers->name);
} else {
seq_printf(seq, "inactive");
} }
sectors = 0; sectors = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment