linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* userns mount and metacopy redirects (Was: Re: [PATCH v3 0/6] Composefs: an opportunistically sharing verified image filesystem)
       [not found]                               ` <CAOQ4uxiZ4iB82F4i2zMPcyCB8EBFGObdAoBEcar0KE7sA5BoNA@mail.gmail.com>
@ 2023-01-26  5:26                                 ` Amir Goldstein
  2023-01-26  8:22                                   ` Christian Brauner
  0 siblings, 1 reply; 8+ messages in thread
From: Amir Goldstein @ 2023-01-26  5:26 UTC (permalink / raw)
  To: Giuseppe Scrivano
  Cc: Alexander Larsson, Christian Brauner, Vivek Goyal,
	Miklos Szeredi, overlayfs

[spawning overlayfs sub-topic]

On Wed, Jan 25, 2023 at 10:29 PM Amir Goldstein <amir73il@gmail.com> wrote:
>
> On Wed, Jan 25, 2023 at 10:23 PM Amir Goldstein <amir73il@gmail.com> wrote:
> >
> > On Wed, Jan 25, 2023 at 9:45 PM Giuseppe Scrivano <gscrivan@redhat.com> wrote:
> > >
> > > Amir Goldstein <amir73il@gmail.com> writes:
> > >
> > > >> >> I previously mentioned my wish of using it from a user namespace, the
> > > >> >> goal seems more challenging with EROFS or any other block devices.  I

For those who are starting to read here, the context is userns mounting
of overlayfs with a lower EROFS layer containing metacopy references to
lower data blobs in another fs (a.k.a the composefs model).

IMO, mounting a readonly image of whatever on-disk format
is a very high risk for userns mount.
A privileged mount helper that verifies and mounts the EROFS
layer sounds like a more feasible solution.

> > > >> >> don't know about the difficulty of getting overlay metacopy working in a
> > > >> >> user namespace, even though it would be helpful for other use cases as
> > > >> >> well.
> > > >> >>
> > > >> >
> > > >> > There is no restriction of metacopy in user namespace.
> > > >> > overlayfs needs to be mounted with -o userxattr and the overlay
> > > >> > xattrs needs to use user.overlay. prefix.
> > > >>
> > > >> if I specify both userxattr and metacopy=on then the mount ends up in
> > > >> the following check:
> > > >>
> > > >> if (config->userxattr) {
> > > >>         [...]
> > > >>         if (config->metacopy && metacopy_opt) {
> > > >>                 pr_err("conflicting options: userxattr,metacopy=on\n");
> > > >>                 return -EINVAL;
> > > >>         }
> > > >> }
> > > >>
> > > >
> > > > Right, my bad.
> > > >
> > > >> to me it looks like it was done on purpose to prevent metacopy from a
> > > >> user namespace, but I don't know the reason for sure.
> > > >>
> > > >
> > > > With hand crafted metacopy, an unpriv user can chmod
> > > > any files to anything by layering another file with different
> > > > mode on top of it....
> > >
> > > I might be missing something obvious about metacopy, so please correct
> > > me if I am wrong, but I don't see how it is any different than just
> > > copying the file and chowning it.  Of course, as long as overlay uses
> > > the same security model so that a file that wasn't originally possible
> > > to access must be still blocked, even if referenced through metacopy.
> > >
> >
> > You're right.
> > The reason for mutual exclusion maybe related to the
> > comment in ovl_check_metacopy_xattr() about EACCES.
> > Need to check with Vivek or Miklos.
> >
> > But get this - you do not need metacopy=on to follow lower inode.
> > It should work without metacopy=on.
> > metacopy=on only instructs overlayfs whether to copy up data
> > or only metadata when changing metadata of lower object, so it is
> > not relevant for readonly mount.
> >
>
> However, you do need redirect=follow and that one is only mutually
> exclusive with userxattr.
> Again, need to ask Miklos whether that could be relaxed under
> some conditions.
>

I can see some possible problems with userns mount and redirect:
- referencing same dir inode from different paths
- referencing same inode from different paths with
  wrong nlink and inconsistent metadata

However, I think a mode that only follows a redirect from a
lower metacopy file to its data should be safe for userns mount.

In this special case (lower metacopy file) we may also be able to
implement the lazy lookup of the data file on open to optimize
'find' performance, but need to figure out what to do with st_blocks
of stat() in that case.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: userns mount and metacopy redirects (Was: Re: [PATCH v3 0/6] Composefs: an opportunistically sharing verified image filesystem)
  2023-01-26  5:26                                 ` userns mount and metacopy redirects (Was: Re: [PATCH v3 0/6] Composefs: an opportunistically sharing verified image filesystem) Amir Goldstein
