Messages in this thread | | | From | Andreas Gruenbacher <> | Subject | Re: [GIT PULL] notification tree - try 37! | Date | Tue, 17 Aug 2010 17:48:56 +0200 |
| |
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
| |