emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Added inotify support.


From: Jim Meyering
Subject: Re: [PATCH] Added inotify support.
Date: Sun, 14 Oct 2012 17:52:05 +0200

Nix wrote:
...
> Oh yes, indeed. I'm just arguing against ripping out polling and
> replacing it with inotify, really: we need at least a customization knob
> for people who know their filesystems are NFS-exported or otherwise
> network-affected to tweak to say 'poll, please'.

GNU tail's -f support has addressed precisely this problem
by distinguishing between file system types for which inotify
is known to work and those for which it does not work reliably.
It uses inotify only for a file system on which it is known to work,
polls for others, and warns about if the file system type is not known.

To see the list, look at coreutils/src/stat.c's S_MAGIC_* case
statements.  The ones with "local" in the comment work with inotify,
the ones with admittedly poorly named "remote" in the comment
require that tail -f support use polling.

The only problem is that the list is a moving target.
New file system types arise regularly.
To give you an idea of the pace, there have been two additions
since the latest release, which was less than two months ago.
Here's the NEWS entry for those:

  stat and tail know about ZFS, VZFS and VMHGFS.  stat -f --format=%T now
  reports the file system type, and tail -f now uses inotify for files on
  ZFS and VZFS file systems, rather than the default (for unknown file
  system types) of issuing a warning and reverting to polling.  tail -f
  still uses polling for files on VMHGFS file systems.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]