@ 2023-01-26  8:22                                   ` Christian Brauner
  0 siblings, 0 replies; 8+ messages in thread
From: Christian Brauner @ 2023-01-26  8:22 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Giuseppe Scrivano, Alexander Larsson, Vivek Goyal,
	Miklos Szeredi, overlayfs

On Thu, Jan 26, 2023 at 07:26:49AM +0200, Amir Goldstein wrote:
> [spawning overlayfs sub-topic]
> 
> On Wed, Jan 25, 2023 at 10:29 PM Amir Goldstein <amir73il@gmail.com> wrote:
> >
> > On Wed, Jan 25, 2023 at 10:23 PM Amir Goldstein <amir73il@gmail.com> wrote:
> > >
> > > On Wed, Jan 25, 2023 at 9:45 PM Giuseppe Scrivano <gscrivan@redhat.com> wrote:
> > > >
> > > > Amir Goldstein <amir73il@gmail.com> writes:
> > > >
> > > > >> >> I previously mentioned my wish of using it from a user namespace, the
> > > > >> >> goal seems more challenging with EROFS or any other block devices.  I
> 
> For those who are starting to read here, the context is userns mounting
> of overlayfs with a lower EROFS layer containing metacopy references to
> lower data blobs in another fs (a.k.a the composefs model).
> 
> IMO, mounting a readonly image of whatever on-disk format
> is a very high risk for userns mount.
> A privileged mount helper that verifies and mounts the EROFS
> layer sounds like a more feasible solution.

Very much agreed. This filesystem specific userns mountable stuff where
filesystems with any kind of on-disk format guarantees the safety is not
something we should support.

I'm starting to think about how to make it possible for a privileged
process to delegate/allow a filesystem mount to an unprivileged one. The
policy belongs in userspace. Something which I've talked about before a
few years ago but now I actually have time to work on this.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 0/6] Composefs: an opportunistically sharing verified image filesystem
       [not found]                                               ` <CAOQ4uxg=1zSyTBZ-0_q=5PVuqs=4yQiMQJr1tNk7Kytxv=vuvA@mail.gmail.com>
@ 2023-02-06 18:17                                                 ` Amir Goldstein
  2023-04-03 19:00                                                 ` Lazy lowerdata lookup and data-only layers (Was: Re: Composefs:) Amir Goldstein
  1 sibling, 0 replies; 8+ messages in thread
From: Amir Goldstein @ 2023-02-06 18:17 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: Alexander Larsson, gscrivan, brauner, linux-fsdevel,
	linux-kernel, david, viro, Vivek Goyal, Josef Bacik, Gao Xiang,
	Jingbo Xu, overlayfs

[+overlayfs list]

