On Mon 25-03-19 11:51:39, Matthew Bobrowski wrote: > Details relating to the new initialization flag FAN_REPORT_FID has been > added. As part of the FAN_REPORT_FID feature, a new set of event masks are > available and have been documented accordingly. > > A simple example program has been added to also support the understanding > and use case of FAN_REPORT_FID. > > Signed-off-by: Matthew Bobrowski <mbobrowski@xxxxxxxxxxxxxx> > Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx> Looks good to me, you can add: Reviewed-by: Jan Kara <jack@xxxxxxx> Two nits below: > +.I hdr > +This is a structure of type > +.IR fanotify_event_info_header . > +It is a generic header that contains information used to describe > +additional information attached to the event. > +For example, when an fanotify file descriptor is created using > +.B FAN_REPORT_FID > +the > +.I info_type > +field of this header is set to > +.BR FAN_EVENT_INFO_TYPE_FID . > +Event listeners can use this field to check that events of the correct ^^^ additional information of the correct type? ... > + /* Process all events within the buffer */ > + for (metadata = (struct fanotify_event_metadata *) events_buf; > + FAN_EVENT_OK(metadata, len); > + metadata = FAN_EVENT_NEXT(metadata, len)) { > + fid = (struct fanotify_event_info_fid *) (metadata + 1); > + file_handle = (struct file_handle *) fid->handle; > + > + /* Ensure that the event info is of the correct type */ > + if (fid->hdr.info_type != FAN_EVENT_INFO_TYPE_FID) { > + fprintf(stderr, "Received unexpected event type.\\n"); ^^^ event info type? Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR