mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@igalia.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
	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>, 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,
	Qu Wenruo <wqu@suse.com>,
	linux-btrfs@vger.kernel.org, linux-unionfs@vger.kernel.org,
	kernel-dev@igalia.com, vivek@collabora.com,
	Ludovico de Nittis <ludovico.denittis@collabora.com>
Subject: Re: [PATCH 3/3] ovl: Use real disk UUID for origin file handles
Date: Thu, 5 Feb 2026 17:34:42 -0300	[thread overview]
Message-ID: <05c37282-715e-4334-82e6-aea3241f15eb@igalia.com> (raw)
In-Reply-To: <CAOQ4uxhHFvYNAgES9wpM_C-7GvfwXC2xet1ensfeQOyPJRAuNQ@mail.gmail.com>

Em 28/01/2026 08:49, Amir Goldstein escreveu:
> On Sat, Jan 24, 2026 at 11:45 AM Amir Goldstein <amir73il@gmail.com> wrote:
>>
>> On Fri, Jan 23, 2026 at 9:08 PM André Almeida <andrealmeid@igalia.com> wrote:
>>>
>>> Em 23/01/2026 10:24, André Almeida escreveu:
>>>>
>>>> Em 22/01/2026 17:07, Amir Goldstein escreveu:
>>>>> On Tue, Jan 20, 2026 at 4:12 PM Amir Goldstein <amir73il@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> On Mon, Jan 19, 2026 at 5:56 PM André Almeida
>>>>>> <andrealmeid@igalia.com> wrote:
>>>>>>>
>>>>> ...
>>>>>>> Actually they are not in the same fs, upper and lower are coming from
>>>>>>> different fs', so when trying to mount I get the fallback to
>>>>>>> `uuid=null`. A quick hack circumventing this check makes the mount
>>>>>>> work.
>>>>>>>
>>>>>>> If you think this is the best way to solve this issue (rather than
>>>>>>> following the VFS helper path for instance),
>>>>>>
>>>>>> That's up to you if you want to solve the "all lower layers on same fs"
>>>>>> or want to also allow lower layers on different fs.
>>>>>> The former could be solved by relaxing the ovl rules.
>>>>>>
>>>>>>> please let me know how can
>>>>>>> I safely lift this restriction, like maybe adding a new flag for this?
>>>>>>
>>>>>> I think the attached patch should work for you and should not
>>>>>> break anything.
>>>>>>
>>>>>> It's only sanity tested and will need to write tests to verify it.
>>>>>>
>>>>>
>>>>> Andre,
>>>>>
>>>>> I tested the patch and it looks good on my side.
>>>>> If you want me to queue this patch for 7.0,
>>>>> please let me know if it addresses your use case.
>>>>>
>>>>
>>>> Hi Amir,
>>>>
>>>> I'm still testing it to make sure it works my case, I will return to you
>>>> ASAP. Thanks for the help!
>>>>
>>>
>>> So, your patch wasn't initially working in my setup here, and after some
>>> debugging it turns out that on ovl_verify_fh() *fh would have a NULL
>>> UUID, but *ofh would have a valid UUID, so the compare would then fail.
>>>
>>> Adding this line at ovl_get_fh() fixed the issue for me and made the
>>> patch work as I was expecting:
>>>
>>> +       if (!ovl_origin_uuid(ofs))
>>> +               fh->fb.uuid = uuid_null;
>>> +
>>>           return fh;
>>>
>>> Please let me know if that makes sense to you.
>>
>> It does not make sense to me.
>> I think you may be using the uuid=off feature in the wrong way.
>> What you did was to change the stored UUID, but this NOT the
>> purpose of uuid=off.
>>
>> The purpose of uuid=off is NOT to allow mounting an overlayfs
>> that was previously using a different lower UUID.
>> The purpose is to mount overlayfs the from the FIRST time with
>> uuid=off so that ovl_verify_origin_fh() gets null uuid from the
>> first call that sets the ORIGIN xattr.
>>
>> IOW, if user want to be able to change underlying later UUID
>> user needs to declare from the first overlayfs mount that this
>> is expected to happen, otherwise, overlayfs will assume that
>> an unintentional wrong configuration was used.
>>
>> I updated the documentation to try to explain this better:
>>
>> Is my understanding of the problems you had correct?
>> Is my solution understood and applicable to your use case?
>>
> 
> Hi Andre,
> 
> Sorry to nag you, but if you'd like me to queue the suggested change to 7.0,
> I would need your feedback soon.
> 

Hey Amir, sorry for my delay. I just had a week out of the office and 
just got back to this.

Our initial test case worked great! We managed to mount both images and 
use overlayfs without a problem after your clarification of where to use 
uuid=off, which should be on the first mount.

However, when rebooting to the other partition, the mount failed with 
"failed to verify upper root origin" again, but I believe that I forgot 
to add `uuid=off` somewhere in the mount scripts. I'm still debugging this.

Anyhow, I see that we are now too close to the merge window, and from my 
side we can delay this for 7.1 and merge it when it gets 100% clear that 
this is the solution that we are looking for.

Thanks again for your help!
	André

> FWIW, I think that this change of restrictions for uuid=null could be backported
> to stable kernels, but I am not going to mark it for auto select, because
> I'd rather see if anyone shouts with upstream kernel first when (if) we make
> this change and manually backport later per demand.
> 
> Thanks,
> Amir.


  reply	other threads:[~2026-02-05 20:35 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
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 [this message]
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=05c37282-715e-4334-82e6-aea3241f15eb@igalia.com \
    --to=andrealmeid@igalia.com \
    --cc=Dai.Ngo@oracle.com \
    --cc=amir73il@gmail.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=ludovico.denittis@collabora.com \
    --cc=miklos@szeredi.hu \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vivek@collabora.com \
    --cc=wqu@suse.com \
    /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®