|
From: Radu V. <rad...@gm...> - 2012-12-17 07:41:40
|
Hi Andreas, Thanks a lot for your patch - would you be so kind to open a pull request on github at https://github.com/rvoicilas/inotify-tools ? It will be a lot easier for me to manage it and give you feedback. (though I am not very responsive nowadays) Thanks, Radu. On Thu, Dec 6, 2012 at 6:32 PM, <and...@or...> wrote: > hi, > > I have created a patched version of inotifywait which fixes our problems with the current version 3.14. We have been using it in production since two years without problems. So I think it might be useful for others. > > I did not know how to implement my changes not breaking the current usage and I am only using inotifywait. So see it as intermediate step to get feedback if these changes make sense. > > the patch fixes the problem that if a directory tree is watched and directories are created, there was no guarantee that all of the subdirectories will be watched and that events are created, because of the timelag between creating the directory tree and setting the watches. > > my patch guarantees that all watches are set (I hope so). > > it also adds the option "-a" (add) to inotifywait to generate CREATE,ISDIR events for every subdirectory of a newly created directory. so at minimum one CREATE,ISDIR event is printed (there could be more than one because I don't know when the kernel will watch a subdirectory and send also events). > At the momentan with the "-a" option the CREATE,ISDIR events are printed independently of the listen event list. it may be used as an indicator that in this directory fileevents could have been missed. > To be able to print these events I had to move the csv printing functions to the library (inotifytools.c) > > an other problem have been in inotifytools_replace_filename(), it did not change all watches of directories correctly. this should also be fixed now. > > and the patch also fixes a problem in inotifywait.c when directorie trees are moved into an watched directory or moved outside an watched directory watches have not been removed correctly. > > the wrong setting of the watches could be seen with monitoring "cat /proc/slabinfo |grep inotify_inode_mark") after copy a directory tree or moving a directory tree from outside to an watched directory or reverse. > > greetings > andreas > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Inotify-tools-general mailing list > Ino...@li... > https://lists.sourceforge.net/lists/listinfo/inotify-tools-general |