Commit 52720ae7 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

md: fix formatting error in /proc/mdstat

If an md array is "auto-read-only", then this appears in /proc/mdstat as

   /dev/md0: active(auto-read-only)

whereas if it is truely readonly, it appears as

   /dev/md0: active (read-only)

The difference being a space.

One program known to parse this file expects the space and gets badly
confused.  It will be fixed, but it would be best if what the kernel generates
is more consistent too.
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 69682d85
...@@ -5149,7 +5149,7 @@ static int md_seq_show(struct seq_file *seq, void *v) ...@@ -5149,7 +5149,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
if (mddev->ro==1) if (mddev->ro==1)
seq_printf(seq, " (read-only)"); seq_printf(seq, " (read-only)");
if (mddev->ro==2) if (mddev->ro==2)
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);
} }
......
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