Skip to content

fanotify events with name info

Amir Goldstein linux-api linux-fsdevel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest22 patches 22 repliesIn review
  2. v410 patches 12 repliesSuperseded
  3. v37 patches 1 replySuperseded

Changes in v5 from the cover letter

- Some prep patches already picked up - the rest are included here
- Parcel variable event info according to your suggestions
- Separate unrelated change from FAN_MOVE_SELF patch
- Add adaptation of dnotify to unified event on parent/child
- Re-structure fsnotify_parent() based on your review comments

[1] https://lore.kernel.org/linux-fsdevel/[email protected]/
[2] https://lore.kernel.org/linux-fsdevel/[email protected]/
[3] https://github.com/amir73il/man-pages/commits/fanotify_name_fid-v5
[4] https://github.com/amir73il/linux/commits/fanotify_name_fid
[5] https://github.com/amir73il/ltp/commits/fanotify_name_fid
[6] https://github.com/amir73il/inotify-tools/commits/fanotify_name

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22fanotify: generalize the handling of extra event flagsfs/notify/fanotify/fanotify.c+10 -50 replies
2/22fanotify: generalize merge logic of events on dirfs/notify/fanotify/fanotify.c+11 -110 replies
3/22fanotify: distinguish between fid encode error and null fidfs/notify/fanotify/fanotify.c+4 -100 replies
4/22fanotify: generalize test for FAN_REPORT_FIDfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify_user.c include/linux/fanotify.h+16 -120 replies
5/22fanotify: mask out special event flags from ignored maskfs/notify/fanotify/fanotify_user.c+5 -00 replies
6/22fanotify: prepare for implicit event flags in mark maskfs/notify/fanotify/fanotify_user.c+24 -160 replies
7/22fanotify: use FAN_EVENT_ON_CHILD as implicit flag on sb/mount/non-dir marksfs/notify/fanotify/fanotify_user.c+10 -30 replies
8/22fsnotify: add object type "child" to object type iteratorinclude/linux/fsnotify_backend.h+3 -00 replies
9/22fanotify: use struct fanotify_info to parcel the variable size bufferfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h fs/notify/fanotify/fanotify_user.c+139 -430 replies
10/22fanotify: no external fh buffer in fanotify_name_eventfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h+59 -282 replies
11/22dnotify: report both events on parent and child with single callbackfs/notify/dnotify/dnotify.c+29 -130 replies
12/22inotify: report both events on parent and child with single callbackfs/notify/inotify/inotify_fsnotify.c+35 -93 replies
13/22fanotify: report both events on parent and child with single callbackfs/notify/fanotify/fanotify.c+3 -00 replies
14/22fsnotify: send event to parent and child with single callbackfs/kernfs/file.c fs/notify/fsnotify.c+41 -290 replies
15/22fsnotify: send event with parent/name info to sb/mount/non-dir marksfs/notify/fsnotify.c include/linux/fsnotify.h include/linux/fsnotify_backend.h+84 -126 replies
16/22fsnotify: remove check that source dentry is positiveinclude/linux/fsnotify.h+1 -24 replies
17/22fsnotify: send MOVE_SELF event with parent/name infofs/notify/fsnotify.c include/linux/fsnotify.h include/linux/fsnotify_backend.h+20 -84 replies
18/22fanotify: add basic support for FAN_REPORT_DIR_FIDfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify_user.c include/linux/fanotify.h +1 more+100 -170 replies
19/22fanotify: report events with parent dir fid to sb/mount/non-dir marksfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify_user.c+8 -20 replies
20/22fanotify: add support for FAN_REPORT_NAMEfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify_user.c include/linux/fanotify.h +1 more+58 -110 replies
21/22fanotify: report parent fid + name + child fidfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h fs/notify/fanotify/fanotify_user.c+35 -62 replies
22/22fanotify: report parent fid + child fidfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify_user.c+15 -160 replies

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCH v5 00/22] fanotify events with name info

Hi Jan,

This patch set implements the FAN_REPORT_NAME and FAN_REPORT_DIR_FID group flags.

I previously posted v3 of prep patch series [1] and v4 of follow up series [2]. Since then you pick up several prep patches, so this posting includes the rest of the prep patches along with the followup patches with most of your comments addressed.

Regarding the use of flag FS_EVENT_ON_CHILD and the TYPE_CHILD mark iterator, I did not change that because I was not sure about it and it is an internal implementation detail that we can change later. But the discussion about it made me realize that dnotify event handler wasn't properly adapted, so I added a patch to fix it.

The patches are available on github [3] based on your fsnotify branch. man-pages [4] LTP tests [5] and a demo [6] are also available.

Thanks,
Amir.

Changes since v4 (and since prep series v3):
- Some prep patches already picked up - the rest are included here
- Parcel variable event info according to your suggestions
- Separate unrelated change from FAN_MOVE_SELF patch
- Add adaptation of dnotify to unified event on parent/child
- Re-structure fsnotify_parent() based on your review comments

[1] https://lore.kernel.org/linux-fsdevel/[email protected]/
[2] https://lore.kernel.org/linux-fsdevel/[email protected]/
[3] https://github.com/amir73il/man-pages/commits/fanotify_name_fid-v5
[4] https://github.com/amir73il/linux/commits/fanotify_name_fid
[5] https://github.com/amir73il/ltp/commits/fanotify_name_fid
[6] https://github.com/amir73il/inotify-tools/commits/fanotify_name

*** BLURB HERE ***

Amir Goldstein (22):
fanotify: generalize the handling of extra event flags
fanotify: generalize merge logic of events on dir
fanotify: distinguish between fid encode error and null fid
fanotify: generalize test for FAN_REPORT_FID
fanotify: mask out special event flags from ignored mask
fanotify: prepare for implicit event flags in mark mask
fanotify: use FAN_EVENT_ON_CHILD as implicit flag on sb/mount/non-dir
marks
fsnotify: add object type "child" to object type iterator
fanotify: use struct fanotify_info to parcel the variable size buffer
fanotify: no external fh buffer in fanotify_name_event
dnotify: report both events on parent and child with single callback
inotify: report both events on parent and child with single callback
fanotify: report both events on parent and child with single callback
fsnotify: send event to parent and child with single callback
fsnotify: send event with parent/name info to sb/mount/non-dir marks
fsnotify: remove check that source dentry is positive
fsnotify: send MOVE_SELF event with parent/name info
fanotify: add basic support for FAN_REPORT_DIR_FID
fanotify: report events with parent dir fid to sb/mount/non-dir marks
fanotify: add support for FAN_REPORT_NAME
fanotify: report parent fid + name + child fid
fanotify: report parent fid + child fid

 fs/kernfs/file.c                     |  10 +-
 fs/notify/dnotify/dnotify.c          |  42 +++--
 fs/notify/fanotify/fanotify.c        | 273 ++++++++++++++++++++-------
 fs/notify/fanotify/fanotify.h        | 103 ++++++++--
 fs/notify/fanotify/fanotify_user.c   | 192 ++++++++++++++-----
 fs/notify/fsnotify.c                 | 132 +++++++++----
 fs/notify/inotify/inotify_fsnotify.c |  44 ++++-
 include/linux/fanotify.h             |   6 +-
 include/linux/fsnotify.h             |  15 +-
 include/linux/fsnotify_backend.h     |  35 +++-
 include/uapi/linux/fanotify.h        |  15 +-
 11 files changed, 662 insertions(+), 205 deletions(-)
Signature · 1 line
2.17.1