[PATCH v1 0/2] ntfs: report filesystem errors to fsnotify

Baolin Liu posted 2 patches 1 month ago
fs/ntfs/super.c  | 15 +++++++++++++++
fs/ntfs/volume.h | 29 +++++++++++++++++++++++++++--
2 files changed, 42 insertions(+), 2 deletions(-)
[PATCH v1 0/2] ntfs: report filesystem errors to fsnotify
Posted by Baolin Liu 1 month ago
From: Baolin Liu <liubaolin@kylinos.cn>

The ntfs driver reports volume errors only to dmesg. These two patches
wire up the generic fserror infrastructure so that health monitoring
daemons watching a mount with fanotify(FAN_FS_ERROR) also learn about
them.

Both hook the flag-setting helpers rather than individual call sites,
so no callers change: NVolSetErrors() for metadata corruption, and
NVolSetShutdown() for forced shutdown, which also covers the
->shutdown super_operation.

Follow-up work, if this direction is acceptable: reporting corrupt
inodes with fserror_report_file_metadata() so that events carry a
useful FID.

Baolin Liu (2):
  ntfs: report volume errors to fsnotify
  ntfs: report forced shutdown to fsnotify

 fs/ntfs/super.c  | 15 +++++++++++++++
 fs/ntfs/volume.h | 29 +++++++++++++++++++++++++++--
 2 files changed, 42 insertions(+), 2 deletions(-)

-- 
2.51.0