Skip to content

tracefs/eventfs: Fix failed second run of test_ownership

Steven Rostedt linux-trace-kernel lkml stable 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 0 repliesNew
  2. v12 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4eventfs: Keep the directories from having the same inode number as filesfs/tracefs/event_inode.c+5 -10 replies
2/4tracefs: Update inode permissions on remountfs/tracefs/event_inode.c fs/tracefs/inode.c+25 -70 replies
3/4eventfs: Update all the eventfs_inodes from the events descriptorfs/tracefs/event_inode.c+31 -130 replies
4/4tracefs: Clear EVENT_INODE flag in tracefs_drop_inode()fs/tracefs/inode.c+17 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] tracefs/eventfs: Fix failed second run of test_ownership

The test_ownership test of the kselftests was failing again. That's because the original fix was incorrect and a fix to a race condition showed how the original fix was broken.

Instead of using tracefs_inodes to find the eventfs_inode that needs to be reset on remount, use the "events" directory descriptor to descend into its files and directories to catch all changes.

Changes since v1: https://lore.kernel.org/linux-trace-kernel/[email protected]

- Added other fixes underneath and rebased it on:
https://lore.kernel.org/lkml/[email protected]/

- The real fix is to not use the tracefs_inodes to find the eventfs_inodes that need to be cleared on remount. Instead, the events descriptor needs to be used to descend its directories and files to update their attributes

- The d_iput callback logic was misplaced. It should be done in the drop_inode callback.

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
eventfs/urgent

Head SHA1: 41b7db11bcac4638fa489c58d35e7d2146b665ab

Steven Rostedt (Google) (4):
eventfs: Keep the directories from having the same inode number as files
tracefs: Update inode permissions on remount
eventfs: Update all the eventfs_inodes from the events descriptor
tracefs: Clear EVENT_INODE flag in tracefs_drop_inode()

----

 fs/tracefs/event_inode.c | 57 +++++++++++++++++++++++++++++++++++++-----------
 fs/tracefs/inode.c       | 48 ++++++++++++++++++++++++----------------
 2 files changed, 73 insertions(+), 32 deletions(-)