md: fix formatting error in /proc/mdstat
authorNeilBrown <neilb@suse.de>
Mon, 10 Mar 2008 18:43:47 +0000 (11:43 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Mar 2008 01:01:19 +0000 (18:01 -0700)
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: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/md.c

index 827824a9f3e917de4ae1ce38fa6017efbb49602d..ccbbf63727cc03fe06fb26bf03debcd9f8e97b6f 100644 (file)
@@ -5149,7 +5149,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
                        if (mddev->ro==1)
                                seq_printf(seq, " (read-only)");
                        if (mddev->ro==2)
-                               seq_printf(seq, "(auto-read-only)");
+                               seq_printf(seq, " (auto-read-only)");
                        seq_printf(seq, " %s", mddev->pers->name);
                }