From: Giuseppe Scrivano <gscrivan@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-api@vger.kernel.org, Amir Goldstein <amir73il@gmail.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH] ovl: add ioctls to retrieve layer file descriptors
Date: Wed, 08 Jul 2026 22:35:38 +0200 [thread overview]
Message-ID: <87fr1t6wyt.fsf@redhat.com> (raw)
In-Reply-To: <CAJfpegvUEEbFnCa1N9k3gMXpw46YFpWuta=G6brON1=xU36bgw@mail.gmail.com> (Miklos Szeredi's message of "Wed, 8 Jul 2026 21:45:01 +0200")
Miklos Szeredi <miklos@szeredi.hu> writes:
> On Wed, 8 Jul 2026 at 17:55, Giuseppe Scrivano <gscrivan@redhat.com> wrote:
>>
>> Miklos Szeredi <miklos@szeredi.hu> writes:
>>
>> > On Wed, 8 Jul 2026 at 16:32, Giuseppe Scrivano <gscrivan@redhat.com> wrote:
>> >
>> >> Amir suggested to add that functionality when I've asked for some
>> >> feedback before sending the patch here. I am fine to drop it if this is
>> >> the consensus although I see its utility from user space.
>> >
>> > How about a completely different interface:
>> >
>> > int get_fd_opt(const char *name, unsigned int index, unsigned int flags);
>> >
>> > Enumerating layers would be as easy as passing an index stating from
>> > zero and stopping when -ERANGE is received.
>> >
>> > It would work for all filesystems that use files as options. No more
>> > fs specific ioctls.
>>
>> Is a new syscall really justified for such a narrow use case?
>
> That's the reason I advocate pseudo fs based solutions. Let's see, we
> had a proposal to use openat(), something. like:
>
> openat(base_fd, "mount/options/lowerdir+/0", O_ALT | O_PATH);
>
> Meaning that O_ALT switches to an alternative/meta namespace that is
> based on the given fd and in that meta namespace the tree under mount/
> represents the attributes of the mount that base_fd is on.
>
> See this post from Linus as well:
>
> https://lore.kernel.org/all/CAHk-=wjzLmMRf=QG-n+1HnxWCx4KTQn9+OhVvUSJ=ZCQd6Y1WA@mail.gmail.com/
>
> The statmount api took a different route, but for getting an O_PATH
> file this would be a very natural interface without added syscalls.
I don't argue against such an API, I only argue that I am probably not
the best person to drive such a significant change :-)
Would you be OK with the ioctl as a solution that works today, and
duplicate it when an alternative API materializes?
Thanks,
Giuseppe
next prev parent reply other threads:[~2026-07-08 20:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 9:58 [PATCH] ovl: add ioctls to retrieve layer file descriptors Giuseppe Scrivano
2026-07-08 10:24 ` Miklos Szeredi
2026-07-08 12:27 ` Giuseppe Scrivano
2026-07-08 13:23 ` Amir Goldstein
2026-07-08 13:44 ` Giuseppe Scrivano
2026-07-08 14:01 ` Miklos Szeredi
2026-07-08 20:45 ` Giuseppe Scrivano
2026-07-08 14:08 ` Miklos Szeredi
2026-07-08 14:31 ` Giuseppe Scrivano
2026-07-08 15:37 ` Miklos Szeredi
2026-07-08 15:55 ` Giuseppe Scrivano
2026-07-08 19:01 ` Amir Goldstein
2026-07-08 20:16 ` Colin Walters
2026-07-08 20:18 ` Giuseppe Scrivano
2026-07-08 19:45 ` Miklos Szeredi
2026-07-08 20:35 ` Giuseppe Scrivano [this message]
2026-07-09 6:11 ` Miklos Szeredi
2026-07-09 14:32 ` Amir Goldstein
2026-07-10 18:23 ` Miklos Szeredi
2026-07-08 10:40 ` 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=87fr1t6wyt.fsf@redhat.com \
--to=gscrivan@redhat.com \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--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