Skip to content

Commit 4808cb5

Browse files
zhangyi089tytso
authored andcommitted
ext4: add unmount filesystem message
Now that we have kernel message at mount time, system administrator could acquire the mount time, device and options easily. But we don't have corresponding unmounting message at umount time, so we cannot know if someone umount a filesystem easily. Some of the modern filesystems (e.g. xfs) have the umounting kernel message, so add one for ext4 filesystem for convenience. EXT4-fs (sdb): mounted filesystem with ordered data mode. Quota mode: none. EXT4-fs (sdb): unmounting filesystem. Signed-off-by: Zhang Yi <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 784a099 commit 4808cb5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/ext4/super.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,9 @@ static void ext4_put_super(struct super_block *sb)
12111211
*/
12121212
ext4_unregister_sysfs(sb);
12131213

1214+
if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs unmount"))
1215+
ext4_msg(sb, KERN_INFO, "unmounting filesystem.");
1216+
12141217
ext4_unregister_li_request(sb);
12151218
ext4_quota_off_umount(sb);
12161219

0 commit comments

Comments
 (0)