public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukas Herbolt <lukas@herbolt.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: print file system UUID on mount, remount and unmount
Date: Tue, 08 Nov 2022 22:03:43 +0100	[thread overview]
Message-ID: <97cf8d4ac4b3a27b2fd0ee2013193cb1@herbolt.com> (raw)
In-Reply-To: <20221108145042.85770-1-lczerner@redhat.com>



On 08.11.2022 15:50, Lukas Czerner wrote:
> 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.
Looks good to me. Thanks Lukas for proposing it!

> 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>
> ---
>  fs/ext4/super.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 7cdd2138c897..4028bfc8206c 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1206,7 +1206,8 @@ static void ext4_put_super(struct super_block 
> *sb)
>  	ext4_unregister_sysfs(sb);
> 
>  	if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs unmount"))
> -		ext4_msg(sb, KERN_INFO, "unmounting filesystem.");
> +		ext4_msg(sb, KERN_INFO, "unmounting filesystem %pU.",
> +			 &sb->s_uuid);
> 
>  	ext4_unregister_li_request(sb);
>  	ext4_quota_off_umount(sb);
> @@ -5655,8 +5656,9 @@ static int ext4_fill_super(struct super_block
> *sb, struct fs_context *fc)
>  		descr = "out journal";
> 
>  	if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs mount"))
> -		ext4_msg(sb, KERN_INFO, "mounted filesystem with%s. "
> -			 "Quota mode: %s.", descr, ext4_quota_mode(sb));
> +		ext4_msg(sb, KERN_INFO, "mounted filesystem %pU with%s. "
> +			 "Quota mode: %s.", &sb->s_uuid, descr,
> +			 ext4_quota_mode(sb));
> 
>  	/* Update the s_overhead_clusters if necessary */
>  	ext4_update_overhead(sb, false);
> @@ -6611,8 +6613,8 @@ static int ext4_reconfigure(struct fs_context 
> *fc)
>  	if (ret < 0)
>  		return ret;
> 
> -	ext4_msg(sb, KERN_INFO, "re-mounted. Quota mode: %s.",
> -		 ext4_quota_mode(sb));
> +	ext4_msg(sb, KERN_INFO, "re-mounted %pU. Quota mode: %s.",
> +		 &sb->s_uuid, ext4_quota_mode(sb));
> 
>  	return 0;
>  }

      parent reply	other threads:[~2022-11-08 21:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 14:50 [PATCH] ext4: print file system UUID on mount, remount and unmount Lukas Czerner
2022-11-08 16:36 ` Darrick J. Wong
2022-11-08 21:03 ` Lukas Herbolt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97cf8d4ac4b3a27b2fd0ee2013193cb1@herbolt.com \
    --to=lukas@herbolt.com \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox