mbox series

[v3,0/8] New fanotify event info API

Message ID 20181003212539.2384-1-amir73il@gmail.com (mailing list archive)
Headers show
Series New fanotify event info API | expand

Message

Amir Goldstein Oct. 3, 2018, 9:25 p.m. UTC
Jan,

Following is the fanotify cleanup for internal constants
followed by the FAN_EVENT_INFO_TID API change.

The work is available on branch fanotify_api-v3 [1].
Work was tested against the inotify/fanotify LTP tests
including my new fanotify10 test and FAN_EVENT_INFO_TID test
fanotify11 by nixiaoming, both available on my LTP tree [2].

Per your request, the series is based on commit 96a71f21ef1f
("fanotify: store fanotify_init() flags in group's fanotify_data")
from your 'fsnotify' branch.

As you can see, the cleanup grew a few more patches since v2:
- Patch 1 is the separate fix you requested for FAN_MARK_ONDIR
- Patches 2-3 then get rid of FAN_MARK_ONDIR
- Patch 4 convert FAN_ALL_* users to use FANOTIFY_* constants
  This convention in inline with some existing FANOTIFY_* internal
  constants and with INOTIFY_ and FSNOTIFY_ internal constants
- Patches 5-6 add the bits weight validators you requested
- Patch 7 (FAN_EVENT_INFO_TID) is mostly unmodified from v2
- Patch 8 is a bonus low hanging optimization

I suppose you can leave that last patch out, because I have not done any
performance tests with in, but if you find it is "probably an improvement"
maybe put it in next and let the LKP robots let us know what they think.

Thanks,
Amir.

[1] https://github.com/amir73il/linux/commits/fanotify_api-v3
[2] https://github.com/amir73il/ltp/commits/fanotify_unpriv

Amir Goldstein (8):
  fanotify: fix collision of internal and uapi mark flags
  fsnotify: generalize handling of extra event flags
  fanotify: simplify handling of FAN_ONDIR
  fanotify: deprecate uapi FAN_ALL_* constants
  fsnotify: convert runtime BUG_ON() to BUILD_BUG_ON()
  fanotify: add BUILD_BUG_ON() to count the bits of fanotify constants
  fanotify: support reporting thread id instead of process id
  fsnotify: optimize away srcu_read_lock() for events on directories

 fs/notify/dnotify/dnotify.c        |  5 ++-
 fs/notify/fanotify/fanotify.c      | 17 ++++++---
 fs/notify/fanotify/fanotify.h      |  4 +-
 fs/notify/fanotify/fanotify_user.c | 57 ++++++++++------------------
 fs/notify/fsnotify.c               | 16 +++++---
 fs/notify/inotify/inotify_user.c   |  6 +--
 include/linux/fanotify.h           | 61 ++++++++++++++++++++++++++++--
 include/linux/fsnotify_backend.h   |  9 ++++-
 include/uapi/linux/fanotify.h      | 21 +++++-----
 9 files changed, 126 insertions(+), 70 deletions(-)