From: Jan Kara <jack@suse.cz>
To: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org,
linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org,
amir73il@gmail.com, jack@suse.cz
Subject: Re: [patch] fanotify.7, fanotify_init.2, fanotify_mark.2: Document FAN_REPORT_FID and directory modification events
Date: Fri, 29 Mar 2019 22:37:30 +0100 [thread overview]
Message-ID: <20190329213730.GD8757@quack2.suse.cz> (raw)
In-Reply-To: <20190325005133.GA13990@lithium.mbobrowski.org>
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@mbobrowski.org>
> Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Looks good to me, you can add:
Reviewed-by: Jan Kara <jack@suse.cz>
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@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2019-03-29 21:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-25 0:51 [patch] fanotify.7, fanotify_init.2, fanotify_mark.2: Document FAN_REPORT_FID and directory modification events Matthew Bobrowski
2019-03-29 21:37 ` Jan Kara [this message]
2019-03-30 0:15 ` Matthew Bobrowski
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=20190329213730.GD8757@quack2.suse.cz \
--to=jack@suse.cz \
--cc=amir73il@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=mbobrowski@mbobrowski.org \
--cc=mtk.manpages@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).