fanotify: support restartable permission events
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 12 repliesIn review
- v22 patches 3 repliesSuperseded
- v12 patches 3 repliesSuperseded
Changes in v3 from the cover letter
- Removed fsnotify_restart_event helper, instead inlined reinsert logic into fanotify_restart_pending_events
- guard(mutex) instead of goto in fanotify_open_queue_fd
- Fixed permission event mask check to allow FANOTIFY_EVENT_FLAGS bits
- FAN_RESTARTABLE_EVENTS nibble changed from 0x00008000 to 0x00010000
- Have queue fd keep a group reference via fsnotify_get_group
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | fanotify: add restart infrastructure for pending permission eventsfs/ | +30 | 3 replies | |
| 2/2 | fanotify: introduce restartable permission eventsfs/ fs/ fs/ +4 more | +140 | 9 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/2] fanotify: support restartable permission events
These patches are in order to add support for restarting permission events which is useful for HSM use cases which are backed by a daemon to respond reliably [1].
In terms of testing, there is an additional LTP test attached which exercises releasing queue via the new api [2]
[1] https://lore.kernel.org/linux-fsdevel/6za2mngeqslmqjg3icoubz37hbbxi6bi44canfsg2aajgkialt@c3ujlrjzkppr/
[2] https://github.com/ibrahim-jirdeh/ltp/commit/efa7aa88c866f3ba4d6a5c6c436ac27837bcdcc8
Ibrahim Jirdeh (2):
fanotify: add restart infrastructure for pending permission events
fanotify: introduce restartable permission events
fs/notify/fanotify/fanotify.c | 1 + fs/notify/fanotify/fanotify.h | 4 + fs/notify/fanotify/fanotify_user.c | 153 ++++++++++++++++++++++++++-- include/linux/fanotify.h | 1 + include/linux/fsnotify_backend.h | 3 + include/uapi/linux/fanotify.h | 7 ++ tools/include/uapi/linux/fanotify.h | 7 ++ 7 files changed, 170 insertions(+), 6 deletions(-)
--
2.52.0
v2: https://lore.kernel.org/linux-fsdevel/[email protected]/
v1: https://lore.kernel.org/linux-fsdevel/[email protected]/
Changes v2 => v3:
- Removed fsnotify_restart_event helper, instead inlined reinsert logic into fanotify_restart_pending_events
- guard(mutex) instead of goto in fanotify_open_queue_fd
- Fixed permission event mask check to allow FANOTIFY_EVENT_FLAGS bits
- FAN_RESTARTABLE_EVENTS nibble changed from 0x00008000 to 0x00010000
- Have queue fd keep a group reference via fsnotify_get_group
Changes v1 => v2:
- Replace fsnotify_insert_event usage with dedicated fsnotify_restart_event that inserts at head of queue without merge or overflow handling
- Return -EBUSY instead of -EEXIST for duplicate queue open
- Separate fanotify_control_ioctl for control fd with only FAN_IOC_OPEN_QUEUE_FD, move FIONREAD to queue fops
- Move queue_mutex/queue_opened to fanotify_data
- return EOF on read from queue fd after group shutdown