Pull vfs error reporting updates from Christian Brauner: "This contains the changes to support generic I/O error reporting. Filesystems currently have no standard mechanism for reporting metadata corruption and file I/O errors to userspace via fsnotify. Each filesystem (xfs, ext4, erofs, f2fs, etc.) privately defines EFSCORRUPTED, and error reporting to fanotify is inconsistent or absent entirely. This introduces a generic fserror infrastructure built around struct super_block that gives filesystems a standard way to queue metadata and file I/O error reports for delivery to fsnotify. Errors are queued via mempools and queue_work to avoid holding filesystem locks in the notification path; unmount waits for pending events to drain. A new super_operations::report_error callback lets filesystem drivers respond to file I/O errors themselves (to be used by an upcoming XFS self-healing patchset). On the uapi side, EFSCORRUPTED and EUCLEAN are promoted from private per-filesystem definitions to canonical errno.h values across all architectures" * tag 'vfs-7.0-rc1.fserror' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: ext4: convert to new fserror helpers xfs: translate fsdax media errors into file "data lost" errors when convenient xfs: report fs metadata errors via fsnotify iomap: report file I/O errors to the VFS fs: report filesystem and file I/O errors to fsnotify uapi: promote EFSCORRUPTED and EUCLEAN to errno.h
Showing the changes to include/uapi (1 of 31 files). Show all
Unified · Split
| @@ -55,6 +55,7 @@ · 54 unmodified lines | |||
| 55 | #define EMULTIHOP 72 /* Multihop attempted */ | 55 | #define EMULTIHOP 72 /* Multihop attempted */ |
| 56 | #define EDOTDOT 73 /* RFS specific error */ | 56 | #define EDOTDOT 73 /* RFS specific error */ |
| 57 | #define EBADMSG 74 /* Not a data message */ | 57 | #define EBADMSG 74 /* Not a data message */ |
| 58 | #define EFSBADCRC EBADMSG /* Bad CRC detected */ | ||
| 58 | #define EOVERFLOW 75 /* Value too large for defined data type */ | 59 | #define EOVERFLOW 75 /* Value too large for defined data type */ |
| 59 | #define ENOTUNIQ 76 /* Name not unique on network */ | 60 | #define ENOTUNIQ 76 /* Name not unique on network */ |
| 60 | #define EBADFD 77 /* File descriptor in bad state */ | 61 | #define EBADFD 77 /* File descriptor in bad state */ |
| @@ -98,6 +99,7 @@ · 37 unmodified lines | |||
| 98 | #define EINPROGRESS 115 /* Operation now in progress */ | 99 | #define EINPROGRESS 115 /* Operation now in progress */ |
| 99 | #define ESTALE 116 /* Stale file handle */ | 100 | #define ESTALE 116 /* Stale file handle */ |
| 100 | #define EUCLEAN 117 /* Structure needs cleaning */ | 101 | #define EUCLEAN 117 /* Structure needs cleaning */ |
| 102 | #define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */ | ||
| 101 | #define ENOTNAM 118 /* Not a XENIX named type file */ | 103 | #define ENOTNAM 118 /* Not a XENIX named type file */ |
| 102 | #define ENAVAIL 119 /* No XENIX semaphores available */ | 104 | #define ENAVAIL 119 /* No XENIX semaphores available */ |
| 103 | #define EISNAM 120 /* Is a named type file */ | 105 | #define EISNAM 120 /* Is a named type file */ |