All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] fanotify: support restartable permission events
@ 2026-04-16 19:48 Ibrahim Jirdeh
  2026-04-16 19:48 ` [PATCH v3 1/2] fanotify: add restart infrastructure for pending " Ibrahim Jirdeh
  2026-04-16 19:48 ` [PATCH v3 2/2] fanotify: introduce restartable " Ibrahim Jirdeh
  0 siblings, 2 replies; 15+ messages in thread
From: Ibrahim Jirdeh @ 2026-04-16 19:48 UTC (permalink / raw)
  To: ibrahimjirdeh; +Cc: jack, amir73il, josef, lesha, linux-fsdevel, sargun

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/20260414185037.3541089-1-ibrahimjirdeh@meta.com/
v1: https://lore.kernel.org/linux-fsdevel/20250806220516.953114-1-ibrahimjirdeh@meta.com/

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

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

end of thread, other threads:[~2026-07-29  1:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 19:48 [PATCH v3 0/2] fanotify: support restartable permission events Ibrahim Jirdeh
2026-04-16 19:48 ` [PATCH v3 1/2] fanotify: add restart infrastructure for pending " Ibrahim Jirdeh
2026-04-17 11:09   ` Amir Goldstein
2026-04-20  9:13     ` Jan Kara
2026-04-22  9:23       ` Ibrahim Jirdeh
2026-04-16 19:48 ` [PATCH v3 2/2] fanotify: introduce restartable " Ibrahim Jirdeh
2026-04-17 11:05   ` Amir Goldstein
2026-04-20 10:49   ` Jan Kara
2026-04-20 18:07     ` Amir Goldstein
2026-04-21  7:05       ` Jan Kara
2026-04-22 10:22     ` Ibrahim Jirdeh
2026-04-22 10:36       ` Jan Kara
2026-04-22 11:17         ` Amir Goldstein
2026-04-22 16:54           ` Ibrahim Jirdeh
2026-07-29  1:20             ` Gao Xiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.