public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: Jan Kara <jack@suse.cz>, linux-man@vger.kernel.org
Subject: [PATCH v2 2/3] fanotify: Fixes for documentation of FAN_FS_ERROR
Date: Mon, 31 Mar 2025 15:39:58 +0200	[thread overview]
Message-ID: <20250331133959.1436376-2-amir73il@gmail.com> (raw)
In-Reply-To: <20250331133959.1436376-1-amir73il@gmail.com>

FAN_EVENT_INFO_TYPE_ERROR was missing from the list of info types.

The order of FAN_FS_ERROR entry in the event section was rather
arbitrary inside the group of fid info events.

FAN_FS_ERROR is a special event with error info, so place its entry
after the entries for fid info events and before the entries for
permission events.

Reduce unneeded newlines in the FAN_FS_ERROR entry.

Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---

Alejandro,

This unrelated cleanup was plit out of the FAN_PRE_ACCESS
patch and I have also added some extra cleanup in preparation for
adding mount events.

If you were going to re-organize the section describing the different
extra event info types, maybe better doing this after merging the new
types from v6.14: FAN_EVENT_INFO_TYPE_RANGE and FAN_EVENT_INFO_TYPE_MNT.

Thanks,
Amir.

 man/man2/fanotify_mark.2 | 44 +++++++++++++++++++---------------------
 man/man7/fanotify.7      |  7 ++++---
 2 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/man/man2/fanotify_mark.2 b/man/man2/fanotify_mark.2
index 47cafb21c..1d132fa1a 100644
--- a/man/man2/fanotify_mark.2
+++ b/man/man2/fanotify_mark.2
@@ -362,29 +362,6 @@ 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, 5.15.154, and 5.10.220)"
-.\" commit 9709bd548f11a092d124698118013f66e1740f9b
-Create an event when a filesystem error
-leading to inconsistent filesystem metadata 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
 .BR FAN_MOVED_FROM " (since Linux 5.1)"
 .\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
 Create an event when a file or directory has been moved from a marked
@@ -418,6 +395,27 @@ Create an event when a marked file or directory itself has been moved.
 An fanotify group that identifies filesystem objects by file handles
 is required.
 .TP
+.BR FAN_FS_ERROR " (since Linux 5.16, 5.15.154, and 5.10.220)"
+.\" commit 9709bd548f11a092d124698118013f66e1740f9b
+Create an event when a filesystem error
+leading to inconsistent filesystem metadata 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.
+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.
+See
+.BR fanotify (7)
+for additional details.
+.TP
 .B FAN_OPEN_PERM
 Create an event when a permission to open a file or directory is requested.
 An fanotify file descriptor created with
diff --git a/man/man7/fanotify.7 b/man/man7/fanotify.7
index fd16bf294..614410cd9 100644
--- a/man/man7/fanotify.7
+++ b/man/man7/fanotify.7
@@ -395,9 +395,6 @@ A child file or directory was deleted in a watched parent.
 .B FAN_DELETE_SELF
 A watched file or directory was deleted.
 .TP
-.B FAN_FS_ERROR
-A filesystem error was detected.
-.TP
 .B FAN_RENAME
 A file or directory has been moved to or from a watched parent directory.
 .TP
@@ -425,6 +422,9 @@ A file or directory that was opened read-only
 .RB ( O_RDONLY )
 was closed.
 .TP
+.B FAN_FS_ERROR
+A filesystem error was detected.
+.TP
 .B FAN_Q_OVERFLOW
 The event queue exceeded the limit on number of events.
 This limit can be overridden by specifying the
@@ -510,6 +510,7 @@ The value of this field can be set to one of the following:
 .BR FAN_EVENT_INFO_TYPE_FID ,
 .BR FAN_EVENT_INFO_TYPE_DFID ,
 .BR FAN_EVENT_INFO_TYPE_DFID_NAME ,
+.BR FAN_EVENT_INFO_TYPE_ERROR ,
 or
 .BR FAN_EVENT_INFO_TYPE_PIDFD .
 The value set for this field
-- 
2.34.1


  reply	other threads:[~2025-03-31 13:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31 13:39 [PATCH v2 1/3] fanotify: Document FAN_REPORT_FD_ERROR Amir Goldstein
2025-03-31 13:39 ` Amir Goldstein [this message]
2025-04-02 20:54   ` [PATCH v2 2/3] fanotify: Fixes for documentation of FAN_FS_ERROR Alejandro Colomar
2025-04-03 10:01     ` Amir Goldstein
2025-04-03 10:40       ` Alejandro Colomar
2025-03-31 13:39 ` [PATCH v2 3/3] fanotify: Document FAN_PRE_ACCESS event Amir Goldstein
2025-04-02 20:49 ` [PATCH v2 1/3] fanotify: Document FAN_REPORT_FD_ERROR Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250331133959.1436376-2-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=alx@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox