From: Jan Kara <jack@suse.cz>
To: Amir Goldstein <amir73il@gmail.com>
Cc: "Jan Kara" <jack@suse.cz>, "Filip Štědronský" <r.lklm@regnarg.cz>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"Alexander Viro" <viro@zeniv.linux.org.uk>
Subject: Re: [RFC 1/2] fanotify: new event FAN_MODIFY_DIR
Date: Thu, 16 Mar 2017 11:38:59 +0100 [thread overview]
Message-ID: <20170316103859.GR12989@quack2.suse.cz> (raw)
In-Reply-To: <CAOQ4uxjxbQsnhC39Swz3iy64fN755mjSqsws20BJvpmcU5tJ5w@mail.gmail.com>
On Wed 15-03-17 16:34:11, Amir Goldstein wrote:
> On Wed, Mar 15, 2017 at 4:05 PM, Jan Kara <jack@suse.cz> wrote:
> >> So the string fields in my proposal are optional.
> >> userspace opts-in to get them by specifying the FAN_EVENT_INFO_NAME flag:
> >>
> >> fanotify_init(FAN_CLOEXEC | FAN_CLASS_NOTIF |
> >> FAN_EVENT_INFO_PARENT | FAN_EVENT_INFO_NAME,
> >>
> >> If you don't specify FAN_EVENT_INFO_NAME, you can get filename events
> >> FAN_MOVE|FAN_CREATE|FAN_DELETE without the name.
> >
> > So when thinking about this again, I'm again concerned that the names need
> > not tell userspace what it thinks. I know we already discussed this but
> > in our last discussion I think I forgot to point out that inotify directory
> > events (and fanotify would be the same AFAICT) may come out of order compared
> > to real filesystem changes. E.g. sequence:
> >
> > Task 1 Task 2
> >
> > mv a b
> > mv b c
> >
> > may come out of inotify as:
> >
> > IN_MOVED_FROM "b" COOKIE 1
> > IN_MOVED_TO "c" COOKIE 1
> > IN_MOVED_FROM "a" COOKIE 2
> > IN_MOVED_TO "b" COOKIE 2
> >
>
> Really? How come?
>
> fsnotify_move() inside vfs_rename() is serialized with lock_rename()
Sorry, I got confused by the unlocking in vfs_rename() however that unlocks
only the moved file / directory but not the directory in which the rename
is happening. Taking my objection back.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2017-03-16 10:39 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 23:02 Filip Štědronský
2017-03-13 23:03 ` [RFC 2/2] fanotify: emit FAN_MODIFY_DIR on filesystem changes Filip Štědronský
2017-03-14 11:18 ` Amir Goldstein
2017-03-14 14:58 ` Filip Štědronský
2017-03-14 15:35 ` Amir Goldstein
2017-03-15 8:19 ` Marko Rauhamaa
2017-03-15 13:39 ` Jan Kara
2017-03-15 14:18 ` Marko Rauhamaa
2017-03-15 14:44 ` Amir Goldstein
2017-03-19 10:19 ` Jan Kara
2017-03-19 10:37 ` Filip Štědronský
2017-03-19 18:04 ` Jan Kara
2017-03-20 11:40 ` Amir Goldstein
2017-03-20 11:52 ` Filip Štědronský
2017-03-21 15:38 ` J. Bruce Fields
2017-03-21 16:41 ` Jan Kara
2017-03-21 17:45 ` J. Bruce Fields
2017-03-13 23:16 ` [RFC 1/2] fanotify: new event FAN_MODIFY_DIR Filip Štědronský
2017-03-14 10:40 ` Amir Goldstein
2017-03-14 13:46 ` Filip Štědronský
2017-03-14 15:07 ` Amir Goldstein
2017-03-20 12:10 ` Amir Goldstein
2017-03-14 10:11 ` Amir Goldstein
2017-03-14 12:41 ` Filip Štědronský
2017-03-14 13:55 ` Amir Goldstein
2017-03-14 14:48 ` Filip Štědronský
2017-03-14 22:30 ` Amir Goldstein
2017-03-15 14:05 ` Jan Kara
2017-03-15 14:34 ` Amir Goldstein
2017-03-16 10:38 ` Jan Kara [this message]
2017-03-15 4:52 ` Michael Kerrisk
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=20170316103859.GR12989@quack2.suse.cz \
--to=jack@suse.cz \
--cc=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=r.lklm@regnarg.cz \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®