From: Amir Goldstein <amir73il@gmail.com>
To: Christian Brauner <brauner@kernel.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
Josef Bacik <josef@toxicpanda.com>,
linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org
Subject: Re: [PATCH RFC v2 2/4] ovl: specify layers via file descriptors
Date: Sun, 13 Oct 2024 16:54:52 +0200 [thread overview]
Message-ID: <CAOQ4uxg0cuwWmEE_NaGth2FoE4-MbmRtN6TnyeVFAfbtP-z=Sw@mail.gmail.com> (raw)
In-Reply-To: <20241012-geklagt-busfahren-49fc6d75088b@brauner>
On Sat, Oct 12, 2024 at 12:37 PM Christian Brauner <brauner@kernel.org> wrote:
>
> On Sat, Oct 12, 2024 at 10:25:38AM +0200, Amir Goldstein wrote:
> > On Fri, Oct 11, 2024 at 11:46 PM Christian Brauner <brauner@kernel.org> wrote:
> > >
> >
> > nit: if you can avoid using the exact same title for the cover letter and
> > a patch that would be nice (gmail client collapses them together).
>
> Fine, but fwiw, the solution to this problem is to use a proper email
> client. ;)
>
touché :)
> >
> > > Currently overlayfs only allows specifying layers through path names.
> > > This is inconvenient for users such as systemd that want to assemble an
> > > overlayfs mount purely based on file descriptors.
> > >
> > > This enables user to specify both:
> > >
> > > fsconfig(fd_overlay, FSCONFIG_SET_FD, "upperdir+", NULL, fd_upper);
> > > fsconfig(fd_overlay, FSCONFIG_SET_FD, "workdir+", NULL, fd_work);
> > > fsconfig(fd_overlay, FSCONFIG_SET_FD, "lowerdir+", NULL, fd_lower1);
> > > fsconfig(fd_overlay, FSCONFIG_SET_FD, "lowerdir+", NULL, fd_lower2);
> > >
> > > in addition to:
> > >
> > > fsconfig(fd_overlay, FSCONFIG_SET_STRING, "upperdir+", "/upper", 0);
> > > fsconfig(fd_overlay, FSCONFIG_SET_STRING, "workdir+", "/work", 0);
> > > fsconfig(fd_overlay, FSCONFIG_SET_STRING, "lowerdir+", "/lower1", 0);
> > > fsconfig(fd_overlay, FSCONFIG_SET_STRING, "lowerdir+", "/lower2", 0);
> > >
> >
> > Please add a minimal example with FSCONFIG_SET_FD to overlayfs.rst.
> > I am not looking for a user manual, just one example to complement the
> > FSCONFIG_SET_STRING examples.
> >
> > I don't mind adding config types on a per need basis, but out of curiosity
> > do you think the need will arise to support FSCONFIG_SET_PATH{,_EMPTY}
> > in the future? It is going to be any more challenging than just adding
> > support for
> > just FSCONFIG_SET_FD?
>
> This could also be made to work rather easily but I wouldn't know why we
> would want to add it. The current overlayfs FSCONFIG_SET_STRING variant
> is mostly equivalent. Imho, it's a lot saner to let userspace do the
> required open via regular openat{2}() and then use FSCONFIG_SET_FD, then
> force *at() based semantics down into the filesystem via fsconfig().
Fine be me. I am less familiar with the relevant use cases.
> U_PATH{_EMPTY} is unused and we could probably also get rid of it.
>
Oh. I didn't know that.
Thanks,
Amir.
next prev parent reply other threads:[~2024-10-13 14:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 21:45 [PATCH RFC v2 0/4] ovl: specify layers via file descriptors Christian Brauner
2024-10-11 21:45 ` [PATCH RFC v2 1/4] fs: add helper to use mount option as path or fd Christian Brauner
2024-10-12 7:21 ` Amir Goldstein
2024-10-12 8:20 ` Amir Goldstein
2024-10-14 8:20 ` Christian Brauner
2024-10-11 21:45 ` [PATCH RFC v2 2/4] ovl: specify layers via file descriptors Christian Brauner
2024-10-11 22:27 ` Al Viro
2024-10-12 8:25 ` Amir Goldstein
2024-10-12 10:37 ` Christian Brauner
2024-10-13 14:54 ` Amir Goldstein [this message]
2024-10-11 21:45 ` [PATCH RFC v2 3/4] selftests: use shared header Christian Brauner
2024-10-12 7:33 ` Amir Goldstein
2024-10-11 21:45 ` [PATCH RFC v2 4/4] selftests: add overlayfs fd mounting selftests Christian Brauner
2024-10-12 7:18 ` Amir Goldstein
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='CAOQ4uxg0cuwWmEE_NaGth2FoE4-MbmRtN6TnyeVFAfbtP-z=Sw@mail.gmail.com' \
--to=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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;
as well as URLs for NNTP newsgroup(s).