lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHO5Pa1hfp+uLiQ78-pn2RJ6SytSYqXTniyx3UvaTwU_=ECWjA@mail.gmail.com>
Date:	Mon, 21 Apr 2014 09:24:47 +0200
From:	Michael Kerrisk <mtk.manpages@...il.com>
To:	Richard Weinberger <richard.weinberger@...il.com>
Cc:	Lennart Sorensen <lsorense@...lub.uwaterloo.ca>,
	Jos Huisken <jos.huisken@...il.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Michael Kerrisk-manpages <mtk.manpages@...il.com>
Subject: Re: inotify, new idea?

On Mon, Apr 21, 2014 at 12:22 AM, Richard Weinberger
<richard.weinberger@...il.com> wrote:
> On Fri, Apr 18, 2014 at 6:15 AM, Michael Kerrisk <mtk.manpages@...il.com> wrote:
>> On Thu, Apr 17, 2014 at 11:28 PM, Lennart Sorensen
>> <lsorense@...lub.uwaterloo.ca> wrote:
>>> On Thu, Apr 17, 2014 at 11:00:37PM +0200, Jos Huisken wrote:
>>>> I was trying to maintain a local and remote directory in sync with
>>>> lsync, using inotify.
>>>> I happen to have >4M files and >400k directories... running over
>>>> /proc/sys/fs/inotify/max_user_watches
>>>
>>> Would fanotify perhaps be a better interface to use?
>>
>> (One of us is misunderstanding fanotify; it might be me.)
>>
>> Did you look at fanotify closely? I don't think it could be used for
>> this task -- does not notify linka dn unlink events, difficult to set
>> up recursive monitoring, etc.
>
> Does recursive monitoring even work with inotify?
> Last time I've tried it did failed as soon I did a mkdir -p a/b/c/d because
> mkdir() raced against the thread which installes the new watches.

As I understand it, you have to program to deal with the races (rescan
directories after adding watches). I recently did a lot of work
updating the inotify(7) man page to discuss all the issues that I know
of, and their remedies. If I missed anything, I'd appreciate a note on
it, so that it can be added. See
http://man7.org/linux/man-pages/man7/inotify.7.html#NOTES

Cheers,

Michael


-- 
Michael Kerrisk Linux man-pages maintainer;
http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface", http://blog.man7.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