On Mon, Feb 6, 2023 at 7:16 PM Amir Goldstein <amir73il@gmail.com> wrote:
>
> On Mon, Feb 6, 2023 at 6:34 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
> >
> > On Mon, 6 Feb 2023 at 14:31, Amir Goldstein <amir73il@gmail.com> wrote:
> > >
> > > > > > My little request again, could you help benchmark on your real workload
> > > > > > rather than "ls -lR" stuff?  If your hard KPI is really what as you
> > > > > > said, why not just benchmark the real workload now and write a detailed
> > > > > > analysis to everyone to explain it's a _must_ that we should upstream
> > > > > > a new stacked fs for this?
> > > > > >
> > > > >
> > > > > I agree that benchmarking the actual KPI (boot time) will have
> > > > > a much stronger impact and help to build a much stronger case
> > > > > for composefs if you can prove that the boot time difference really matters.
> > > > >
> > > > > In order to test boot time on fair grounds, I prepared for you a POC
> > > > > branch with overlayfs lazy lookup:
> > > > > https://github.com/amir73il/linux/commits/ovl-lazy-lowerdata
> > > >
> > > > Sorry about being late to the party...
> > > >
> > > > Can you give a little detail about what exactly this does?
> > > >
> > >
> > > Consider a container image distribution system, with base images
> > > and derived images and instruction on how to compose these images
> > > using overlayfs or other methods.
> > >
> > > Consider a derived image L3 that depends on images L2, L1.
> > >
> > > With the composefs methodology, the image distribution server splits
> > > each image is split into metadata only (metacopy) images M3, M2, M1
> > > and their underlying data images containing content addressable blobs
> > > D3, D2, D1.
> > >
> > > The image distribution server goes on to merge the metadata layers
> > > on the server, so U3 = M3 + M2 + M1.
> > >
> > > In order to start image L3, the container client will unpack the data layers
> > > D3, D2, D1 to local fs normally, but the server merged U3 metadata image
> > > will be distributed as a read-only fsverity signed image that can be mounted
> > > by mount -t composefs U3.img (much like mount -t erofs -o loop U3.img).
> > >
> > > The composefs image format contains "redirect" instruction to the data blob
> > > path and an fsverity signature that can be used to verify the redirected data
> > > content.
> > >
> > > When composefs authors proposed to merge composefs, Gao and me
> > > pointed out that the same functionality can be achieved with minimal changes
> > > using erofs+overlayfs.
> > >
> > > Composefs authors have presented ls -lR time and memory usage benchmarks
> > > that demonstrate how composefs performs better that erofs+overlayfs in
> > > this workload and explained that the lookup of the data blobs is what takes
> > > the extra time and memory in the erofs+overlayfs ls -lR test.
> > >
> > > The lazyfollow POC optimizes-out the lowerdata lookup for the ls -lR
> > > benchmark, so that composefs could be compared to erofs+overlayfs.
> >
> > Got it, thanks.
> >
> > >
> > > To answer Alexander's question:
> > >
> > > > Cool. I'll play around with this. Does this need to be an opt-in
> > > > option in the final version? It feels like this could be useful to
> > > > improve performance in general for overlayfs, for example when
> > > > metacopy is used in container layers.
> > >
> > > I think lazyfollow could be enabled by default after we hashed out
> > > all the bugs and corner cases and most importantly remove the
> > > POC limitation of lower-only overlay.
> > >
> > > The feedback that composefs authors are asking from you
> > > is whether you will agree to consider adding the "lazyfollow
> > > lower data" optimization and "fsverity signature for metacopy"
> > > feature to overlayfs?
> > >
> > > If you do agree, the I think they should invest their resources
> > > in making those improvements to overlayfs and perhaps
> > > other improvements to erofs, rather than proposing a new
> > > specialized filesystem.
> >
> > Lazy follow seems to make sense.  Why does it need to be optional?
>
> It doesn't.
>
> > Does it have any advantage to *not* do lazy follow?
> >
>
> Not that I can think of.
>
> > Not sure I follow the fsverity requirement.  For overlay+erofs case
> > itsn't it enough to verify the erofs image?
> >
>
> it's not overlay{erofs+erofs}
> it's overlay{erofs+ext4} (or another fs-verity [1] supporting fs)
> the lower layer is a mutable fs with /objects/ dir containing
> the blobs.
>
> The way to ensure the integrity of erofs is to setup dm-verity at
> erofs mount time.
>
> The way to ensure the integrity of the blobs is to store an fs-verity
> signature of each blob file in trusted.overlay.verify xattr on the
> metacopy and for overlayfs to enable fsverity on the blob file before
> allowing access to the lowerdata.
>

