From: Al Viro <viro@ZenIV.linux.org.uk>
To: Stef Bon <stefbon@gmail.com>
Cc: Stef Bon <stef@bononline.nl>,
linux-fsdevel@vger.kernel.org, rlove@rlove.org,
eparis@parisplace.org
Subject: Re: [PATCH] VFS/inotify: send netlink messages when an inotify watch has been set or removed.
Date: Sat, 7 Jan 2012 15:42:52 +0000 [thread overview]
Message-ID: <20120107154252.GN23916@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CANXojcyTOJE2_fpkuHUCvNYa+cJ2rF17MkSXm6PY5JLMzurW0Q@mail.gmail.com>
On Sat, Jan 07, 2012 at 04:03:26PM +0100, Stef Bon wrote:
> Futher, the FUSE fs knows it's own mountpoint. (ignore the submounts
> on a FUSE fs here), it can filter out the watches which are set on the
> fs.
> This is not so hard right? What problems with "no way to tell at which
> locations the damn thing happens to" you are pointing at??
Filesystem may be mounted at many places. The set of those locations
depends on the process. It may change at any time. With no way for
the filesystem to know about that (nor should it care, actually).
See mount(2). Pay particular attention to MS_MOVE and MS_BIND flags
(== --move and --bind in mount(8)).
Moreover, it's not just maintaining the table of what is mounted where;
different processes may bloody well have different sets of mounts.
And even assuming we started sending notifications on *everything*,
it still would not be enough - how is your FUSE server supposed to
distinguish between
* "add watch" notification sent
* pathname argument of inotify_add_watch() resolved (down in
inotify_find_inode())
* "mount --move" notification sent, mounted subtree moved
and
* "add watch" notification sent
* "mount --move" notification sent, mounted subtree moved
* pathname argument of inotify_add_watch() resolved (down in
inotify_find_inode())
when the netlink traffic it sees is identical in both cases? And results
are very much _not_ the same...
IOW, what you are proposing is inherently racy.
next prev parent reply other threads:[~2012-01-07 15:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-07 13:36 [PATCH] VFS/inotify: send netlink messages when an inotify watch has been set or removed Stef Bon
2012-01-07 14:38 ` Al Viro
2012-01-07 15:03 ` Stef Bon
2012-01-07 15:42 ` Al Viro [this message]
2012-01-07 15:57 ` Al Viro
2012-01-07 16:59 ` Stef Bon
2012-01-07 19:05 ` Al Viro
2012-01-07 21:13 ` Stef Bon
-- strict thread matches above, loose matches on Subject: below --
2012-01-05 20:56 Stef Bon
2012-01-06 14:13 ` Stef Bon
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=20120107154252.GN23916@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=eparis@parisplace.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=rlove@rlove.org \
--cc=stef@bononline.nl \
--cc=stefbon@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).