Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+7 -2
+7 -2
drivers/md/md.c
··· 8327 8327 spin_unlock(&all_mddevs_lock); 8328 8328 spin_lock(&mddev->lock); 8329 8329 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)); 8332 8331 if (mddev->pers) { 8332 + if (test_bit(MD_BROKEN, &mddev->flags)) 8333 + seq_printf(seq, "broken"); 8334 + else 8335 + seq_printf(seq, "active"); 8333 8336 if (mddev->ro == MD_RDONLY) 8334 8337 seq_printf(seq, " (read-only)"); 8335 8338 if (mddev->ro == MD_AUTO_READ) 8336 8339 seq_printf(seq, " (auto-read-only)"); 8337 8340 seq_printf(seq, " %s", mddev->pers->name); 8341 + } else { 8342 + seq_printf(seq, "inactive"); 8338 8343 } 8339 8344 8340 8345 sectors = 0;