Perhaps I should have mentioned that the lower /objects dir, despite
being mutable (mostly append-only) is shared among several overlays.

This technically breaks the law of no modification to lower layer,
but the /objects dir itself is a whiteout in the metadata layer, so
the blobs are only accessible via absolute path redirect and there
is no /objects overlay dir, so there is no readdir cache to invalidate.
Naturally, the content addressable blobs are not expected to be
renamed/unlinked while an overlayfs that references them is mounted.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Lazy lowerdata lookup and data-only layers (Was: Re: Composefs:)
       [not found]                                               ` <CAOQ4uxg=1zSyTBZ-0_q=5PVuqs=4yQiMQJr1tNk7Kytxv=vuvA@mail.gmail.com>
  2023-02-06 18:17                                                 ` [PATCH v3 0/6] Composefs: an opportunistically sharing verified image filesystem Amir Goldstein
@ 2023-04-03 19:00                                                 ` Amir Goldstein
  2023-04-11 15:50                                                   ` Miklos Szeredi
  1 sibling, 1 reply; 8+ messages in thread
From: Amir Goldstein @ 2023-04-03 19:00 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Alexander Larsson, overlayfs

> > >
> > > I think lazyfollow could be enabled by default after we hashed out
> > > all the bugs and corner cases and most importantly remove the
> > > POC limitation of lower-only overlay.
> > >
[...]
> > >
> >
> > Lazy follow seems to make sense.  Why does it need to be optional?
>
> It doesn't.
>
> > Does it have any advantage to *not* do lazy follow?
> >
>
> Not that I can think of.

Miklos,

I completed writing the lazy lookup patches [1].

It wasn't trivial and the first versions had many traps that took time to
trip on, so I've made some design choices to make it safer and easier to
land an initial improvement that will cater the composefs use case.

The main design choice has to do with making lazy lowerdata lookup
completely opt-in by defining a new type of data-only layers, such as
the content addressable lower layer of composefs.
The request for the data-only layers came from Alexander.

The current patches only do lazy lookup in data-only layers and the lookup
in data-only layers is always lazy.

Data-only layers have some other advantages, for example, multiple
data-only uuid-less layers are allowed.
Please see the text below taken from the patches.

What do you think about this direction?

Alexander has started to test these patches.
If he finds no issues and if you have no objections to the concept,
then I will post the patches for wider review.

Thanks,
Amir.

[1] https://github.com/amir73il/linux/commits/ovl-lazy-lowerdata-rc2

Data-only lower layers
----------------------

With "metacopy" feature enabled, an overlayfs regular file may be a
composition of information from up to three different layers:

 1) metadata from a file in the upper layer

 2) st_ino and st_dev object identifier from a file in a lower layer

 3) data from a file in another lower layer (further below)

The "lower data" file can be on any lower layer, except from the top most
lower layer.

Below the top most lower layer, any number of lower most layers may be
defined as "data-only" lower layers, using the double collon ("::") separator.

For example:

  mount -t overlay overlay -olowerdir=/lower1::/lower2:/lower3 /merged

The paths of files in the "data-only" lower layers are not visible in the
merged overlayfs directories and the metadata and st_ino/st_dev of files
in the "data-only" lower layers are not visible in overlayfs inodes.

