linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] eventfs: Don't use dcache_readdir() for getdents()
@ 2024-01-04  1:52 Steven Rostedt
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2024-01-04  1:52 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Linus Torvalds,
	Ajay Kaher, Al Viro, Christian Brauner, linux-fsdevel


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(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-04  1:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04  1:52 [PATCH v2 0/2] eventfs: Don't use dcache_readdir() for getdents() Steven Rostedt
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

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).