From: Amir Goldstein <amir73il@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Matthew Bobrowski <repnop@google.com>,
linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org
Subject: [PATCH v2 0/2] New fanotify API for ignoring events
Date: Fri, 24 Jun 2022 17:35:36 +0300 [thread overview]
Message-ID: <20220624143538.2500990-1-amir73il@gmail.com> (raw)
Hi Jan,
As we discussed [1], here is the implementation of the new
FAN_MARK_IGNORE API, to try and sort the historic mess of
FAN_MARK_IGNORED_MASK.
To address the bug you pointed out in v1 review, I added
helpers fsnotify_effective_ignore_mask() and
fsnotify_mask_applicable().
fsnotify_effective_ignore_mask() is used also in send_to_group(),
but not fsnotify_mask_applicable().
We could also use fsnotify_mask_applicable() for mark->mask
in send_to_group(), but then we will need to set FS_ISDIR in masks
on inotify/dnotify/... marks, so I don't think it is worth it(?).
We may need to change the helper names though to clarify this
subtle detail.
See LTP tests [2] and man page draft [3].
Thanks,
Amir.
Changes since v1:
- Replace "sticky" semantics with EEXITS error (Jan)
- Simplify EINVAL checks (Jan)
- Add missing ignore mask accessors
- Add fsnotify_effective_ignore_mask() helper
[1] https://lore.kernel.org/linux-fsdevel/20220428123824.ssq72ovqg2nao5f4@quack3.lan/
[2] https://github.com/amir73il/ltp/commits/fan_mark_ignore
[3] https://github.com/amir73il/man-pages/commits/fan_mark_ignore
Amir Goldstein (2):
fanotify: prepare for setting event flags in ignore mask
fanotify: introduce FAN_MARK_IGNORE
fs/notify/fanotify/fanotify.c | 19 ++++----
fs/notify/fanotify/fanotify.h | 2 +
fs/notify/fanotify/fanotify_user.c | 61 +++++++++++++++++-------
fs/notify/fdinfo.c | 6 +--
fs/notify/fsnotify.c | 21 +++++----
include/linux/fanotify.h | 5 +-
include/linux/fsnotify_backend.h | 74 +++++++++++++++++++++++++++---
include/uapi/linux/fanotify.h | 2 +
8 files changed, 147 insertions(+), 43 deletions(-)
--
2.25.1
next reply other threads:[~2022-06-24 14:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 14:35 Amir Goldstein [this message]
2022-06-24 14:35 ` [PATCH v2 1/2] fanotify: prepare for setting event flags in ignore mask Amir Goldstein
2022-06-26 7:57 ` Amir Goldstein
2022-06-27 11:32 ` Jan Kara
2022-06-27 12:14 ` Amir Goldstein
2022-06-24 14:35 ` [PATCH v2 2/2] fanotify: introduce FAN_MARK_IGNORE Amir Goldstein
2022-06-26 15:57 ` [PATCH v2 0/2] New fanotify API for ignoring events Amir Goldstein
2022-06-27 11:24 ` 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=20220624143538.2500990-1-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=jack@suse.cz \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=repnop@google.com \
/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).