Only the data of the files in the "data-only" lower layers may be visible
when a "metacopy" file in one of the lower layers above it, has a "redirect"
to the absolute path of the "lower data" file in the "data-only" lower layer.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Lazy lowerdata lookup and data-only layers (Was: Re: Composefs:)
  2023-04-03 19:00                                                 ` Lazy lowerdata lookup and data-only layers (Was: Re: Composefs:) Amir Goldstein
@ 2023-04-11 15:50                                                   ` Miklos Szeredi
  2023-04-12 14:06                                                     ` Amir Goldstein
  0 siblings, 1 reply; 8+ messages in thread
From: Miklos Szeredi @ 2023-04-11 15:50 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: Alexander Larsson, overlayfs

On Mon, 3 Apr 2023 at 21:00, Amir Goldstein <amir73il@gmail.com> wrote:
>
> > > >
> > > > I think lazyfollow could be enabled by default after we hashed out
> > > > all the bugs and corner cases and most importantly remove the
> > > > POC limitation of lower-only overlay.
> > > >
> [...]
> > > >
> > >
> > > Lazy follow seems to make sense.  Why does it need to be optional?
> >
> > It doesn't.
> >
> > > Does it have any advantage to *not* do lazy follow?
> > >
> >
> > Not that I can think of.
>
> Miklos,
>
> I completed writing the lazy lookup patches [1].
>
> It wasn't trivial and the first versions had many traps that took time to
> trip on, so I've made some design choices to make it safer and easier to
> land an initial improvement that will cater the composefs use case.
>
> The main design choice has to do with making lazy lowerdata lookup
> completely opt-in by defining a new type of data-only layers, such as
> the content addressable lower layer of composefs.
> The request for the data-only layers came from Alexander.
>
> The current patches only do lazy lookup in data-only layers and the lookup
> in data-only layers is always lazy.
>
> Data-only layers have some other advantages, for example, multiple
> data-only uuid-less layers are allowed.
> Please see the text below taken from the patches.
>
> What do you think about this direction?
>
> Alexander has started to test these patches.
> If he finds no issues and if you have no objections to the concept,
> then I will post the patches for wider review.
>
>
> Thanks,
> Amir.
>
> [1] https://github.com/amir73il/linux/commits/ovl-lazy-lowerdata-rc2
>
> Data-only lower layers
> ----------------------
>
> With "metacopy" feature enabled, an overlayfs regular file may be a
> composition of information from up to three different layers:
>
>  1) metadata from a file in the upper layer
>
>  2) st_ino and st_dev object identifier from a file in a lower layer
>
>  3) data from a file in another lower layer (further below)
>
> The "lower data" file can be on any lower layer, except from the top most
> lower layer.
>
> Below the top most lower layer, any number of lower most layers may be
> defined as "data-only" lower layers, using the double collon ("::") separator.
>
> For example:
>
>   mount -t overlay overlay -olowerdir=/lower1::/lower2:/lower3 /merged

What are the rules?

Is "do1::do2::lower" allowed?
Is "do1::lower1:do2::lower2 allowed?

>
> The paths of files in the "data-only" lower layers are not visible in the
> merged overlayfs directories and the metadata and st_ino/st_dev of files
> in the "data-only" lower layers are not visible in overlayfs inodes.
>
> Only the data of the files in the "data-only" lower layers may be visible
> when a "metacopy" file in one of the lower layers above it, has a "redirect"
> to the absolute path of the "lower data" file in the "data-only" lower layer.

Okay.

Thanks,
Miklos

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Lazy lowerdata lookup and data-only layers (Was: Re: Composefs:)
  2023-04-11 15:50                                                   ` Miklos Szeredi
@ 2023-04-12 14:06                                                     ` Amir Goldstein
  2023-04-12 14:20                                                       ` Miklos Szeredi
  0 siblings, 1 reply; 8+ messages in thread
From: Amir Goldstein @ 2023-04-12 14:06 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Alexander Larsson, overlayfs

