From: Miklos Szeredi <miklos@szeredi.hu>
To: Christian Brauner <brauner@kernel.org>
Cc: Amir Goldstein <amir73il@gmail.com>,
Chen Linxuan <chenlinxuan@uniontech.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] fs: fuse: add backing_files control file
Date: Tue, 13 May 2025 16:49:03 +0200 [thread overview]
Message-ID: <CAJfpegvFsWyUsDcN7qQOEArc6WF9xre+gkC_kjgbyXPBHM84kQ@mail.gmail.com> (raw)
In-Reply-To: <CAJfpegsmvhsSGVGih=44tE6Ro7x3RzvOHuaREu+Abd2eZMR6Rw@mail.gmail.com>
On Tue, 13 May 2025 at 09:57, Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> On Tue, 13 May 2025 at 09:39, Christian Brauner <brauner@kernel.org> wrote:
> > The xattr system call as far as I'm concerned is not going to be pimped
> > to support stuff like that.
>
> Heh? IIRC there were positive reactions to e.g. "O_XATTR", it just
> didn't get implemented. Can try to dig this up from the archives.
Here it is:
https://lore.kernel.org/all/CAHk-=wjzLmMRf=QG-n+1HnxWCx4KTQn9+OhVvUSJ=ZCQd6Y1WA@mail.gmail.com/
Quoting Linus inline:
| IOW, if you do something more along the lines of
|
| fd = open(""foo/bar", O_PATH);
| metadatafd = openat(fd, "metadataname", O_ALT);
|
| it might be workable.
|
| So you couldn't do it with _one_ pathname, because that is always
| fundamentally going to hit pathname lookup rules.
|
| But if you start a new path lookup with new rules, that's fine.
|
| This is what I think xattrs should always have done, because they are
| broken garbage.
|
| In fact, if we do it right, I think we could have "getxattr()" be 100%
| equivalent to (modulo all the error handling that this doesn't do, of
| course):
|
| ssize_t getxattr(const char *path, const char *name,
| void *value, size_t size)
| {
| int fd, attrfd;
|
| fd = open(path, O_PATH);
| attrfd = openat(fd, name, O_ALT);
| close(fd);
| read(attrfd, value, size);
| close(attrfd);
| }
|
| and you'd still use getxattr() and friends as a shorthand (and for
| POSIX compatibility), but internally in the kernel we'd have a
| interface around that "xattrs are just file handles" model.
|
| Linus
next prev parent reply other threads:[~2025-05-13 14:49 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 6:33 [PATCH v3 0/3] fuse: Expose more information of fuse backing files to userspace Chen Linxuan via B4 Relay
2025-05-09 6:33 ` [PATCH v3 1/3] fs: fuse: add const qualifier to fuse_ctl_file_conn_get() Chen Linxuan via B4 Relay
2025-05-09 7:21 ` Amir Goldstein
2025-05-09 6:33 ` [PATCH v3 2/3] fs: fuse: add backing_files control file Chen Linxuan via B4 Relay
2025-05-09 7:20 ` Amir Goldstein
2025-05-09 7:40 ` Chen Linxuan
2025-05-09 7:39 ` Chen Linxuan
2025-05-09 9:14 ` Amir Goldstein
2025-05-09 14:00 ` Miklos Szeredi
2025-05-09 14:43 ` Chen Linxuan
2025-05-09 14:59 ` Miklos Szeredi
2025-05-09 15:10 ` Chen Linxuan
2025-05-09 15:16 ` Miklos Szeredi
2025-05-11 9:55 ` Chen Linxuan
2025-05-12 8:27 ` Miklos Szeredi
2025-05-12 9:17 ` Christian Brauner
2025-05-12 9:23 ` Amir Goldstein
2025-05-12 10:06 ` Miklos Szeredi
2025-05-13 7:39 ` Christian Brauner
2025-05-13 7:57 ` Miklos Szeredi
2025-05-13 14:49 ` Miklos Szeredi [this message]
2025-06-20 6:12 ` Chen Linxuan
2025-07-02 5:11 ` Miklos Szeredi
2025-05-09 15:19 ` Amir Goldstein
2025-05-09 15:41 ` Miklos Szeredi
2025-05-09 6:33 ` [PATCH v3 3/3] fs: fuse: add more information to fdinfo Chen Linxuan via B4 Relay
2025-05-09 6:40 ` Chen Linxuan
2025-05-09 7:13 ` Amir Goldstein
2025-05-09 16:05 ` Miklos Szeredi
2025-05-09 7:36 ` [PATCH v3 0/3] fuse: Expose more information of fuse backing files to userspace Amir Goldstein
2025-05-09 13:14 ` Miklos Szeredi
2025-05-13 18:52 ` Joanne Koong
2025-05-14 8:50 ` Miklos Szeredi
2025-05-14 23:03 ` Joanne Koong
2025-05-15 3:17 ` Chen Linxuan
2025-05-15 19:02 ` Joanne Koong
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=CAJfpegvFsWyUsDcN7qQOEArc6WF9xre+gkC_kjgbyXPBHM84kQ@mail.gmail.com \
--to=miklos@szeredi.hu \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=chenlinxuan@uniontech.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).