Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Alexander Mikhalitsyn <alex@amutable.com>, dsterba@suse.com
Cc: mason@kernel.org, Lennart Poettering <lennart@amutable.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: use super_set_uuid to support FS_IOC_GETFSUUID
Date: Wed, 25 Nov 2026 07:28:40 +1030	[thread overview]
Message-ID: <b6147b91-d8ef-4fcf-bd87-0bc30f2aa741@gmx.com> (raw)
In-Reply-To: <20261124154604.77736-1-alex@amutable.com>



在 2026/11/25 02:16, Alexander Mikhalitsyn 写道:
> Currently, FS_IOC_GETFSUUID fails with ENOTTY. To fix that we should
> use super_set_uuid() as other filesystems do.
> 
> Reported-by: Lennart Poettering <lennart@amutable.com>
> Signed-off-by: Alexander Mikhalitsyn <alex@amutable.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Will push it for for-next if no other review.

Thanks,
Qu

> ---
>   fs/btrfs/disk-io.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index d8d433ac458b..fde9f4c4ea11 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -3616,9 +3616,9 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
>   	 * on-disk UUID directly from the super_copy.
>   	 */
>   	if (fs_info->fs_devices->temp_fsid)
> -		memcpy(&sb->s_uuid, fs_info->super_copy->fsid, BTRFS_FSID_SIZE);
> +		super_set_uuid(sb, fs_info->super_copy->fsid, BTRFS_FSID_SIZE);
>   	else
> -		memcpy(&sb->s_uuid, fs_info->fs_devices->fsid, BTRFS_FSID_SIZE);
> +		super_set_uuid(sb, fs_info->fs_devices->fsid, BTRFS_FSID_SIZE);
>   
>   	mutex_lock(&fs_info->chunk_mutex);
>   	ret = btrfs_read_sys_array(fs_info);


  reply	other threads:[~2026-11-24 20:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 15:46 [PATCH] btrfs: use super_set_uuid to support FS_IOC_GETFSUUID Alexander Mikhalitsyn
2026-11-24 20:58 ` Qu Wenruo [this message]
2026-11-25  8:41   ` Alexander Mikhalitsyn

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=b6147b91-d8ef-4fcf-bd87-0bc30f2aa741@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=alex@amutable.com \
    --cc=dsterba@suse.com \
    --cc=lennart@amutable.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mason@kernel.org \
    /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