On Tue, Apr 11, 2023 at 6:50 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> On Mon, 3 Apr 2023 at 21:00, Amir Goldstein <amir73il@gmail.com> wrote:
> >
> > > > >
> > > > > I think lazyfollow could be enabled by default after we hashed out
> > > > > all the bugs and corner cases and most importantly remove the
> > > > > POC limitation of lower-only overlay.
> > > > >
> > [...]
> > > > >
> > > >
> > > > Lazy follow seems to make sense.  Why does it need to be optional?
> > >
> > > It doesn't.
> > >
> > > > Does it have any advantage to *not* do lazy follow?
> > > >
> > >
> > > Not that I can think of.
> >
> > Miklos,
> >
> > I completed writing the lazy lookup patches [1].
> >
> > It wasn't trivial and the first versions had many traps that took time to
> > trip on, so I've made some design choices to make it safer and easier to
> > land an initial improvement that will cater the composefs use case.
> >
> > The main design choice has to do with making lazy lowerdata lookup
> > completely opt-in by defining a new type of data-only layers, such as
> > the content addressable lower layer of composefs.
> > The request for the data-only layers came from Alexander.
> >
> > The current patches only do lazy lookup in data-only layers and the lookup
> > in data-only layers is always lazy.
> >
> > Data-only layers have some other advantages, for example, multiple
> > data-only uuid-less layers are allowed.
> > Please see the text below taken from the patches.
> >
> > What do you think about this direction?
> >
> > Alexander has started to test these patches.
> > If he finds no issues and if you have no objections to the concept,
> > then I will post the patches for wider review.
> >
> >
> > Thanks,
> > Amir.
> >
> > [1] https://github.com/amir73il/linux/commits/ovl-lazy-lowerdata-rc2
> >
> > Data-only lower layers
> > ----------------------
> >
> > With "metacopy" feature enabled, an overlayfs regular file may be a
> > composition of information from up to three different layers:
> >
> >  1) metadata from a file in the upper layer
> >
> >  2) st_ino and st_dev object identifier from a file in a lower layer
> >
> >  3) data from a file in another lower layer (further below)
> >
> > The "lower data" file can be on any lower layer, except from the top most
> > lower layer.
> >
> > Below the top most lower layer, any number of lower most layers may be
> > defined as "data-only" lower layers, using the double collon ("::") separator.
> >
> > For example:
> >
> >   mount -t overlay overlay -olowerdir=/lower1::/lower2:/lower3 /merged
>
> What are the rules?
>
> Is "do1::do2::lower" allowed?
> Is "do1::lower1:do2::lower2 allowed?
>

To elaborate:

lowerdir="lo1:lo2:lo3::do1:do2:do3" is allowed

:: must have non-zero lower layers on the left side
and non-zero data-only layers on the right side.

Actually, this feature originates from a request from Alexander to
respect opaque root dir in lower layers, but I preferred to make this
change of behavior opt-in so it can be tested by userspace.

I took it one step further than the opaque root dir request -
the lookup in data-only is a generic vfs_path_lookup() of an
absolute path redirect from one of the lowerdirs, with no
checking of redirect/metacopy/opque xattrs.

And then I only implemented lazy lookup for the lookup
in those new data-only layers, which made things simpler.
Please see the patches I just posted for details [1].

Thanks,
Amir.

[1] https://lore.kernel.org/linux-unionfs/20230412135412.1684197-1-amir73il@gmail.com/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Lazy lowerdata lookup and data-only layers (Was: Re: Composefs:)
  2023-04-12 14:06                                                     ` Amir Goldstein
@ 2023-04-12 14:20                                                       ` Miklos Szeredi
  2023-04-12 15:41                                                         ` Amir Goldstein
  0 siblings, 1 reply; 8+ messages in thread
From: Miklos Szeredi @ 2023-04-12 14:20 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: Alexander Larsson, overlayfs

On Wed, 12 Apr 2023 at 16:07, Amir Goldstein <amir73il@gmail.com> wrote:

> To elaborate:
>
> lowerdir="lo1:lo2:lo3::do1:do2:do3" is allowed
>
> :: must have non-zero lower layers on the left side
> and non-zero data-only layers on the right side.

Okay.   Can you please add this to the documentation?

>
> Actually, this feature originates from a request from Alexander to
> respect opaque root dir in lower layers, but I preferred to make this
> change of behavior opt-in so it can be tested by userspace.

Not sure I get that.  Does "opaque root dir" mean that only absolute
redirects can access layers below such a layer?

I guess that's not something that works today.  Or am I mistaken?

I also don't get what you mean by testing in userspace.  Can you ellaborate?

>
> I took it one step further than the opaque root dir request -
> the lookup in data-only is a generic vfs_path_lookup() of an
> absolute path redirect from one of the lowerdirs, with no
> checking of redirect/metacopy/opque xattrs.
>
> And then I only implemented lazy lookup for the lookup
> in those new data-only layers, which made things simpler.

Okay, makes sense.  If someone hits this limitation, then we can
always start thinking about generalizing this feature.

> Please see the patches I just posted for details [1].

Will do.

Thanks,
Miklos

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Lazy lowerdata lookup and data-only layers (Was: Re: Composefs:)
  2023-04-12 14:20                                                       ` Miklos Szeredi
