[PATCH 0/4] eventfs: More updates to eventfs_iterate()

From: Steven Rostedt
Date: Thu Jan 04 2024 - 17:00:09 EST


With the ongoing descussion of eventfs iterator, a few more changes
are required and some changes are just enhancements.

- Stop immediately in the loop if the ei is found to be in the process
of being freed.

- Make the ctx->pos update consistent with the skipped previous read index.
This fixes a bug with duplicate files being showned by 'ls'.

- Swap reading ei->entries with ei->children to make the next change
easier to read

- Add a "shortcut" in the ei->entries array to skip over already read
entries.


Steven Rostedt (Google) (4):
eventfs: Have eventfs_iterate() stop immediately if ei->is_freed is set
eventfs: Do ctx->pos update for all iterations in eventfs_iterate()
eventfs: Read ei->entries before ei->children in eventfs_iterate()
eventfs: Shortcut eventfs_iterate() by skipping entries already read

----
fs/tracefs/event_inode.c | 67 ++++++++++++++++++++++++++----------------------
1 file changed, 36 insertions(+), 31 deletions(-)