From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: amir73il@gmail.com, jack@suse.com
Cc: djwong@kernel.org, tytso@mit.edu, david@fromorbit.com,
dhowells@redhat.com, khazhy@google.com,
linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org,
linux-ext4@vger.kernel.org,
Gabriel Krisman Bertazi <krisman@collabora.com>,
kernel@collabora.com
Subject: [PATCH v9 00/31] file system-wide error monitoring
Date: Mon, 25 Oct 2021 16:27:15 -0300 [thread overview]
Message-ID: <20211025192746.66445-1-krisman@collabora.com> (raw)
Hi,
This is the 9th version of this patch series. Thank you, Amir, Jan and
Ted, for the feedback in the previous versions.
The main difference in this version is that the pool is no longer
resizeable nor limited in number of marks, even though we only
pre-allocate 32 slots. In addition, ext4 was modified to always return
non-zero errno, and the documentation was fixed accordingly (No longer
suggests we return EXT4_ERR* values.
I also droped the Reviewed-by tags from the ext4 patch, due to the
changes above.
Please let me know what you think.
This was tested with LTP for regressions and also using the sample code
on the last patch, with a corrupted image. I wrote a new ltp test for
this feature which is being reviewed and is available at:
https://gitlab.collabora.com/krisman/ltp -b fan-fs-error
In addition, I wrote a man-page that can be pulled from:
https://gitlab.collabora.com/krisman/man-pages.git -b fan-fs-error
And is being reviewed at the list.
I also pushed this full series to:
https://gitlab.collabora.com/krisman/linux -b fanotify-notifications-v8
Thank you
Cc: Darrick J. Wong <djwong@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Dave Chinner <david@fromorbit.com>
Cc: jack@suse.com
To: amir73il@gmail.com
Cc: dhowells@redhat.com
Cc: khazhy@google.com
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-ext4@vger.kernel.org
Cc: linux-api@vger.kernel.org
Cc: linux-api@vger.kernel.org
Amir Goldstein (3):
fsnotify: pass data_type to fsnotify_name()
fsnotify: pass dentry instead of inode data
fsnotify: clarify contract for create event hooks
Gabriel Krisman Bertazi (28):
fsnotify: Don't insert unmergeable events in hashtable
fanotify: Fold event size calculation to its own function
fanotify: Split fsid check from other fid mode checks
inotify: Don't force FS_IN_IGNORED
fsnotify: Add helper to detect overflow_event
fsnotify: Add wrapper around fsnotify_add_event
fsnotify: Retrieve super block from the data field
fsnotify: Protect fsnotify_handle_inode_event from no-inode events
fsnotify: Pass group argument to free_event
fanotify: Support null inode event in fanotify_dfid_inode
fanotify: Allow file handle encoding for unhashed events
fanotify: Encode empty file handle when no inode is provided
fanotify: Require fid_mode for any non-fd event
fsnotify: Support FS_ERROR event type
fanotify: Reserve UAPI bits for FAN_FS_ERROR
fanotify: Pre-allocate pool of error events
fanotify: Support enqueueing of error events
fanotify: Support merging of error events
fanotify: Wrap object_fh inline space in a creator macro
fanotify: Add helpers to decide whether to report FID/DFID
fanotify: Report fid entry even for zero-length file_handle
fanotify: WARN_ON against too large file handles
fanotify: Report fid info for file related file system errors
fanotify: Emit generic error info for error event
fanotify: Allow users to request FAN_FS_ERROR events
ext4: Send notifications on error
samples: Add fs error monitoring example
docs: Document the FAN_FS_ERROR event
.../admin-guide/filesystem-monitoring.rst | 74 +++++++++
Documentation/admin-guide/index.rst | 1 +
fs/ext4/super.c | 8 +
fs/nfsd/filecache.c | 3 +
fs/notify/fanotify/fanotify.c | 117 +++++++++++--
fs/notify/fanotify/fanotify.h | 54 +++++-
fs/notify/fanotify/fanotify_user.c | 156 +++++++++++++-----
fs/notify/fsnotify.c | 10 +-
fs/notify/group.c | 2 +-
fs/notify/inotify/inotify_fsnotify.c | 5 +-
fs/notify/inotify/inotify_user.c | 6 +-
fs/notify/notification.c | 14 +-
include/linux/fanotify.h | 9 +-
include/linux/fsnotify.h | 58 +++++--
include/linux/fsnotify_backend.h | 96 ++++++++++-
include/uapi/linux/fanotify.h | 8 +
kernel/audit_fsnotify.c | 3 +-
kernel/audit_watch.c | 3 +-
samples/Kconfig | 9 +
samples/Makefile | 1 +
samples/fanotify/Makefile | 5 +
samples/fanotify/fs-monitor.c | 142 ++++++++++++++++
22 files changed, 685 insertions(+), 99 deletions(-)
create mode 100644 Documentation/admin-guide/filesystem-monitoring.rst
create mode 100644 samples/fanotify/Makefile
create mode 100644 samples/fanotify/fs-monitor.c
--
2.33.0
next reply other threads:[~2021-10-25 20:08 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 19:27 Gabriel Krisman Bertazi [this message]
2021-10-25 19:27 ` [PATCH v9 01/31] fsnotify: pass data_type to fsnotify_name() Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 02/31] fsnotify: pass dentry instead of inode data Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 03/31] fsnotify: clarify contract for create event hooks Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 04/31] fsnotify: Don't insert unmergeable events in hashtable Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 05/31] fanotify: Fold event size calculation to its own function Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 06/31] fanotify: Split fsid check from other fid mode checks Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 07/31] inotify: Don't force FS_IN_IGNORED Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 08/31] fsnotify: Add helper to detect overflow_event Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 09/31] fsnotify: Add wrapper around fsnotify_add_event Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 10/31] fsnotify: Retrieve super block from the data field Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 11/31] fsnotify: Protect fsnotify_handle_inode_event from no-inode events Gabriel Krisman Bertazi
2021-10-26 7:01 ` Amir Goldstein
2021-10-26 11:47 ` Jan Kara
2021-10-25 19:27 ` [PATCH v9 12/31] fsnotify: Pass group argument to free_event Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 13/31] fanotify: Support null inode event in fanotify_dfid_inode Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 14/31] fanotify: Allow file handle encoding for unhashed events Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 15/31] fanotify: Encode empty file handle when no inode is provided Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 16/31] fanotify: Require fid_mode for any non-fd event Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 17/31] fsnotify: Support FS_ERROR event type Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 18/31] fanotify: Reserve UAPI bits for FAN_FS_ERROR Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 19/31] fanotify: Pre-allocate pool of error events Gabriel Krisman Bertazi
2021-10-26 7:09 ` Amir Goldstein
2021-10-25 19:27 ` [PATCH v9 20/31] fanotify: Support enqueueing " Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 21/31] fanotify: Support merging " Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 22/31] fanotify: Wrap object_fh inline space in a creator macro Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 23/31] fanotify: Add helpers to decide whether to report FID/DFID Gabriel Krisman Bertazi
2021-10-26 7:02 ` Amir Goldstein
2021-10-25 19:27 ` [PATCH v9 24/31] fanotify: Report fid entry even for zero-length file_handle Gabriel Krisman Bertazi
2021-10-26 9:09 ` Amir Goldstein
2021-10-26 12:06 ` Jan Kara
2021-10-25 19:27 ` [PATCH v9 25/31] fanotify: WARN_ON against too large file handles Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 26/31] fanotify: Report fid info for file related file system errors Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 27/31] fanotify: Emit generic error info for error event Gabriel Krisman Bertazi
2021-10-26 12:11 ` Jan Kara
2021-10-25 19:27 ` [PATCH v9 28/31] fanotify: Allow users to request FAN_FS_ERROR events Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 29/31] ext4: Send notifications on error Gabriel Krisman Bertazi
2021-10-26 4:00 ` Theodore Ts'o
2021-10-26 7:05 ` Amir Goldstein
2021-10-26 12:12 ` Jan Kara
2021-10-25 19:27 ` [PATCH v9 30/31] samples: Add fs error monitoring example Gabriel Krisman Bertazi
2021-10-25 19:27 ` [PATCH v9 31/31] docs: Document the FAN_FS_ERROR event Gabriel Krisman Bertazi
2021-10-26 12:19 ` Jan Kara
2021-10-26 9:12 ` [PATCH v9 00/31] file system-wide error monitoring Amir Goldstein
2021-10-27 11:22 ` Jan Kara
2021-10-27 12:36 ` Amir Goldstein
2021-10-27 13:03 ` Gabriel Krisman Bertazi
2021-10-28 5:55 ` Amir Goldstein
2021-10-29 22:23 ` Gabriel Krisman Bertazi
2021-10-30 6:53 ` Amir Goldstein
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=20211025192746.66445-1-krisman@collabora.com \
--to=krisman@collabora.com \
--cc=amir73il@gmail.com \
--cc=david@fromorbit.com \
--cc=dhowells@redhat.com \
--cc=djwong@kernel.org \
--cc=jack@suse.com \
--cc=kernel@collabora.com \
--cc=khazhy@google.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.