@ 2023-04-12 15:41                                                         ` Amir Goldstein
  0 siblings, 0 replies; 8+ messages in thread
From: Amir Goldstein @ 2023-04-12 15:41 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Alexander Larsson, overlayfs

On Wed, Apr 12, 2023 at 5:21 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> On Wed, 12 Apr 2023 at 16:07, Amir Goldstein <amir73il@gmail.com> wrote:
>
> > To elaborate:
> >
> > lowerdir="lo1:lo2:lo3::do1:do2:do3" is allowed
> >
> > :: must have non-zero lower layers on the left side
> > and non-zero data-only layers on the right side.
>
> Okay.   Can you please add this to the documentation?
>

OK.

> >
> > Actually, this feature originates from a request from Alexander to
> > respect opaque root dir in lower layers, but I preferred to make this
> > change of behavior opt-in so it can be tested by userspace.
>
> Not sure I get that.  Does "opaque root dir" mean that only absolute
> redirects can access layers below such a layer?

Yes, that's what he wanted. to hide the subdirs being redirected to
from the namespace.

>
> I guess that's not something that works today.  Or am I mistaken?

You are not mistaken, it is not working today.

>
> I also don't get what you mean by testing in userspace.  Can you ellaborate?
>
> >
> > I took it one step further than the opaque root dir request -
> > the lookup in data-only is a generic vfs_path_lookup() of an
> > absolute path redirect from one of the lowerdirs, with no
> > checking of redirect/metacopy/opque xattrs.
> >
> > And then I only implemented lazy lookup for the lookup
> > in those new data-only layers, which made things simpler.
>
> Okay, makes sense.  If someone hits this limitation, then we can
> always start thinking about generalizing this feature.

Yap, that's what I thought.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-04-12 15:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1674227308.git.alexl@redhat.com>
     [not found] ` <CAOQ4uxgGc33_QVBXMbQTnmbpHio4amv=W7ax2vQ1UMet0k_KoA@mail.gmail.com>
     [not found]   ` <1ea88c8d1e666b85342374ed7c0ddf7d661e0ee1.camel@redhat.com>
     [not found]     ` <CAOQ4uxinsBB-LpGh4h44m6Afv0VT5yWRveDG7sNvE2uJyEGOkg@mail.gmail.com>
     [not found]       ` <5fb32a1297821040edd8c19ce796fc0540101653.camel@redhat.com>
     [not found]         ` <CAOQ4uxhGX9NVxwsiBMP0q21ZRot6-UA0nGPp1wGNjgmKBjjBBA@mail.gmail.com>
     [not found]           ` <20230125041835.GD937597@dread.disaster.area>
     [not found]             ` <CAOQ4uxhqdjRbNFs_LohwXdTpE=MaFv-e8J3D2R57FyJxp_f3nA@mail.gmail.com>
     [not found]               ` <87wn5ac2z6.fsf@redhat.com>
     [not found]                 ` <CAOQ4uxiPLHHnr2=XH4gN4bAjizH-=4mbZMe_sx99FKuPo-fDMQ@mail.gmail.com>
     [not found]                   ` <87o7qmbxv4.fsf@redhat.com>
     [not found]                     ` <CAOQ4uximBLqXDtq9vDhqR__1ctiiOMhMd03HCFUR_Bh_JFE-UQ@mail.gmail.com>
     [not found]                       ` <87fsbybvzq.fsf@redhat.com>
     [not found]                         ` <CAOQ4uxgos8m72icX+u2_6Gh7eMmctTTt6XZ=BRt3VzeOZH+UuQ@mail.gmail.com>
     [not found]                           ` <87wn5a9z4m.fsf@redhat.com>
     [not found]                             ` <CAOQ4uxi7GHVkaqxsQV6ninD9fhvMAPk1xFRM2aMRFXQZUV-s3Q@mail.gmail.com>
     [not found]                               ` <CAOQ4uxiZ4iB82F4i2zMPcyCB8EBFGObdAoBEcar0KE7sA5BoNA@mail.gmail.com>
2023-01-26  5:26                                 ` userns mount and metacopy redirects (Was: Re: [PATCH v3 0/6] Composefs: an opportunistically sharing verified image filesystem) Amir Goldstein
2023-01-26  8:22                                   ` Christian Brauner
     [not found]           ` <b8601c976d6e5d3eccf6ef489da9768ad72f9571.camel@redhat.com>
     [not found]             ` <e840d413-c1a7-d047-1a63-468b42571846@linux.alibaba.com>
     [not found]               ` <2ef122849d6f35712b56ffbcc95805672980e185.camel@redhat.com>
     [not found]                 ` <8ffa28f5-77f6-6bde-5645-5fb799019bca@linux.alibaba.com>
     [not found]                   ` <51d9d1b3-2b2a-9b58-2f7f-f3a56c9e04ac@linux.alibaba.com>
     [not found]                     ` <071074ad149b189661681aada453995741f75039.camel@redhat.com>
     [not found]                       ` <0d2ef9d6-3b0e-364d-ec2f-c61b19d638e2@linux.alibaba.com>
     [not found]                         ` <de57aefc-30e8-470d-bf61-a1cca6514988@linux.alibaba.com>
     [not found]                           ` <CAOQ4uxgS+-MxydqgO8+NQfOs9N881bHNbov28uJYX9XpthPPiw@mail.gmail.com>
     [not found]                             ` <9c8e76a3-a60a-90a2-f726-46db39bc6558@linux.alibaba.com>
     [not found]                               ` <02edb5d6-a232-eed6-0338-26f9a63cfdb6@linux.alibaba.com>
     [not found]                                 ` <3d4b17795413a696b373553147935bf1560bb8c0.camel@redhat.com>
     [not found]                                   ` <CAOQ4uxjNmM81mgKOBJeScnmeR9+jG_aWvDWxAx7w_dGh0XHg3Q@mail.gmail.com>
     [not found]                                     ` <5fbca304-369d-aeb8-bc60-fdb333ca7a44@linux.alibaba.com>
     [not found]                                       ` <CAOQ4uximQZ_DL1atbrCg0bQ8GN8JfrEartxDSP+GB_hFvYQOhg@mail.gmail.com>
     [not found]                                         ` <CAJfpegtRacAoWdhVxCE8gpLVmQege4yz8u11mvXCs2weBBQ4jg@mail.gmail.com>
     [not found]                                           ` <CAOQ4uxiW0=DJpRAu90pJic0qu=pS6f2Eo7v-Uw3pmd0zsvFuuw@mail.gmail.com>
     [not found]                                             ` <CAJfpeguczp-qOWJgsnKqx6CjCJLV49j1BOWs0Yxv93VUsTZ9AQ@mail.gmail.com>
     [not found]                                               ` <CAOQ4uxg=1zSyTBZ-0_q=5PVuqs=4yQiMQJr1tNk7Kytxv=vuvA@mail.gmail.com>
2023-02-06 18:17                                                 ` [PATCH v3 0/6] Composefs: an opportunistically sharing verified image filesystem Amir Goldstein
2023-04-03 19:00                                                 ` Lazy lowerdata lookup and data-only layers (Was: Re: Composefs:) Amir Goldstein
2023-04-11 15:50                                                   ` Miklos Szeredi
2023-04-12 14:06                                                     ` Amir Goldstein
2023-04-12 14:20                                                       ` Miklos Szeredi
2023-04-12 15:41                                                         ` Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).