mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: "Christoph Hellwig" <hch@lst.de>,
	"André Almeida" <andrealmeid@igalia.com>
Cc: Chuck Lever <chuck.lever@oracle.com>,
	Jeff Layton <jlayton@kernel.org>, NeilBrown <neil@brown.name>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
	Carlos Maiolino <cem@kernel.org>,
	Amir Goldstein <amir73il@gmail.com>, Chris Mason <clm@fb.com>,
	David Sterba <dsterba@suse.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Christian Brauner <brauner@kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-btrfs@vger.kernel.org, linux-unionfs@vger.kernel.org,
	kernel-dev@igalia.com
Subject: Re: [PATCH 3/3] ovl: Use real disk UUID for origin file handles
Date: Thu, 15 Jan 2026 17:21:04 +1030	[thread overview]
Message-ID: <633bb5f3-4582-416c-b8b9-fd1f3b3452ab@suse.com> (raw)
In-Reply-To: <20260115062944.GA9590@lst.de>



在 2026/1/15 16:59, Christoph Hellwig 写道:
> On Wed, Jan 14, 2026 at 01:17:15PM -0300, André Almeida wrote:
>> Em 14/01/2026 03:26, Christoph Hellwig escreveu:
>>> On Wed, Jan 14, 2026 at 01:31:43AM -0300, André Almeida wrote:
>>>> Some filesystem, like btrfs, supports mounting cloned images, but assign
>>>> random UUIDs for them to avoid conflicts. This breaks overlayfs "index"
>>>> check, given that every time the same image is mounted, it get's
>>>> assigned a new UUID.
>>>
>>> ... and the fix is to not assign random uuid, but to assign a new uuid
>>> to the cloned image that is persisted.  That might need a new field
>>> to distintguish the stamped into the format uuid from the visible
>>> uuid like the xfs metauuid, but not hacks like this.
>>>
>>
>> How can I create this non random and persisting UUID? I was thinking of
>> doing some operation on top the original UUID, like a circular shift, some
>> sort of rearrangement of the original value that we can always reproduce.
>> Is this in the right direction do you think?
> 
> Just allocate an entirely new uuid?  That's what XFS did with the
> metadata uuid (persistent and stapted into all metadata headers) vs
> user visible uuid that can be changed.

So that means let btrfs to convert the temp fsid into metadata uuid, 
which I think is fine.

But the problem is that will change the fsid of the new fs, which may or 
may not be what's expected for the current temp fsid user (they really 
want two btrfs with the same fsid).


My initial idea for this problem is to let btrfs not generate a tempfsid 
automatically, but put some special flag (e.g. SINGLE_DEV compat ro 
flag) on those fses that want duplicated fsid.

Then for those SINGLE_DEV fses, disable any multi-device related 
features, and use their dev_t to distinguish different fses just like 
EXT4/XFS, without bothering the current tempfsid hack, and just return 
the same fsid.

Unfortunately that idea is not accepted and the current automatic new 
tempfsid solution is merged.

I'm wondering will that behavior (returning the same fsid) be acceptable 
for overlayfs?

If so, I think it's time to revert the behavior before it's too late.
Currently the main usage of such duplicated fsids is for Steam deck to 
maintain A/B partitions, I think they can accept a new compat_ro flag 
for that.

Thanks,
Qu

  reply	other threads:[~2026-01-15  6:51 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14  4:31 [PATCH 0/3] fs: Support btrfs cloned images and overlayfs André Almeida
2026-01-14  4:31 ` [PATCH 1/3] exportfs: Rename get_uuid() to get_disk_uuid() André Almeida
2026-01-14  6:10   ` Darrick J. Wong
2026-01-14  6:24     ` Christoph Hellwig
2026-01-14 10:12       ` Amir Goldstein
2026-01-14 13:11         ` Christoph Hellwig
2026-01-14 16:38         ` André Almeida
2026-01-14 17:58           ` Amir Goldstein
2026-01-14  4:31 ` [PATCH 2/3] btrfs: Implement get_disk_uuid() André Almeida
2026-01-14  4:31 ` [PATCH 3/3] ovl: Use real disk UUID for origin file handles André Almeida
2026-01-14  6:26   ` Christoph Hellwig
2026-01-14 16:17     ` André Almeida
2026-01-15  6:29       ` Christoph Hellwig
2026-01-15  6:51         ` Qu Wenruo [this message]
2026-01-15  7:23           ` Christoph Hellwig
2026-01-15  8:09             ` Qu Wenruo
2026-01-15  8:31               ` Christoph Hellwig
2026-01-15 15:42             ` André Almeida
2026-01-15 16:07               ` Amir Goldstein
2026-01-15 18:55                 ` André Almeida
2026-01-16  9:36                   ` Christoph Hellwig
2026-01-16  9:55                   ` Amir Goldstein
2026-01-16 13:27                     ` André Almeida
2026-01-16 17:06                       ` Amir Goldstein
2026-01-19 16:56                         ` André Almeida
2026-01-20 15:12                           ` Amir Goldstein
2026-01-22 20:07                             ` Amir Goldstein
2026-01-23 13:24                               ` André Almeida
2026-01-23 20:08                                 ` André Almeida
2026-01-24 10:45                                   ` Amir Goldstein
2026-01-28 11:49                                     ` Amir Goldstein
2026-02-05 20:34                                       ` André Almeida
2026-02-06 13:12                                         ` Amir Goldstein
2026-02-16 14:59                                           ` André Almeida
2026-02-17 13:26                                             ` Amir Goldstein
2026-01-15 16:08               ` Christoph Hellwig
2026-01-14 17:54   ` Amir Goldstein
2026-01-15  6:36     ` Christoph Hellwig

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=633bb5f3-4582-416c-b8b9-fd1f3b3452ab@suse.com \
    --to=wqu@suse.com \
    --cc=Dai.Ngo@oracle.com \
    --cc=amir73il@gmail.com \
    --cc=andrealmeid@igalia.com \
    --cc=brauner@kernel.org \
    --cc=cem@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=kernel-dev@igalia.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®