Re: [patch] stop inotify from sending random DELETE_SELF event under load

John McCutchan
2005-09-20T18:26:59Z

On 20-Sep-05, at 12:38 PM, Al Viro wrote:
>
> I don't get it. Could you please describe what your code is
> _supposed_
> to do? I'm not even talking about implementation - it's on the level
> of "what do we want the watchers to see after the following
> operations".
> Especially since you have fixed ABI - if you have userland clients
> relying on the representation of individual events, surely they also
> have to assume something about the sequence of events generated when
> we do this and that to files and directories?
>

Okay here are some cases to help you get a better idea,

p1: watch /tmp/foo
p2: rm /tmp/foo

p1 gets IN_DELETE_SELF

p1: watch /tmp/foo
p2: echo > /tmp/foo

p1 gets IN_OPEN
p1 gets IN_MODIFY
p1 gets IN_CLOSE_WRITE

p1: watch /tmp
p2: rm /tmp/foo

p1 gets IN_DELETE + "foo"

p1: watch /tmp/foo
p2: unmount /tmp/

p1 gets IN_UNMOUNT
p1 gets IN_IGNORE

p1: watch /tmp/foo
p2 cat /tmp/foo

p1 gets IN_OPEN
p1 gets IN_ACCESS
p1 gets IN_CLOSE_NOWRITE

p1: watch /tmp/foo
p2: mv /tmp/foo /tmp/bar

p1 gets IN_MOVED_FROM + "foo" & IN_MOVED_TO + "bar"

p1: watch /tmp/
p2: echo > /tmp/bar

p1 gets IN_CREATE + "bar"
p1 gets IN_OPEN + "bar"
p1 gets IN_MODIFY + "bar"
p1 gets IN_CLOSE_WRITE + "bar"

John McCutchan
ttb@tentacle.dhs.org