Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f720d9f authored by Amir Goldstein's avatar Amir Goldstein Committed by Darrick J. Wong
Browse files

xfs: publish UUID in struct super_block



Copy the uuid of the filesystem to struct super_block s_uuid field,
as several other filesystems already do.  Copy regardless of the nouuid
mount option, because other filesystems also do not guaranty uniqueness
of the s_uuid field in super_block struct.

Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 3c378195
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -73,6 +73,10 @@ xfs_uuid_mount(
	uuid_t			*uuid = &mp->m_sb.sb_uuid;
	int			hole, i;

	/* Publish UUID in struct super_block */
	BUILD_BUG_ON(sizeof(mp->m_super->s_uuid) != sizeof(uuid_t));
	memcpy(&mp->m_super->s_uuid, uuid, sizeof(uuid_t));

	if (mp->m_flags & XFS_MOUNT_NOUUID)
		return 0;