ext4: add indication of ro vs r/w mounts in the mount message

Whether the file system is mounted read-only or read/write is more
important than the quota mode, which we are already printing. Add the
ro vs r/w indication since this can be helpful in debugging problems
from the console log.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

+6 -4
+6 -4
fs/ext4/super.c
··· 5684 5684 descr = "out journal"; 5685 5685 5686 5686 if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs mount")) 5687 - ext4_msg(sb, KERN_INFO, "mounted filesystem %pU with%s. " 5688 - "Quota mode: %s.", &sb->s_uuid, descr, 5687 + ext4_msg(sb, KERN_INFO, "mounted filesystem %pU %s with%s. " 5688 + "Quota mode: %s.", &sb->s_uuid, 5689 + sb_rdonly(sb) ? "ro" : "r/w", descr, 5689 5690 ext4_quota_mode(sb)); 5690 5691 5691 5692 /* Update the s_overhead_clusters if necessary */ ··· 6690 6689 if (ret < 0) 6691 6690 return ret; 6692 6691 6693 - ext4_msg(sb, KERN_INFO, "re-mounted %pU. Quota mode: %s.", 6694 - &sb->s_uuid, ext4_quota_mode(sb)); 6692 + ext4_msg(sb, KERN_INFO, "re-mounted %pU %s. Quota mode: %s.", 6693 + &sb->s_uuid, sb_rdonly(sb) ? "ro" : "r/w", 6694 + ext4_quota_mode(sb)); 6695 6695 6696 6696 return 0; 6697 6697 }