aboutsummaryrefslogtreecommitdiffstats
path: root/man2
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2020-08-25 14:40:55 +0300
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-08-28 14:16:03 +0200
commite9f14fa0bbc13a86912bc558d7876eeff406bb58 (patch)
tree107f306be9bc79a66bc9afa9e4c9673d061ae326 /man2
parentb216da617f0557f147cd4b1283747e0341151c10 (diff)
downloadman-pages-e9f14fa0bbc13a86912bc558d7876eeff406bb58.tar.gz
fanotify.7, fanotify_init.2: Document FAN_REPORT_DIR_FID
Document fanotify_init(2) flag FAN_REPORT_DIR_FID and event info type FAN_EVENT_INFO_TYPE_DFID. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2')
-rw-r--r--man2/fanotify_init.235
1 files changed, 33 insertions, 2 deletions
diff --git a/man2/fanotify_init.2 b/man2/fanotify_init.2
index 54646e3c68..6167a1c377 100644
--- a/man2/fanotify_init.2
+++ b/man2/fanotify_init.2
@@ -1,4 +1,4 @@
-.\" Copyright (C) 2013, Heinrich Schuchardt <xypron.glpk@gmx.de>
+\" Copyright (C) 2013, Heinrich Schuchardt <xypron.glpk@gmx.de>
.\"
.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
@@ -191,7 +191,38 @@ is not permitted with this flag and will result in the error
.BR EINVAL .
See
.BR fanotify (7)
-for additional information.
+for additional details.
+.TP
+.BR FAN_REPORT_DIR_FID " (since Linux 5.9)"
+Events for fanotify groups initialized with this flag will contain
+(see exceptions below) additional information about a directory object
+correlated to an event.
+An additional record of type
+.BR FAN_EVENT_INFO_TYPE_DFID
+encapsulates the information about the directory object and is included
+alongside the generic event metadata structure.
+For events that occur on a non-directory object, the additional structure
+includes a file handle that identifies the parent directory filesystem object.
+Note that there is no guarantee that the directory filesystem object will be
+found at the location described by the file handle information at the time
+the event is received.
+When combined with the flag
+.BR FAN_REPORT_FID ,
+two records may be reported with events that occur on a non-directory object,
+one to identify the non-directory object itself and one to identify the parent
+directory object.
+Note that in some cases, a filesystem object does not have a parent,
+for example, when an event occurs on an unlinked but open file.
+In that case, with the
+.BR FAN_REPORT_FID
+flag, the event will be reported with only one record to identify the
+non-directory object itself, because there is no directory associated with
+the event. Without the
+.BR FAN_REPORT_FID
+flag, no event will be reported.
+See
+.BR fanotify (7)
+for additional details.
.PP
The
.I event_f_flags