Commit 6dcc98fb authored by Theodore Ts'o's avatar Theodore Ts'o

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: default avatarTheodore Ts'o <tytso@mit.edu>
parent f4ce24f5
...@@ -5684,8 +5684,9 @@ static int ext4_fill_super(struct super_block *sb, struct fs_context *fc) ...@@ -5684,8 +5684,9 @@ static int ext4_fill_super(struct super_block *sb, struct fs_context *fc)
descr = "out journal"; descr = "out journal";
if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs mount")) if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs mount"))
ext4_msg(sb, KERN_INFO, "mounted filesystem %pU with%s. " ext4_msg(sb, KERN_INFO, "mounted filesystem %pU %s with%s. "
"Quota mode: %s.", &sb->s_uuid, descr, "Quota mode: %s.", &sb->s_uuid,
sb_rdonly(sb) ? "ro" : "r/w", descr,
ext4_quota_mode(sb)); ext4_quota_mode(sb));
/* Update the s_overhead_clusters if necessary */ /* Update the s_overhead_clusters if necessary */
...@@ -6689,8 +6690,9 @@ static int ext4_reconfigure(struct fs_context *fc) ...@@ -6689,8 +6690,9 @@ static int ext4_reconfigure(struct fs_context *fc)
if (ret < 0) if (ret < 0)
return ret; return ret;
ext4_msg(sb, KERN_INFO, "re-mounted %pU. Quota mode: %s.", ext4_msg(sb, KERN_INFO, "re-mounted %pU %s. Quota mode: %s.",
&sb->s_uuid, ext4_quota_mode(sb)); &sb->s_uuid, sb_rdonly(sb) ? "ro" : "r/w",
ext4_quota_mode(sb));
return 0; return 0;
} }
......
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