From: Amir Goldstein <amir73il@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 0/9] Fixes for fanotify name events
Date: Wed, 22 Jul 2020 15:58:40 +0300 [thread overview]
Message-ID: <20200722125849.17418-1-amir73il@gmail.com> (raw)
Jan,
Following your feedback [1] to fanotify name events, I wrote some LTP
tests [2] to add missing test coverage:
1) dnotify/inotify: report event to both parent and child -
catches the dnotify bug I had in v4 after unified event patch
2) fanotify10: add groups with FAN_REPORT_NAME to the setup -
catches the bug you noticed in fanotify_group_event_mask()
3) fanotify10: add test cases with ignored mask on watching parent -
catches the inconsistecy with ignored masks that you noticed [*]
The patches in this series apply to your fsnotify branch and are
avaiable on my fsnotify-fixes branch [3].
Patch 1 fixes issue #2 above
Patch 2 fixes another issue found by tests
Patch 3 fixes a minor issue found by code review
Patches 4-6 simplify the code based on your suggestions
Patch 7 depends on 4-6 and fixes issue #3 above [*]
Optional patches:
Patch 8 implements your suggestion of simplified handler_event()
Patch 9 is a possible fix for kernel test robot reported performance
regression. I did not get any feedback on it, but it is trivial.
Thanks,
Amir.
[*] The tests for merging ignored mask on watching parent set the
event FAN_OPEN in both mark mask and ignored mask and set the
flag FAN_EVENT_ON_CHILD in mark mask, because the expected behavior
in this case is well defined. I have patches to fix the case of
FAN_OPEN in ignored mask and flag FAN_EVENT_ON_CHILD in mark mask,
but decided not to post them at this time.
[1] https://lore.kernel.org/linux-fsdevel/20200716171332.GK5022@quack2.suse.cz/
[2] https://github.com/amir73il/ltp/commits/fsnotify_parent
[3] https://github.com/amir73il/linux/commits/fsnotify-fixes
Amir Goldstein (9):
fanotify: fix reporting event to sb/mount marks
inotify: do not set FS_EVENT_ON_CHILD in non-dir mark mask
audit: do not set FS_EVENT_ON_CHILD in audit marks mask
fsnotify: create helper fsnotify_inode()
fsnotify: simplify dir argument to handle_event()
fsnotify: pass dir and inode arguments to fsnotify()
fsnotify: fix merge with parent mark masks
fsnotify: create method handle_inode_event() in fsnotify_operations
fsnotify: pass inode to fsnotify_parent()
fs/kernfs/file.c | 11 ++-
fs/nfsd/filecache.c | 12 ++--
fs/notify/dnotify/dnotify.c | 38 +++-------
fs/notify/fanotify/fanotify.c | 17 +++--
fs/notify/fsnotify.c | 118 +++++++++++++++++++++++++------
fs/notify/inotify/inotify_user.c | 14 ++--
include/linux/fsnotify.h | 44 ++++++------
include/linux/fsnotify_backend.h | 33 ++++++---
kernel/audit_fsnotify.c | 22 +++---
kernel/audit_tree.c | 10 ++-
kernel/audit_watch.c | 19 +++--
kernel/trace/trace.c | 3 +-
12 files changed, 196 insertions(+), 145 deletions(-)
--
2.17.1
next reply other threads:[~2020-07-22 12:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 12:58 Amir Goldstein [this message]
2020-07-22 12:58 ` [PATCH 1/9] fanotify: fix reporting event to sb/mount marks Amir Goldstein
2020-07-27 15:17 ` Jan Kara
2020-07-22 12:58 ` [PATCH 2/9] inotify: do not set FS_EVENT_ON_CHILD in non-dir mark mask Amir Goldstein
2020-07-27 15:33 ` Jan Kara
2020-07-22 12:58 ` [PATCH 3/9] audit: do not set FS_EVENT_ON_CHILD in audit marks mask Amir Goldstein
2020-07-27 15:33 ` Jan Kara
2020-07-22 12:58 ` [PATCH 4/9] fsnotify: create helper fsnotify_inode() Amir Goldstein
2020-07-27 16:26 ` Jan Kara
2020-07-22 12:58 ` [PATCH 5/9] fsnotify: simplify dir argument to handle_event() Amir Goldstein
2020-07-27 19:32 ` Jan Kara
2020-07-22 12:58 ` [PATCH 6/9] fsnotify: pass dir and inode arguments to fsnotify() Amir Goldstein
2020-07-27 21:26 ` Jan Kara
2020-07-22 12:58 ` [PATCH 7/9] fsnotify: fix merge with parent mark masks Amir Goldstein
2020-07-27 21:27 ` Jan Kara
2020-07-22 12:58 ` [PATCH 8/9] fsnotify: create method handle_inode_event() in fsnotify_operations Amir Goldstein
2020-07-27 21:27 ` Jan Kara
2020-07-22 12:58 ` [PATCH 9/9] fsnotify: pass inode to fsnotify_parent() Amir Goldstein
2020-07-27 21:29 ` Jan Kara
2020-07-27 21:57 ` [PATCH 0/9] Fixes for fanotify name events Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200722125849.17418-1-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).