From 764d23cc3c3a9654953b2941a41c899217bee12d Mon Sep 17 00:00:00 2001 From: Amir Goldstein Date: Mon, 31 Mar 2025 10:27:59 +0200 Subject: [PATCH] man/man7/fanotify.7: Document FAN_DENY_ERRNO() Document FAN_DENY_ERRNO(), which was added in Linux 6.13 to report specific errors on file access. Cc: Jan Kara Cc: Josef Bacik Signed-off-by: Amir Goldstein Message-ID: <20250331082759.1424401-3-amir73il@gmail.com> Signed-off-by: Alejandro Colomar --- man/man7/fanotify.7 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/man/man7/fanotify.7 b/man/man7/fanotify.7 index ad864b762..156e4c35f 100644 --- a/man/man7/fanotify.7 +++ b/man/man7/fanotify.7 @@ -778,6 +778,28 @@ to deny the file operation. If access is denied, the requesting application call will receive an .B EPERM error. +Since Linux 6.13, +.\" commit b4b2ff4f61ded819bfa22e50fdec7693f51cbbee +if a notification group is initialized with class +.BR FAN_CLASS_PRE_CONTENT , +the file operation can be denied with errors other than +.BR EPERM . +For example, for the requesting application to get the +.B EIO +error, the event listener can write the response +.BR FAN_DENY_ERRNO ( EIO ). +At the time of writing, +only the following error values could be returned to the application with +.BR FAN_DENY_ERRNO (\f[I]e\f[]) +macro: +.BR EPERM , +.BR EIO , +.BR EBUSY , +.BR ETXTBSY , +.BR EAGAIN , +.BR ENOSPC , +.BR EDQUOT . +.P Additionally, if the notification group has been created with the .B FAN_ENABLE_AUDIT flag, then the -- 2.47.2