All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: use super_set_uuid to support FS_IOC_GETFSUUID
@ 2026-11-24 15:46 Alexander Mikhalitsyn
  2026-11-24 20:58 ` Qu Wenruo
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Mikhalitsyn @ 2026-11-24 15:46 UTC (permalink / raw)
  To: dsterba; +Cc: mason, Alexander Mikhalitsyn, Lennart Poettering, linux-btrfs

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>
---
 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);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-25  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-11-25  8:41   ` Alexander Mikhalitsyn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.