Skip to content

RFC fsnotify: reduce coupling of permission and non permission events

Amir Goldstein linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fsnotify: separate fsnotify_mark_srcu for groups with permission eventsfs/notify/fsnotify.c fs/notify/fsnotify.h fs/notify/group.c +1 more+100 -300 replies
2/2fsnotify: handle permission events without holding fsnotify_mark_srcu[0]fs/notify/fanotify/fanotify.c fs/notify/fsnotify.c+34 -43 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC][PATCH 0/2] fsnotify: reduce coupling of permission and non permission events

The issue reported by Miklos Szeredi was processes blocking when trying to close an inotify file descriptor, while another fanotify listener is failing to handle permission events.

Miklos included a test program with the report.
His test program with some modifications is available on my github:
https://github.com/amir73il/fsnotify-utils/blob/master/fanotify_bug.c

Ideally, we would want that destruction of a group would only block if an event handled by this group is in progress, but this is not easy to achieve. Instead, we make sure that destrurction of a group would only block if an event handled by a group of similar class (priority) is in progress.

Amir Goldstein (2):
fsnotify: separate fsnotify_mark_srcu for groups with permission
events
fsnotify: handle permission events without holding
fsnotify_mark_srcu[0]

 fs/notify/fanotify/fanotify.c | 15 ++++++---
 fs/notify/fsnotify.c          | 57 ++++++++++++++++++++++++++++----
 fs/notify/fsnotify.h          | 17 ++++++++--
 fs/notify/group.c             |  2 +-
 fs/notify/mark.c              | 77 ++++++++++++++++++++++++++++++++-----------
 5 files changed, 134 insertions(+), 34 deletions(-)
Signature · 1 line
2.7.4