Skip to content

file system-wide error monitoring

Gabriel Krisman Bertazi linux-api linux-ext4 linux-fsdevel 9 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest31 patches 18 repliesIn review
  2. v832 patches 33 repliesSuperseded
  3. v728 patches 38 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v621 patches47 repliesSuperseded
v523 patches22 repliesSuperseded
v416 patches12 repliesSuperseded
v315 patches40 repliesSuperseded
v214 patches8 repliesSuperseded
v111 patches16 repliesSuperseded

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/31fsnotify: pass data_type to fsnotify_name()include/linux/fsnotify.h+13 -90 replies
2/31fsnotify: pass dentry instead of inode datainclude/linux/fsnotify.h include/linux/fsnotify_backend.h+18 -30 replies
3/31fsnotify: clarify contract for create event hooksinclude/linux/fsnotify.h kernel/audit_fsnotify.c kernel/audit_watch.c+18 -100 replies
4/31fsnotify: Don't insert unmergeable events in hashtablefs/notify/fanotify/fanotify.c+4 -20 replies
5/31fanotify: Fold event size calculation to its own functionfs/notify/fanotify/fanotify_user.c+20 -150 replies
6/31fanotify: Split fsid check from other fid mode checksfs/notify/fanotify/fanotify_user.c+18 -90 replies
7/31inotify: Don't force FS_IN_IGNOREDfs/notify/inotify/inotify_user.c+3 -30 replies
8/31fsnotify: Add helper to detect overflow_eventfs/notify/fanotify/fanotify.h include/linux/fsnotify_backend.h+7 -10 replies
9/31fsnotify: Add wrapper around fsnotify_add_eventfs/notify/fanotify/fanotify.c fs/notify/inotify/inotify_fsnotify.c fs/notify/notification.c +1 more+25 -160 replies
10/31fsnotify: Retrieve super block from the data fieldfs/notify/fsnotify.c include/linux/fsnotify_backend.h+18 -40 replies
11/31fsnotify: Protect fsnotify_handle_inode_event from no-inode eventsfs/nfsd/filecache.c fs/notify/fsnotify.c include/linux/fsnotify_backend.h+7 -02 replies
12/31fsnotify: Pass group argument to free_eventfs/notify/fanotify/fanotify.c fs/notify/group.c fs/notify/inotify/inotify_fsnotify.c +2 more+7 -50 replies
13/31fanotify: Support null inode event in fanotify_dfid_inodefs/notify/fanotify/fanotify.c+1 -10 replies
14/31fanotify: Allow file handle encoding for unhashed eventsfs/notify/fanotify/fanotify.c+6 -20 replies
15/31fanotify: Encode empty file handle when no inode is providedfs/notify/fanotify/fanotify.c+8 -10 replies
16/31fanotify: Require fid_mode for any non-fd eventfs/notify/fanotify/fanotify_user.c include/linux/fanotify.h+9 -60 replies
17/31fsnotify: Support FS_ERROR event typeinclude/linux/fsnotify.h include/linux/fsnotify_backend.h+44 -10 replies
18/31fanotify: Reserve UAPI bits for FAN_FS_ERRORfs/notify/fanotify/fanotify.c include/uapi/linux/fanotify.h+2 -00 replies
19/31fanotify: Pre-allocate pool of error eventsfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h fs/notify/fanotify/fanotify_user.c +1 more+41 -11 reply
20/31fanotify: Support enqueueing of error eventsfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h+41 -00 replies
21/31fanotify: Support merging of error eventsfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h+27 -30 replies
22/31fanotify: Wrap object_fh inline space in a creator macrofs/notify/fanotify/fanotify.h+9 -30 replies
23/31fanotify: Add helpers to decide whether to report FID/DFIDfs/notify/fanotify/fanotify.h fs/notify/fanotify/fanotify_user.c+17 -61 reply
24/31fanotify: Report fid entry even for zero-length file_handlefs/notify/fanotify/fanotify.h fs/notify/fanotify/fanotify_user.c+8 -32 replies
25/31fanotify: WARN_ON against too large file handlesfs/notify/fanotify/fanotify.c+11 -10 replies
26/31fanotify: Report fid info for file related file system errorsfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h+17 -00 replies
27/31fanotify: Emit generic error info for error eventfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify.h fs/notify/fanotify/fanotify_user.c +1 more+44 -01 reply
28/31fanotify: Allow users to request FAN_FS_ERROR eventsfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify_user.c include/linux/fanotify.h+10 -20 replies
29/31ext4: Send notifications on errorfs/ext4/super.c+8 -03 replies
30/31samples: Add fs error monitoring examplesamples/Kconfig samples/Makefile samples/fanotify/Makefile +1 more+157 -00 replies
31/31docs: Document the FAN_FS_ERROR eventDocumentation/admin-guide/filesystem-monitoring.rst Documentation/admin-guide/index.rst+75 -01 reply

Reviews trailers per patch

All 31 patches have a Reviewed-by or Acked-by.

PatchJan KaraAmir GoldsteinTheodore Ts'o
1/31R-b
2/31R-b
3/31R-b
4/31R-b R-b
5/31R-b R-b
6/31R-b R-b
7/31R-b R-b
8/31R-b R-b
9/31R-b R-b
10/31R-b R-b
11/31R-b R-b
12/31R-b R-b
13/31R-b R-b
14/31R-b R-b
15/31R-b R-b
16/31R-b R-b
17/31R-b R-b
18/31R-b R-b
19/31R-b R-b
20/31R-b R-b
21/31R-b R-b
22/31R-b R-b
23/31R-b R-b
24/31R-b R-b
25/31R-b R-b
26/31R-b R-b
27/31R-b R-b
28/31R-b R-b
29/31R-b R-b A-b
30/31R-b R-b
31/31R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v9 thread

Cover letter [PATCH v9 00/31] file system-wide error monitoring

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 <[email protected]>
Cc: Theodore Ts'o <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: [email protected]
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

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
Signature · 1 line
2.33.0