Skip to content

Commit 9714452

Browse files
committed
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
2 parents 697ba0b + 2d2b3bc commit 9714452

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/md/md.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8327,14 +8327,19 @@ static int md_seq_show(struct seq_file *seq, void *v)
83278327
spin_unlock(&all_mddevs_lock);
83288328
spin_lock(&mddev->lock);
83298329
if (mddev->pers || mddev->raid_disks || !list_empty(&mddev->disks)) {
8330-
seq_printf(seq, "%s : %sactive", mdname(mddev),
8331-
mddev->pers ? "" : "in");
8330+
seq_printf(seq, "%s : ", mdname(mddev));
83328331
if (mddev->pers) {
8332+
if (test_bit(MD_BROKEN, &mddev->flags))
8333+
seq_printf(seq, "broken");
8334+
else
8335+
seq_printf(seq, "active");
83338336
if (mddev->ro == MD_RDONLY)
83348337
seq_printf(seq, " (read-only)");
83358338
if (mddev->ro == MD_AUTO_READ)
83368339
seq_printf(seq, " (auto-read-only)");
83378340
seq_printf(seq, " %s", mddev->pers->name);
8341+
} else {
8342+
seq_printf(seq, "inactive");
83388343
}
83398344

83408345
sectors = 0;

0 commit comments

Comments
 (0)