Re: [RFC PATCH 1/1] ovl: Use fsid as unique identifier for trusted origin

From: André Almeida

Date: Tue Oct 14 2025 - 13:55:38 EST


On 10/14/25 14:40, David Sterba wrote:
On Tue, Oct 14, 2025 at 03:43:54PM +1030, Qu Wenruo wrote:
在 2025/10/14 15:09, Christoph Hellwig 写道:
On Mon, Oct 13, 2025 at 10:57:07PM -0300, André Almeida wrote:
Some filesystem have non-persistent UUIDs, that can change between
mounting, even if the filesystem is not modified. To prevent
false-positives when mounting overlayfs with index enabled, use the fsid
reported from statfs that is persistent across mounts.
Please fix btrfs to not change uuids, as that completely defeats the
point of uuids.

That is the temp-fsid feature from Anand, introduced by commit
a5b8a5f9f835 ("btrfs: support cloned-device mount capability").

I'm not 100% sure if it's really that important to support mounting
cloned devices in the first place, as LVM will reject activating any LVs
if there is even conflicting VGs names, not to mention conflicting UUIDs.

If temp-fsid is causing problems with overlayfs, I'm happy to remove it,
as this really looks like a niche that no one is asking.
What do you mean no one asking? This was specifically asked for by
Steam to do A/B root partition mounts for recovery. It is a niche use
case but it has its users.
That's right, I've come across the issue reported here while working with SteamOS partitions, so it's being used. The original thread for this feature has more information about the use case: https://lore.kernel.org/linux-btrfs/20230504170708.787361-1-gpiccoli@xxxxxxxxxx/