linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Bobrowski <mbobrowski@mbobrowski.org>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jan Kara <jack@suse.cz>,
	"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
	linux-man@vger.kernel.org, linux-api@vger.kernel.org,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC PATCH 1/1] fanotify.7, fanotify_init.2, fanotify_mark.2: Document FAN_REPORT_FID and directory modification events
Date: Tue, 19 Mar 2019 23:06:09 +1100	[thread overview]
Message-ID: <20190319120607.GB4589@lithium.mbobrowski.org> (raw)
In-Reply-To: <CAOQ4uxgEnxp0cHA=pPJK24FW=Y_Rv5gLRN0U6V1nsuvoT5xrxw@mail.gmail.com>

On Mon, Mar 18, 2019 at 01:05:13PM +0200, Amir Goldstein wrote:
> > > > > +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
> > > > > +type are being received.
> > > >
> > > > I think here you should also speak about the 'len' field in the header
> > > > which can be used to skip additional information that is not understood /
> > > > uninteresting for the receiver of the event.
> > >
> > > I don't have any objections to add this as I do believe mentioning it has
> > > added benefit. Perhaps we could consider adding in a section which describes
> > > all the fanotify_event_info_header fields? Maybe it's not necessary though,
> > > and just mentioning these two fields here would be enough. Thoughts?
> >
> > Well, there are just two fields - 'info_type' and 'len'. There's also 'pad'
> > but that doesn't really count ;). So I think that briefly explaining 'len'
> > is all that's needed. If you want to formalize this a bit more in a
> > separate section, I'm not opposed but I don't think it's really necessary.

Jan, sure I'd have to agree with you, but was just thinking to put the thought
out there.
 
> I did not get a reply from Matthew, so to make sure my comment
> about 'len' wasn't missed.

Sorry Amir, I definitely did see the note you dropped about the 'len' field.
Apologies for not getting back to you directly about that.

> I think 'len' field should get a similar treatment to 'event_len' -
> "In the current implementation, the value of len is always
> (event_len -  FAN_EVENT_METADATA_LEN). However, the API
> is designed..."
> 
> And the same sentence about 'event_len' field is now no longer
> correct so it should be updated, e.g.:
> 
> event_len
>       ...
>       Without FAN_REPORT_FID, the value of event_len is always
>       FAN_EVENT_METADATA_LEN.  With FAN_REPORT_FID,
>       event_len also includes the variable length file identifier.

Understood, I will make sure to incorporate these details into my revised
patch.

-- 
Matthew Bobrowski

      reply	other threads:[~2019-03-19 12:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12  2:48 [RFC PATCH 0/1] fanotify.7, fanotify_init.2, fanotify_mark.2: Document FAN_REPORT_FID and Directory entry events Matthew Bobrowski
2019-03-12  2:48 ` [RFC PATCH 1/1] fanotify.7, fanotify_init.2, fanotify_mark.2: Document FAN_REPORT_FID and directory modification events Matthew Bobrowski
2019-03-13 15:07   ` Jan Kara
2019-03-13 15:51     ` Amir Goldstein
2019-03-16 12:35     ` Matthew Bobrowski
2019-03-18 10:01       ` Jan Kara
2019-03-18 11:05         ` Amir Goldstein
2019-03-19 12:06           ` Matthew Bobrowski [this message]

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=20190319120607.GB4589@lithium.mbobrowski.org \
    --to=mbobrowski@mbobrowski.org \
    --cc=amir73il@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-man@vger.kernel.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).