Re: [PATCH 1/3] exportfs: Rename get_uuid() to get_disk_uuid()

From: Christoph Hellwig

Date: Wed Jan 14 2026 - 08:11:39 EST


On Wed, Jan 14, 2026 at 11:12:17AM +0100, Amir Goldstein wrote:
> In the context of overlayfs index and "origin" xattr, this is exactly what is
> needed - to validate that the object's copy up source is reliable for
> the generation of a unique overlayfs object id.

And that's what is in sb->s_uuid. And it better be persistent.

> TBH, I am not sure if the file handle domain is invariant to XFS admin
> change of uuid. How likely it is to get an identical file handles for two
> different objects, with XFS fs which have diverged by an LVM clone?
> I think it's quite likely.

Of course it is, unlike you explicitly change it using xfs_admin. Note
that to even mount two clones/snapshots you need to mount with nouuid,
so it doesn't happen accidentally.

> Whether or not we should repurpose the existing get_uuid() I don't
> know - that depends whether pNFS expects the same UUID from an
> "xfs clone" as overlayfs would.

That method does not just return an uuid, but in fact a uniqueue
identifier of the file systems choice and the offset/len where to
look for it on disk, as that is how pnfs/block finds the matching
device. It is a dangerous concept and should not spread further.