Re: [PATCH v5] fanotify.7, fanotify_mark.2: Document FAN_FS_ERROR

Matthew Bobrowski
2022-04-20T05:29:35Z

On Mon, Apr 18, 2022 at 12:39:33PM -0400, Gabriel Krisman Bertazi wrote:
> FAN_FS_ERROR is a new event for fanotify to report filesystem errors
> that might lead to some corruption.
> This documents how to use the feature and specific caveats.
>
> To: Michael Kerrisk <mtk.manpages@gmail.com>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Matthew Bobrowski <repnop@google.com>
> Cc: linux-man@vger.kernel.org
> Reviewed-by: Amir Goldstein <amir73il@gmail.com>
> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
>
> ---
> Matthew,
>
> as discussed this is rebased on top of the PIDFD documentation: commit
> 207080c7f7f5 ("fanotify: Document FAN_REPORT_PIDFD Feature")

Looks OK. Feel free to add:

Reviewed-by: Matthew Bobrowski <repnop@google.com>

> diff --git a/man2/fanotify_mark.2 b/man2/fanotify_mark.2
> index 9a45cbb77893..0bdee67850fb 100644
> --- a/man2/fanotify_mark.2
> +++ b/man2/fanotify_mark.2
> @@ -203,6 +203,30 @@ Create an event when a marked file or directory itself is deleted.
> An fanotify group that identifies filesystem objects by file handles
> is required.
> .TP
> +.BR FAN_FS_ERROR " (since Linux 5.16)"
> +.\" commit 9709bd548f11a092d124698118013f66e1740f9b
> +Create an event when a filesystem error
> +leading to inconsisted filesystem metadata
^
inconsistent

Alejandro can likely address this spelling mistake when applying this
patch. There's also the early line wrap which I don't quite understand
here...

> +is detected.
> +An additional information record of type
> +.B FAN_EVENT_INFO_TYPE_ERROR
> +is returned for each event in the read buffer.
> +An fanotify group that identifies filesystem objects by file handles
> +is required.
> +.IP
> +Events of such type are dependent on support
> +from the underlying filesystem.
> +At the time of writing,
> +only the
> +.B ext4
> +filesystem reports
> +.B FAN_FS_ERROR
> +events.
> +.IP
> +See
> +.BR fanotify (7)
> +for additional details.
> +.TP

/M