Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ext4: print file system UUID on mount, remount and unmount

The device names are not necessarily consistent across reboots which can
make it more difficult to identify the right file system when tracking
down issues using system logs.

Print file system UUID string on every mount, remount and unmount to
make this task easier.

This is similar to the functionality recently propsed for XFS.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Cc: Lukas Herbolt <lukas@herbolt.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20221108145042.85770-1-lczerner@redhat.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

authored by

Lukas Czerner and committed by
Theodore Ts'o
bb0fbc78 fae381a3

+7 -5
+7 -5
fs/ext4/super.c
··· 1206 1206 ext4_unregister_sysfs(sb); 1207 1207 1208 1208 if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs unmount")) 1209 - ext4_msg(sb, KERN_INFO, "unmounting filesystem."); 1209 + ext4_msg(sb, KERN_INFO, "unmounting filesystem %pU.", 1210 + &sb->s_uuid); 1210 1211 1211 1212 ext4_unregister_li_request(sb); 1212 1213 ext4_quota_off_umount(sb); ··· 5656 5655 descr = "out journal"; 5657 5656 5658 5657 if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs mount")) 5659 - ext4_msg(sb, KERN_INFO, "mounted filesystem with%s. " 5660 - "Quota mode: %s.", descr, ext4_quota_mode(sb)); 5658 + ext4_msg(sb, KERN_INFO, "mounted filesystem %pU with%s. " 5659 + "Quota mode: %s.", &sb->s_uuid, descr, 5660 + ext4_quota_mode(sb)); 5661 5661 5662 5662 /* Update the s_overhead_clusters if necessary */ 5663 5663 ext4_update_overhead(sb, false); ··· 6613 6611 if (ret < 0) 6614 6612 return ret; 6615 6613 6616 - ext4_msg(sb, KERN_INFO, "re-mounted. Quota mode: %s.", 6617 - ext4_quota_mode(sb)); 6614 + ext4_msg(sb, KERN_INFO, "re-mounted %pU. Quota mode: %s.", 6615 + &sb->s_uuid, ext4_quota_mode(sb)); 6618 6616 6619 6617 return 0; 6620 6618 }