Hi,
> Maybe I am missing something but what if the watch on dir was
> added by qemu _after_ the file (say file1) was copied to it.
> Then, the kernel would generate events for file2, file3 and so on but
> never a CREATE event for file1. Isn't that a possibility ?
Yes.
> So, what I mean
> by th
Gerd Hoffmann writes:
> On Mo, 2015-11-09 at 18:12 -0500, Bandan Das wrote:
>> Gerd Hoffmann writes:
>>
>> > On Di, 2015-11-03 at 19:00 -0500, Bandan Das wrote:
>> >> +/* Add a new watch asap so as to not lose events
>> >> */
>> >
>> > This comment sounds like there is a rac
On Mo, 2015-11-09 at 18:12 -0500, Bandan Das wrote:
> Gerd Hoffmann writes:
>
> > On Di, 2015-11-03 at 19:00 -0500, Bandan Das wrote:
> >> +/* Add a new watch asap so as to not lose events
> >> */
> >
> > This comment sounds like there is a race ("asap"). There isn't one,
> >
Bandan Das writes:
> Gerd Hoffmann writes:
>
>> On Di, 2015-11-03 at 19:00 -0500, Bandan Das wrote:
>>> +/* Add a new watch asap so as to not lose events
>>> */
>>
>> This comment sounds like there is a race ("asap"). There isn't one,
>> correct ordering (adding the watch be
Gerd Hoffmann writes:
> On Di, 2015-11-03 at 19:00 -0500, Bandan Das wrote:
>> +case IN_DELETE:
>> +/*
>> + * The kernel issues a IN_IGNORED event
>> + * when a dir containing a watchpoint is
>> + * deleted
>> +
Gerd Hoffmann writes:
> On Di, 2015-11-03 at 19:00 -0500, Bandan Das wrote:
>> +/* Add a new watch asap so as to not lose events
>> */
>
> This comment sounds like there is a race ("asap"). There isn't one,
> correct ordering (adding the watch before reading the directory) is
Gerd Hoffmann writes:
>> +#include
>
> What happens on non-linux systems?
>
> I guess we need some #ifdefs to not break the build there, or enable mtp
> only for CONFIG_LINUX=y instead of CONFIG_POSIX=y.
Oh, I had the ifdefs but somehow I confused myself by thinking CONFIG_POSIX
is enough not t
On Di, 2015-11-03 at 19:00 -0500, Bandan Das wrote:
> +case IN_DELETE:
> +/*
> + * The kernel issues a IN_IGNORED event
> + * when a dir containing a watchpoint is
> + * deleted
> + */
Wrong place for the c
On Di, 2015-11-03 at 19:00 -0500, Bandan Das wrote:
> +/* Add a new watch asap so as to not lose events
> */
This comment sounds like there is a race ("asap"). There isn't one,
correct ordering (adding the watch before reading the directory) is
enough to make sure you don't mi
> +#include
What happens on non-linux systems?
I guess we need some #ifdefs to not break the build there, or enable mtp
only for CONFIG_LINUX=y instead of CONFIG_POSIX=y.
> +enum inotify_event_type {
> +CREATE = 1,
> +DELETE = 2,
> +MODIFY = 3,
> +};
Patch #3 removes this, I'd sugg
For now, we use inotify watches to track only a small number of
events, namely, add, delete and modify. Note that for delete, the kernel
already deactivates the watch for us and we just need to
take care of modifying our internal state.
Suggested-by: Gerd Hoffman
Signed-off-by: Bandan Das
---
h
11 matches
Mail list logo