aboutsummaryrefslogtreecommitdiffstats
path: root/man7
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 /man7
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 'man7')
-rw-r--r--man7/fanotify.730
1 files changed, 26 insertions, 4 deletions
diff --git a/man7/fanotify.7 b/man7/fanotify.7
index 734fa7b7c0..fa1c85159d 100644
--- a/man7/fanotify.7
+++ b/man7/fanotify.7
@@ -137,12 +137,13 @@ until either a file event occurs or the call is interrupted by a signal
(see
.BR signal (7)).
.PP
-The use of the
-.BR FAN_REPORT_FID
-flag in
+The use of one of the flags
+.BR FAN_REPORT_FID ,
+.BR FAN_REPORT_DIR_FID
+in
.BR fanotify_init (2)
influences what data structures are returned to the event listener for each
-event. Events reported to a group initialized with this flag will
+event. Events reported to a group initialized with one of these flags will
use file handles to identify filesystem objects instead of file descriptors.
.TP
After a successful
@@ -409,6 +410,19 @@ a single information record is expected to be attached to the event with
.I info_type
field value of
.BR FAN_EVENT_INFO_TYPE_FID .
+When an fanotify file descriptor is created using the combination of
+.BR FAN_REPORT_FID
+and
+.BR FAN_REPORT_DIR_FID ,
+there may be two information records attached to the event. One with
+.I info_type
+field value of
+.BR FAN_EVENT_INFO_TYPE_DFID ,
+identifying a parent directory object, and one with
+.I info_type
+field value of
+.BR FAN_EVENT_INFO_TYPE_FID ,
+identifying a non-directory object.
The
.I fanotify_event_info_header
contains a
@@ -466,6 +480,14 @@ field is
the
.IR file_handle
identifies the object correlated to the event.
+If the value of
+.I info_type
+field is
+.BR FAN_EVENT_INFO_TYPE_DFID ,
+the
+.IR file_handle
+identifies the directory object correlated to the event or the parent directory
+of the non-directory object correlated to the event.
.PP
The following macros are provided to iterate over a buffer containing
fanotify event metadata returned by a