* How to support directory opacity in a filesystem for overlayfs to use?
@ 2025-01-14 15:15 David Howells
2025-01-14 15:32 ` Miklos Szeredi
2025-01-14 15:56 ` David Howells
0 siblings, 2 replies; 4+ messages in thread
From: David Howells @ 2025-01-14 15:15 UTC (permalink / raw)
To: mszeredi; +Cc: dhowells, linux-unionfs, linux-kernel
Hi Miklós,
What's the best way for a network filesystem to make a native
directory-is-opaque flag available to the system? Is it best to catch
setxattr/getxattr/removexattr("overlay.opaque") and translate these into the
RPCs to wrangle the flag?
Thanks,
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to support directory opacity in a filesystem for overlayfs to use?
2025-01-14 15:15 How to support directory opacity in a filesystem for overlayfs to use? David Howells
@ 2025-01-14 15:32 ` Miklos Szeredi
2025-01-14 15:56 ` David Howells
1 sibling, 0 replies; 4+ messages in thread
From: Miklos Szeredi @ 2025-01-14 15:32 UTC (permalink / raw)
To: David Howells; +Cc: mszeredi, linux-unionfs, linux-kernel
On Tue, 14 Jan 2025 at 16:15, David Howells <dhowells@redhat.com> wrote:
> What's the best way for a network filesystem to make a native
> directory-is-opaque flag available to the system? Is it best to catch
> setxattr/getxattr/removexattr("overlay.opaque") and translate these into the
> RPCs to wrangle the flag?
I don't know. Out of curiosity, which filesystem is it?
There's "trusted.overlay.opaque" and "user.overlay.opaque" and are
used in different scenarios. There was also talk of making the
"trusted." namespace nest inside user namespaces, but apparently it's
not so important.
Which one would you like to emulate?
Thanks,
Miklos
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to support directory opacity in a filesystem for overlayfs to use?
2025-01-14 15:15 How to support directory opacity in a filesystem for overlayfs to use? David Howells
2025-01-14 15:32 ` Miklos Szeredi
@ 2025-01-14 15:56 ` David Howells
2025-01-14 16:23 ` Miklos Szeredi
1 sibling, 1 reply; 4+ messages in thread
From: David Howells @ 2025-01-14 15:56 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: dhowells, mszeredi, linux-unionfs, linux-kernel
Miklos Szeredi <miklos@szeredi.hu> wrote:
> On Tue, 14 Jan 2025 at 16:15, David Howells <dhowells@redhat.com> wrote:
>
> > What's the best way for a network filesystem to make a native
> > directory-is-opaque flag available to the system? Is it best to catch
> > setxattr/getxattr/removexattr("overlay.opaque") and translate these into the
> > RPCs to wrangle the flag?
>
> I don't know. Out of curiosity, which filesystem is it?
One of the varieties of AFS. Unfortunately, xattrs aren't a thing and can't
easily be added because of the volume transfer and backup protocols and
formats.
> There's "trusted.overlay.opaque" and "user.overlay.opaque" and are
> used in different scenarios. There was also talk of making the
> "trusted." namespace nest inside user namespaces, but apparently it's
> not so important.
>
> Which one would you like to emulate?
Um - I don't know the difference to answer that question.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to support directory opacity in a filesystem for overlayfs to use?
2025-01-14 15:56 ` David Howells
@ 2025-01-14 16:23 ` Miklos Szeredi
0 siblings, 0 replies; 4+ messages in thread
From: Miklos Szeredi @ 2025-01-14 16:23 UTC (permalink / raw)
To: David Howells; +Cc: mszeredi, linux-unionfs, linux-kernel
On Tue, 14 Jan 2025 at 16:56, David Howells <dhowells@redhat.com> wrote:
>
> Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> > On Tue, 14 Jan 2025 at 16:15, David Howells <dhowells@redhat.com> wrote:
> >
> > > What's the best way for a network filesystem to make a native
> > > directory-is-opaque flag available to the system? Is it best to catch
> > > setxattr/getxattr/removexattr("overlay.opaque") and translate these into the
> > > RPCs to wrangle the flag?
> >
> > I don't know. Out of curiosity, which filesystem is it?
>
> One of the varieties of AFS. Unfortunately, xattrs aren't a thing and can't
> easily be added because of the volume transfer and backup protocols and
> formats.
>
> > There's "trusted.overlay.opaque" and "user.overlay.opaque" and are
> > used in different scenarios. There was also talk of making the
> > "trusted." namespace nest inside user namespaces, but apparently it's
> > not so important.
> >
> > Which one would you like to emulate?
>
> Um - I don't know the difference to answer that question.
"trusted." needs CAP_SYS_ADMIN in the init user ns, while "user."
needs write access on the object, which for an overlayfs mount in a
user namespace practically means CAP_DAC_OVERRIDE in the user ns.
So for plain, privileged overlayfs you'd want to implement
"trusted.overlay.opaque". I don't have a better idea, than to add the
xattr callbacks to the filesystem and return -EOPNOTSUPP for
everything else.
Thanks,
Miklos
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-14 16:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-14 15:15 How to support directory opacity in a filesystem for overlayfs to use? David Howells
2025-01-14 15:32 ` Miklos Szeredi
2025-01-14 15:56 ` David Howells
2025-01-14 16:23 ` Miklos Szeredi
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).