On Tuesday 24 April 2001 15:24, Dirk Mueller wrote:
> (I posted this already but got no response. Am I really posting to the
> wrong list ??)
>
> Hi,
>
> I have a small problem when using the directory notifications. when the
> directory itself that I watch in my program is deleted, I don't receive an
> event, although I'd expect a delete event for the "." entry (IMHO). This
> makes it much easier to detect this relatively rare case, otherwise one
> would need to add twice as many watchpoints (for every directory its parent
> directory as well), which is no good solution in my opinion.
>
> I append a patch. Note I have almost no idea about kernel internals and
> implicit rules about the dentry/inodes so I don't know if the thing I do is
> actually safe or if the inode can't be passed around at that point any
> more.
>
> Is this going to work ? my personal testings have not shown any
> problem, but that doesn't mean anything of course. it would be great if you
> could give me just a short note as a reply, thanks in advance.

With your patch you are sending the delete event twice, once to the directory 
being deleted and again to the containing directory (if you have registered 
for events on it).  That doesn't sound right to me.  What's really needed 
here is an "end-of-events" event.

You are also sending the event with the i_zombie semaphore held, which is 
probably not a good idea.

Keep swinging :-)

--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to