Re: [GIT PULL] notification tree - try 37!

From: Andreas Gruenbacher
Date: Tue Aug 17 2010 - 11:49:18 EST


On Tuesday 17 August 2010 17:24:28 Eric Paris wrote:
> On Tue, 2010-08-17 at 10:38 +0200, Andreas Gruenbacher wrote:
> > One of the wonky remaining bits is the way how files are reopened with
> > dentry_open() with the f_flags passed to fanotify_init(). The open can
> > fail, in which case the user is left with an error condition but with no
> > indication as to which object the error happened for. What the heck?
>
> What else can be done? When notification is based on an open fd and you
> can't give them an open fd, there's nothing left....

The main point would be to allow the listener to object the event is about.
This could be done by returning st_dev and st_ino in the event. (i_generation
might be useful too but we don't even return that in struct stat today.)

Another way would be to return a file pointer to a bad inode that can be
stat() normally, and to return the error code separately.

Al might have an opinion on that.

Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/