From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ajay Kaher <akaher@vmware.com>, Al Viro <viro@ZenIV.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: [PATCH v2 0/2] eventfs: Don't use dcache_readdir() for getdents()
Date: Wed, 03 Jan 2024 20:52:47 -0500 [thread overview]
Message-ID: <20240104015247.075935881@goodmis.org> (raw)
After having a "pleasant" conversation with Linus over on the security
mailing list, we came to the conclusion that eventfs should not be
using the dcache_readdir() routine for iterating the entries of a
directory (getdents()).
Instead, the .open and .release callbacks of the directory file
operations was removed and all the work is now done in the .iterate_shared.
The function dcache_readdir_wrapper() was renamed to eventfs_iterate().
As the files and directories of eventfs is all known within the meta
data, it can easily supply getdents() with the information it needs without
traversing the dentry.
Changes since v1: https://lore.kernel.org/linux-trace-kernel/20240103102553.17a19cea@gandalf.local.home/
- Broke up into two patches, one to fix the lookup parameter and the
other to do the meat of the change.
- Moved the ctx->pos count up to skip creating of dentries in those cases.
Steven Rostedt (Google) (2):
eventfs: Remove "lookup" parameter from create_dir/file_dentry()
eventfs: Stop using dcache_readdir() for getdents()
----
fs/tracefs/event_inode.c | 241 ++++++++++++++++-------------------------------
1 file changed, 80 insertions(+), 161 deletions(-)
next reply other threads:[~2024-01-04 1:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 1:52 Steven Rostedt [this message]
2024-01-04 1:52 ` [PATCH v2 1/2] eventfs: Remove "lookup" parameter from create_dir/file_dentry() Steven Rostedt
2024-01-04 1:52 ` [PATCH v2 2/2] eventfs: Stop using dcache_readdir() for getdents() Steven Rostedt
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=20240104015247.075935881@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akaher@vmware.com \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=torvalds@linux-foundation.org \
--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;
as well as URLs for NNTP newsgroup(s).