From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux Trace Devel <linux-trace-devel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Christian Brauner <brauner@kernel.org>,
Ajay Kaher <ajay.kaher@broadcom.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] eventfs: Have inodes have unique inode numbers
Date: Fri, 26 Jan 2024 17:41:05 -0500 [thread overview]
Message-ID: <29be300d-00c4-4759-b614-2523864c074b@efficios.com> (raw)
In-Reply-To: <CAHk-=whAG6TM6PgH0YnsRe6U=RzL+JMvCi=_f0Bhw+q_7SSZuw@mail.gmail.com>
On 2024-01-26 17:29, Linus Torvalds wrote:
> On Fri, 26 Jan 2024 at 14:14, Mathieu Desnoyers
> <mathieu.desnoyers@efficios.com> wrote:
>>
>> I do however have a concern with the approach of using the same
>> inode number for various files on the same filesystem: AFAIU it
>> breaks userspace ABI expectations.
>
> Virtual filesystems have always done that in various ways.
>
> Look at the whole discussion about the size of the file. Then look at /proc.
Yes, there is even a note about stat.st_size in inode(7) explaining
this:
NOTES
For pseudofiles that are autogenerated by the kernel, the file size
(stat.st_size; statx.stx_size) reported by the kernel is not accurate.
For example, the value 0 is returned for many files under the /proc di‐
rectory, while various files under /sys report a size of 4096 bytes,
even though the file content is smaller. For such files, one should
simply try to read as many bytes as possible (and append '\0' to the
returned buffer if it is to be interpreted as a string).
But having a pseudo-filesystem entirely consisting of duplicated inodes
which are not hard links to the same file is something new/unexpected.
> And honestly, eventfs needs to be simplified. It's a mess. It's less
> of a mess than it used to be, but people should *NOT* think that it's
> a real filesystem.
I agree with simplifying it, but would rather not introduce userspace ABI
regressions in the process, which will cause yet another kind of mess.
> Don't use some POSIX standard as an expectation for things like /proc,
> /sys or tracefs.
If those filesystems choose to do things differently from POSIX, then it
should be documented with the relevant ABIs, because userspace should be
able to know (rather than guess) what it can expect.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
next prev parent reply other threads:[~2024-01-26 22:41 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-26 20:02 Steven Rostedt
2024-01-26 20:25 ` Linus Torvalds
2024-01-26 21:26 ` Steven Rostedt
2024-01-26 21:31 ` Linus Torvalds
2024-01-26 21:43 ` Steven Rostedt
2024-01-26 21:36 ` Linus Torvalds
2024-01-26 21:42 ` Steven Rostedt
2024-01-26 21:49 ` Linus Torvalds
2024-01-26 22:08 ` Steven Rostedt
2024-01-26 22:26 ` Linus Torvalds
2024-01-27 14:47 ` Steven Rostedt
2024-01-28 14:42 ` Steven Rostedt
2024-01-26 22:14 ` Mathieu Desnoyers
2024-01-26 22:29 ` Linus Torvalds
2024-01-26 22:41 ` Mathieu Desnoyers [this message]
2024-01-26 22:49 ` Linus Torvalds
2024-01-29 16:00 ` Mathieu Desnoyers
2024-01-29 18:58 ` Linus Torvalds
2024-01-26 22:34 ` Matthew Wilcox
2024-01-26 22:40 ` Mathieu Desnoyers
2024-01-26 22:48 ` Linus Torvalds
2024-01-26 23:04 ` Matthew Wilcox
2024-01-26 23:11 ` Linus Torvalds
2024-01-26 23:17 ` Linus Torvalds
2024-01-27 9:36 ` Andreas Schwab
2024-01-27 21:47 ` Linus Torvalds
2024-01-28 20:15 ` Steven Rostedt
2024-01-28 20:53 ` Linus Torvalds
2024-01-28 21:08 ` Linus Torvalds
2024-01-28 22:01 ` Steven Rostedt
2024-01-28 22:17 ` Linus Torvalds
2024-01-28 22:26 ` Steven Rostedt
2024-01-28 21:11 ` Steven Rostedt
2024-01-28 21:19 ` Steven Rostedt
2024-01-28 21:43 ` Linus Torvalds
2024-01-28 22:07 ` Linus Torvalds
2024-01-28 22:17 ` Steven Rostedt
2024-01-28 22:25 ` Linus Torvalds
2024-01-28 22:51 ` Steven Rostedt
2024-01-28 23:24 ` Linus Torvalds
2024-01-28 23:59 ` Steven Rostedt
2024-01-29 0:21 ` Steven Rostedt
2024-01-29 1:00 ` Linus Torvalds
2024-01-29 1:42 ` Linus Torvalds
2024-01-29 2:32 ` Steven Rostedt
2024-01-29 3:40 ` Steven Rostedt
2024-01-29 4:01 ` Linus Torvalds
2024-01-29 2:09 ` Steven Rostedt
2024-01-29 6:44 ` Amir Goldstein
2024-01-29 9:32 ` Steven Rostedt
2024-01-27 15:26 ` David Laight
2024-01-27 20:01 ` Linus Torvalds
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=29be300d-00c4-4759-b614-2523864c074b@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=ajay.kaher@broadcom.com \
--cc=brauner@kernel.org \
--cc=geert@linux-m68k.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®