From: Ray Lee <ray-lk@madrabbit.org>
To: Paul Jackson <pj@sgi.com>
Cc: rml@novell.com, akpm@osdl.org, ttb@tentacle.dhs.org,
cfriesen@nortelnetworks.com,
Linux Kernel <linux-kernel@vger.kernel.org>,
gamin-list@gnome.org, viro@parcelfarce.linux.theplanet.co.uk,
iggy@gentoo.org
Subject: Re: [RFC][PATCH] inotify 0.10.0
Date: Mon, 04 Oct 2004 13:58:33 -0700 [thread overview]
Message-ID: <1096923513.14886.8.camel@orca.madrabbit.org> (raw)
In-Reply-To: <20040930210920.707a5421.pj@sgi.com>
On Thu, 2004-09-30 at 21:09 -0700, Paul Jackson wrote:
> If file "foo" goes away, and if the kernel only reports that inode
> 314159 was unlinked from a given directory, unless some user code
> previously remembered that inode 314159 was accessible from the
> directory entry named "foo", you can't tell the user that "foo"
> disappeared.
Right. Follow the same argument for renames, as well. ("Well, what did
it *used* be to named?") Short of caching the entire contents, there's
no way to know if all that's returned is an inode.
> Do you have the same problem with directories, if some cookie, not the
> full pathname, is passed back after an 'rmdir(2)' event? Or is it just
> that it's less onerous to track all the directories, because there's
> fewer of them?
In the case of a directory that's being monitored going away, userspace
has already asked for tracking events for that directory explicitly, and
has to keep track of the cookie ("watch descriptor") to directory name
mapping (or some context, at least) already. That's the only way it
knows the correct context for the events.
For example, I ask for monitoring of two different directories on my
system, both with a final path component of "etc". Since the kernel
can't pass back the full path (cf. mount --bind, or consider an
watch/chdir/watch sequence, if you believe the kernel should cache the
full path passed to it from userspace), it instead needs to pass back
something unique for that directory. The name isn't, and the full
pathname isn't available to the kernel. So, the watch descriptor, being
an arbitrary but unique cookie, steps in.
> > You're saying pass the inode number, as it's smaller and makes for an
> > easier and higher speed interface to get changes to userspace (if I
> > understand you correctly).
>
> That was the idea, yes. Most of it anyway. That and striving to keep
> the API the kernel presents to the user minimal and orthogonal.
<Nod> That's actually a stronger argument with me than the micro-
optimization. Orthogonal interfaces allow for more uses. However, I can
find no way to clean up the interface any more than what's been
suggested so far.
> If there is a way, any way, for user code to get something from the
> kernel, then I don't mind dragging my feet on providing other ways,
> until I see a good reason.
Fair enough.
> It's always worth a bit of effort to keep
> kernel API's minimal and orthogonal.
Agreed.
> Your "delete and rename" point above seems now like a good reason.
It would bring inotify almost down to the level of usefulness of
dnotify, which would be painful.
Ray
next prev parent reply other threads:[~2004-10-04 20:58 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-27 2:02 [RFC][PATCH] inotify 0.10.0 John McCutchan
2004-09-27 4:17 ` Andrew Morton
2004-09-27 20:52 ` Robert Love
2004-09-28 4:41 ` Andrew Morton
2004-09-28 2:14 ` Robert Love
2004-09-28 3:44 ` John McCutchan
2004-09-28 17:31 ` Robert Love
2004-09-28 5:45 ` Ray Lee
2004-09-28 19:08 ` Andrew Morton
2004-09-28 16:41 ` Chris Friesen
2004-09-28 16:53 ` Robert Love
2004-09-28 17:32 ` Ray Lee
2004-09-28 20:34 ` John McCutchan
2004-09-28 21:20 ` Ray Lee
2004-09-30 4:15 ` Andrew Morton
2004-09-30 1:32 ` John McCutchan
2004-09-30 1:34 ` Robert Love
2004-09-30 3:05 ` Paul Jackson
2004-09-30 5:37 ` Chris Friesen
2004-09-30 12:43 ` Paul Jackson
2004-09-30 15:29 ` Ray Lee
2004-09-30 16:27 ` Paul Jackson
2004-09-30 16:53 ` Ray Lee
2004-09-30 17:48 ` Paul Jackson
2004-10-01 1:22 ` Ray Lee
2004-10-01 4:09 ` Paul Jackson
2004-10-04 20:58 ` Ray Lee [this message]
2004-09-28 20:40 ` John McCutchan
2004-09-28 20:47 ` Robert Love
2004-09-28 21:39 ` Ray Lee
2004-09-28 22:10 ` Robert Love
2004-09-28 21:32 ` Ray Lee
2004-09-30 4:31 ` Andrew Morton
2004-09-28 20:26 ` John McCutchan
2004-09-28 21:10 ` Ray Lee
2004-09-28 21:20 ` Robert Love
2004-09-28 21:21 ` John McCutchan
2004-09-28 21:35 ` Robert Love
2004-09-28 21:50 ` Ray Lee
2004-09-28 22:03 ` Robert Love
2004-09-27 16:21 ` [gamin] [RFC][PATCH] inotify 0.10.0 [u] Martin Schlemmer [c]
2004-09-27 16:24 ` Robert Love
2004-09-27 16:30 ` Martin Schlemmer [c]
2004-09-27 16:35 ` Robert Love
2004-09-27 17:10 ` Martin Schlemmer [c]
2004-09-27 16:25 ` Martin Schlemmer [c]
2004-09-27 17:12 ` [RFC][PATCH] inotify 0.10.0 Robert Love
2004-09-27 19:48 ` Paul Jackson
2004-09-27 20:22 ` patch] inotify: use bitmap.h functions Robert Love
2004-09-27 20:38 ` Paul Jackson
2004-09-27 19:51 ` [patch] inotify: make it configurable Robert Love
2004-09-27 19:53 ` [patch] inotify: doh Robert Love
2004-09-27 20:06 ` [RFC][PATCH] inotify 0.10.0 Robert Love
2004-09-27 20:39 ` [patch] inotify: don't check private_data Robert Love
2004-09-28 1:05 ` [patch] inotify: silly fix Robert Love
2004-09-28 17:38 ` [RFC][PATCH] inotify 0.10.0 Mike Waychison
2004-09-28 20:35 ` John McCutchan
2004-09-28 17:48 ` [patch] inotify: remove timer Robert Love
2004-09-28 21:46 ` [patch] inotify: use the idr layer Robert Love
2004-09-28 21:58 ` John McCutchan
2004-09-28 22:08 ` Robert Love
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=1096923513.14886.8.camel@orca.madrabbit.org \
--to=ray-lk@madrabbit.org \
--cc=akpm@osdl.org \
--cc=cfriesen@nortelnetworks.com \
--cc=gamin-list@gnome.org \
--cc=iggy@gentoo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.com \
--cc=rml@novell.com \
--cc=ttb@tentacle.dhs.org \
--cc=viro@parcelfarce.linux.theplanet.co.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.