From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com ([74.125.82.67]:55141 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbeDENRF (ORCPT ); Thu, 5 Apr 2018 09:17:05 -0400 Received: by mail-wm0-f67.google.com with SMTP id r191so5578060wmg.4 for ; Thu, 05 Apr 2018 06:17:05 -0700 (PDT) From: Amir Goldstein To: Jan Kara Cc: Miklos Szeredi , Marko Rauhamaa , linux-fsdevel@vger.kernel.org Subject: [PATCH v2 00/20] fanotify: super block mark Date: Thu, 5 Apr 2018 16:18:01 +0300 Message-Id: <1522934301-6520-1-git-send-email-amir73il@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi Jan, It's been over a year since I posted my last patch revision [1]. This series, also available on my fanoitfy_sb branch [2], addresses your feedback to attach marks to a super block instead of the root inode. Patch 1 fixes a bug with ignore mask, which I had already posted. Most of the patches thereafter make the code handling inode and vfsmount marks generic for N object types (where N=2). Patches 17-18 add the super block mark object type and the bits of non generic code needed to support it. Patches 19-20 add the API and implementation for FAN_MARK_FILESSYTEM to fanotify backend. I tested this series with existing fsnotify LTP tests and have written another four LTP tests [3] - one regression test for patch [1/20] and three tests to verify functionality of a super block mark. For context, here are my TODO items for a followup series: - Add support for fanotify_init() flags FAN_EVENT_INFO_NOFD and FAN_EVENT_INFO_FH to report file handle on event instead of file descriptor. - Support events with data type FSNOTIFY_EVENT_INODE on an inode or super block mark to a group that was initialized with flag FAN_EVENT_INFO_FH. - Add support for fanotify_init() flags FAN_EVENT_INFO_FILENAME and FAN_EVENT_INFO_COOKIE to achieve the full functionality available with inotify. Please let me know what you think of this series as well as future plans. Thanks, Amir. [1] https://lwn.net/Articles/716973/ [2] https://github.com/amir73il/linux/commits/fanotify_sb [3] https://github.com/amir73il/ltp/commits/fanotify_sb Amir Goldstein (20): fanotify: fix logic of events on child fsnotify: fix ignore mask logic in send_to_group() fsnotify: fix typo in a comment about mark->g_list MAINTAINERS: add an entry for FSNOTIFY infrastructure fsnotify: use type id to identify connector object type fsnotify: remove redundant arguments to handle_event() fsnotify: introduce marks iteration helpers fsnotify: generalize iteration of marks by object type fsnotify: generalize send_to_group() fanotify: generalize fanotify_should_send_event() fsnotify: add fsnotify_add_inode_mark() wrappers fsnotify: introduce prototype struct fsnotify_obj fsnotify: pass fsnotify_obj instead of **connp argument fsnotify: pass object and object type to fsnotify_add_mark() fsnotify: make fsnotify_recalc_mask() unaware of object type fsnotify: generalize fsnotify_detach_connector_from_object() fsnotify: add super block object type fsnotify: send path type events to group with super block marks fanotify: factor out helpers to add/remove mark fanotify: add API to attach/detach super block mark MAINTAINERS | 8 ++ fs/inode.c | 2 +- fs/mount.h | 4 +- fs/notify/dnotify/dnotify.c | 27 ++--- fs/notify/fanotify/fanotify.c | 45 ++++----- fs/notify/fanotify/fanotify_user.c | 135 ++++++++++++------------- fs/notify/fdinfo.c | 6 +- fs/notify/fsnotify.c | 189 ++++++++++++++++++++--------------- fs/notify/fsnotify.h | 34 +++++-- fs/notify/group.c | 2 +- fs/notify/inotify/inotify.h | 2 - fs/notify/inotify/inotify_fsnotify.c | 6 +- fs/notify/inotify/inotify_user.c | 14 +-- fs/notify/mark.c | 166 +++++++++++++++--------------- fs/super.c | 2 +- include/linux/fs.h | 10 +- include/linux/fsnotify.h | 8 ++ include/linux/fsnotify_backend.h | 134 ++++++++++++++++++++----- include/linux/fsnotify_obj.h | 14 +++ include/uapi/linux/fanotify.h | 7 +- kernel/audit_fsnotify.c | 5 +- kernel/audit_tree.c | 15 ++- kernel/audit_watch.c | 7 +- kernel/auditsc.c | 4 +- 24 files changed, 507 insertions(+), 339 deletions(-) create mode 100644 include/linux/fsnotify_obj.h -- 2.7.4