From: Jan Kara <jack@suse.cz>
To: Matthew Bobrowski <repnop@google.com>
Cc: Amir Goldstein <amir73il@gmail.com>, Jan Kara <jack@suse.cz>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: FAN_REPORT_CHILD_FID
Date: Fri, 16 Jul 2021 11:47:55 +0200 [thread overview]
Message-ID: <20210716094755.GD31920@quack2.suse.cz> (raw)
In-Reply-To: <YPDKa0tZ+kIoT8Um@google.com>
On Fri 16-07-21 09:53:15, Matthew Bobrowski wrote:
> On Wed, Jul 14, 2021 at 03:09:56PM +0300, Amir Goldstein wrote:
> > I am still debating with myself between adding a new event type
> > (FAN_RENAME), adding a new report flag (FAN_REPORT_TARGET_FID)
> > that adds info records to existing MOVE_ events or some combination.
>
> Well, if we went with adding a new event FAN_RENAME and specifying that
> resulted in the generation of additional
> FAN_EVENT_INFO_TYPE_DFID_NAME_{FROM,TO} information record types for an
> event, wouldn't it be weird as it doesn't follow the conventional mechanism
> of a listener asking for additional information records? As in,
> traditionally we'd intialize the notification group with a flag and then
> that flag controls whether or not one is permitted to receive events of a
> particular type that may or may not include information records?
>
> Maybe a combination approach is needed in this instance, but this doesn't
> necessarily simplify things when attempting to document the API semantics
> IMO.
So there are couple of ways how to approach this I guess. One is that we
add a flag like FAN_REPORT_SECONDARY_DFID and FAN_REPORT_SECONDARY_NAME
which would add another DFID(+NAME) record of new type to rename event. In
principle these could be added to MOVED_FROM and/or MOVED_TO events
(probably both are useful). But I'd find the naming somewhat confusing and
difficult to sensibly describe.
That's why I think it may be clearer to go with new FAN_RENAME event that
will be triggered when the directory is on either end of rename(2) (source
or target). If DFID(+NAME) is enabled for the group, the event would report
both source and target DFIDs (and names if enabled) instead of one. I don't
think special FAN_REPORT_? flag to enable the second DFID would be useful
in this case (either for clarity or enabling some functionality).
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2021-07-16 9:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-11 17:02 FAN_REPORT_CHILD_FID Amir Goldstein
2021-07-12 11:10 ` FAN_REPORT_CHILD_FID Jan Kara
2021-07-12 13:00 ` FAN_REPORT_CHILD_FID Amir Goldstein
2021-07-12 16:26 ` FAN_REPORT_CHILD_FID Jan Kara
2021-07-12 18:08 ` FAN_REPORT_CHILD_FID Amir Goldstein
2021-07-14 1:16 ` FAN_REPORT_CHILD_FID Matthew Bobrowski
2021-07-14 12:09 ` FAN_REPORT_CHILD_FID Amir Goldstein
2021-07-15 23:53 ` FAN_REPORT_CHILD_FID Matthew Bobrowski
2021-07-16 9:47 ` Jan Kara [this message]
2021-07-16 11:24 ` FAN_REPORT_CHILD_FID Amir Goldstein
2021-07-27 10:44 ` FAN_REPORT_CHILD_FID Amir Goldstein
2021-07-28 9:51 ` FAN_REPORT_CHILD_FID Amir Goldstein
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=20210716094755.GD31920@quack2.suse.cz \
--to=jack@suse.cz \
--cc=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=repnop@google.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).