Skip to content

Partition the fanotify watchers by type

Amir Goldstein linux-fsdevel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 6 repliesIn review
  2. v210 patches 20 repliesSuperseded
  3. v1 RFC5 patches 6 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14fsnotify: rename fsnotify group flag macrosfs/notify/fanotify/fanotify_user.c fs/notify/group.c fs/notify/inotify/inotify_user.c +3 more+8 -80 replies
2/14fsnotify: introduce fsnotify group typesfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify_user.c fs/notify/group.c +2 more+72 -160 replies
3/14fsnotify: separate the events bitmask macros by group typefs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h fs/notify/fanotify/fanotify_user.c +4 more+124 -670 replies
4/14fanotify: test event->type instead of event mask when possiblefs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h fs/notify/fanotify/fanotify_user.c +1 more+41 -390 replies
5/14fsnotify: do not report mount events with fsnotify()fs/notify/fsnotify.c+66 -260 replies
6/14fanotify: gate filesystem event classification by group typefs/notify/fanotify/fanotify.c+60 -280 replies
7/14fanotify: define event mask constants as 64bitfs/notify/fanotify/fanotify.c include/uapi/linux/fanotify.h+68 -530 replies
8/14fanotify: define new FAN_NS_MNT_* constantsfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify_user.c include/linux/fanotify.h +4 more+27 -140 replies
9/14fanotify: gate event mask in fanotify_mark() by group typefs/notify/fanotify/fanotify_user.c+81 -371 reply
10/14fanotify: introduce FAN_REPORT_MNTIDfs/notify/fanotify/fanotify_user.c include/linux/fanotify.h include/uapi/linux/fanotify.h+23 -101 reply
11/14fanotify: introduce FAN_EVENT_MATCH() macroinclude/uapi/linux/fanotify.h+9 -01 reply
12/14selftests/filesystems: create fanotify test dirtools/testing/selftests/Makefile tools/testing/selftests/filesystems/fanotify/.gitignore tools/testing/selftests/filesystems/fanotify/Makefile +2 more+1 -10 replies
13/14selftests/fanotify: update the uapi tools header copytools/include/uapi/linux/fanotify.h+67 -330 replies
14/14selftests/fanotify: test the FAN_REPORT_MNTID modetools/testing/selftests/filesystems/fanotify/mount-notify_test.c tools/testing/selftests/filesystems/fanotify/mount-notify_test_ns.c+89 -160 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 00/14] Partition the fanotify watchers by type

Jan,

As discussed on the "namespace monitoring" patch set [1], the proposed namespace events do not need to be mixed on the same group with legacy fanotify filesystem events.

The mount events are already not mixable with filesystem events, but we want to be able to mix them with the new namespace events.

Therefore, introduce the concept of "watcher type" where all the legacy events belong to the filesystem watcher type and the new mount events belong to a new namespace watcher type.

The new watcher type is free to reuse most of the 32bit mask space that we have internally in fsnotify for event masks.

The prep patch set only does the partitioning by watcher type. Followup namepsace events work in available for review in my tree [2].

If you are fine with this plan and have time to review the patches, perhaps it is not too late to stage this prep series for next cycle?

Otherwise, we could aim for merging this together with the namespace events for the following cycle.

Thanks,
Amir.

[1] https://lore.kernel.org/linux-fsdevel/[email protected]/
[2] https://github.com/amir73il/linux/commits/fan_mark_userns

Amir Goldstein (14):
fsnotify: rename fsnotify group flag macros
fsnotify: introduce fsnotify group types
fsnotify: separate the events bitmask macros by group type
fanotify: test event->type instead of event mask when possible
fsnotify: do not report mount events with fsnotify()
fanotify: gate filesystem event classification by group type
fanotify: define event mask constants as 64bit
fanotify: define new FAN_NS_MNT_* constants
fanotify: gate event mask in fanotify_mark() by group type
fanotify: introduce FAN_REPORT_MNTID
fanotify: introduce FAN_EVENT_MATCH() macro selftests/filesystems: create fanotify test dir selftests/fanotify: update the uapi tools header copy selftests/fanotify: test the FAN_REPORT_MNTID mode

 fs/notify/fanotify/fanotify.c                 | 186 +++++++++-----
 fs/notify/fanotify/fanotify.h                 |  38 ++-
 fs/notify/fanotify/fanotify_user.c            | 230 ++++++++++++------
 fs/notify/fsnotify.c                          | 106 +++++---
 fs/notify/group.c                             |  15 +-
 fs/notify/inotify/inotify_user.c              |   2 +-
 fs/notify/mark.c                              |   2 +-
 include/linux/fanotify.h                      |  45 +++-
 include/linux/fsnotify.h                      |   6 +-
 include/linux/fsnotify_backend.h              |  83 +++++--
 include/trace/misc/fsnotify.h                 |   4 +-
 include/uapi/linux/fanotify.h                 | 100 +++++---
 kernel/audit_fsnotify.c                       |   2 +-
 tools/include/uapi/linux/fanotify.h           | 100 +++++---
 tools/testing/selftests/Makefile              |   2 +-
 .../{mount-notify => fanotify}/.gitignore     |   0
 .../{mount-notify => fanotify}/Makefile       |   0
 .../mount-notify_test.c                       |  51 +++-
 .../mount-notify_test_ns.c                    |  54 +++-
 19 files changed, 707 insertions(+), 319 deletions(-)
 rename tools/testing/selftests/filesystems/{mount-notify => fanotify}/.gitignore (100%)
 rename tools/testing/selftests/filesystems/{mount-notify => fanotify}/Makefile (100%)
 rename tools/testing/selftests/filesystems/{mount-notify => fanotify}/mount-notify_test.c (90%)
 rename tools/testing/selftests/filesystems/{mount-notify => fanotify}/mount-notify_test_ns.c (90%)
Signature · 1 line
2.55.0