[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201008201307.37748.agruen@suse.de>
Date: Fri, 20 Aug 2010 13:07:36 +0200
From: Andreas Gruenbacher <agruen@...e.de>
To: Eric Paris <eparis@...hat.com>, David Howells <dhowells@...hat.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Matt Helsley <matthltc@...ibm.com>,
torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
viro@...iv.linux.org.uk, akpm@...ux-foundation.org,
Michael Kerrisk <michael.kerrisk@...il.com>,
linux-fsdevel@...r.kernel.org
Subject: Re: [GIT PULL] notification tree: directory events
On Friday 20 August 2010 05:38:17 Eric Paris wrote:
> On Fri, 2010-08-20 at 01:41 +0200, Andreas Gruenbacher wrote:
> > (2) Construct a file descriptor that refers to the file that could not be
> > dentry_open()ed, but which cannot be used for any I/O, and pass the
> > error condition in a separate field. The kernel has all the
> > information needed for doing that, and it shouldn't be hard to
> > implement.
> >
> > That way, the listener always has a file descriptor to poke around
> > with.
> >
> > Failing to do (2) right now, I think it still makes sense to separate the
> > file descriptor from the error code in struct fanotify_event_metadata;
> > this would enable us to do (2) later if we decide to.
>
> In reference to (2), I don't even understand what an fd is that can't be
> used for anything. I'll let Al or Christoph respond if they feel like
> it, but it sounds crazy to me. You want to just magic up some struct
> file and attach a struct path to it even though dentry_open() failed?
> So you can do what with it?
I've never said the fd can't be used for anything. The idea would be to
allow the file to be stat()ed, to poke around in /proc/fd/ in the hope to
get a somewhat useful pathname out, or to use something like xstat() on the
fd one day (David Howells is going to be looking into that).
It would be a good thing to be able to use the same mechanisms for
identifying the file that are available for a "normal" file descriptor.
> On a more realistic note, I'm not opposed to (1), however, your
> arguments would lead one to reject inotify as the IN_OVERFLOW or oom
> conditions will result in silently lost events or events which provide
> no useful information since the notification system has broken down.
Nonsense. An overflow event obviously is not associated with any one file,
so that would be the (only) case where you should get an event that doesn't
refer to a file.
Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists