From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jim Meyering Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Added inotify support. Date: Sun, 14 Oct 2012 17:52:05 +0200 Message-ID: <87lif98316.fsf@rho.meyering.net> References: <2181827.T3JxG88qQt@descartes> <83lifoa7hr.fsf@gnu.org> <87obkkcu92.fsf@wanadoo.es> <87lifkvoxl.fsf@spindle.srvr.nix> <87ehlbtv0r.fsf@spindle.srvr.nix> <87626ntowb.fsf@spindle.srvr.nix> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1350229934 10388 80.91.229.3 (14 Oct 2012 15:52:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2012 15:52:14 +0000 (UTC) Cc: =?iso-8859-1?Q?=D3scar?= Fuentes , Stefan Monnier , emacs-devel@gnu.org To: Nix Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 14 17:52:20 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TNQUF-0002o6-88 for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2012 17:52:19 +0200 Original-Received: from localhost ([::1]:55696 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNQU8-0004ok-LB for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2012 11:52:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNQU5-0004oQ-KW for emacs-devel@gnu.org; Sun, 14 Oct 2012 11:52:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNQU4-0003rD-57 for emacs-devel@gnu.org; Sun, 14 Oct 2012 11:52:09 -0400 Original-Received: from mx.meyering.net ([88.168.87.75]:48502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNQU3-0003r2-U8 for emacs-devel@gnu.org; Sun, 14 Oct 2012 11:52:08 -0400 Original-Received: from rho.meyering.net (rho.meyering.net [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 13CB3601D2; Sun, 14 Oct 2012 17:52:05 +0200 (CEST) In-Reply-To: <87626ntowb.fsf@spindle.srvr.nix> (nix@esperi.org.uk's message of "Sat, 06 Oct 2012 19:51:32 +0100") Original-Lines: 29 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 88.168.87.75 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154329 Archived-At: 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.