From e0d071dce25e646c9889e0512e60018ea161191f Mon Sep 17 00:00:00 2001 From: root Date: Tue, 22 Jan 2013 05:18:27 +0000 Subject: *** empty log message *** --- Changes | 4 ++++ ev.c | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 31fd9ea..a589e34 100644 --- a/Changes +++ b/Changes @@ -35,6 +35,8 @@ TODO: document portbaility requirements for atomic pointer access - (ecb) add memory fence support for gcc-alpha (Christian Weisgerber). - work around some kernels losing file descriptors by leaking the kqueue descriptor in the child. + - work around linux inotify not reporting IN_ATTRIB changes for directories + in many cases. - include sys/syscall.h instead of plain syscall.h. - check for io watcher loops in ev_verify, check for the most common reported usage bug in ev_io_start. @@ -49,6 +51,8 @@ TODO: document portbaility requirements for atomic pointer access - rewrite the async/signal pipe logic to always keep a valid fd, which simplifies (and hopefuly correctifies :) the race checking on fork, at the cost of one extra fd. + - add fat, msdos, jffs2, ramfs, ntfs and btrfs to the list of + inotify-supporting filesystems. 4.11 Sat Feb 4 19:52:39 CET 2012 - INCOMPATIBLE CHANGE: ev_timer_again now clears the pending status, as diff --git a/ev.c b/ev.c index ff8f090..8908b5e 100644 --- a/ev.c +++ b/ev.c @@ -3895,7 +3895,10 @@ static void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents); static void noinline infy_add (EV_P_ ev_stat *w) { - w->wd = inotify_add_watch (fs_fd, w->path, IN_ATTRIB | IN_DELETE_SELF | IN_MOVE_SELF | IN_MODIFY | IN_DONT_FOLLOW | IN_MASK_ADD); + w->wd = inotify_add_watch (fs_fd, w->path, + IN_ATTRIB | IN_DELETE_SELF | IN_MOVE_SELF | IN_MODIFY + | IN_CREATE | IN_DELETE | IN_MOVED_FROM | IN_MOVED_TO + | IN_DONT_FOLLOW | IN_MASK_ADD); if (w->wd >= 0) { @@ -3909,10 +3912,16 @@ infy_add (EV_P_ ev_stat *w) w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL; else if (!statfs (w->path, &sfs) && (sfs.f_type == 0x1373 /* devfs */ + || sfs.f_type == 0x4006 /* fat */ + || sfs.f_type == 0x4d44 /* msdos */ || sfs.f_type == 0xEF53 /* ext2/3 */ + || sfs.f_type == 0x72b6 /* jffs2 */ + || sfs.f_type == 0x858458f6 /* ramfs */ + || sfs.f_type == 0x5346544e /* ntfs */ || sfs.f_type == 0x3153464a /* jfs */ + || sfs.f_type == 0x9123683e /* btrfs */ || sfs.f_type == 0x52654973 /* reiser3 */ - || sfs.f_type == 0x01021994 /* tempfs */ + || sfs.f_type == 0x01021994 /* tmpfs */ || sfs.f_type == 0x58465342 /* xfs */)) w->timer.repeat = 0.; /* filesystem is local, kernel new enough */ else -- cgit v1.2.3