From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: Sven Breuner Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 22 Dec 2011 01:40:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 10349@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132451795530625 (code B ref -1); Thu, 22 Dec 2011 01:40:09 +0000 Received: (at submit) by debbugs.gnu.org; 22 Dec 2011 01:39:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdXcn-0007xN-8t for submit@debbugs.gnu.org; Wed, 21 Dec 2011 20:39:14 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdX1C-00074E-4T for submit@debbugs.gnu.org; Wed, 21 Dec 2011 20:00:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdWz8-0003vW-1q for submit@debbugs.gnu.org; Wed, 21 Dec 2011 19:58:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:55327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdWz7-0003vS-U2 for submit@debbugs.gnu.org; Wed, 21 Dec 2011 19:58:14 -0500 Received: from eggs.gnu.org ([140.186.70.92]:42689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdWz6-0002y6-Ge for bug-coreutils@gnu.org; Wed, 21 Dec 2011 19:58:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdWz5-0003v9-6c for bug-coreutils@gnu.org; Wed, 21 Dec 2011 19:58:12 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:52653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdWz4-0003un-VM for bug-coreutils@gnu.org; Wed, 21 Dec 2011 19:58:11 -0500 Received: from itwm2.itwm.fhg.de (itwm2.itwm.fhg.de [131.246.191.3]) by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pBM0w600018711 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Thu, 22 Dec 2011 01:58:06 +0100 Received: from mail2.itwm.fhg.de ([131.246.191.79]:52305) by itwm2.itwm.fhg.de with esmtps (TLSv1:DES-CBC3-SHA:168) (/C=DE/ST=Rheinland-Pfalz/L=Kaiserslautern/O=Fraunhofer ITWM/OU=SLG/CN=mail2.itwm.fhg.de)(verified=1) (Exim 4.74 #1) id 1RdWz0-0007Eo-GN for bug-coreutils@gnu.org; Thu, 22 Dec 2011 01:58:06 +0100 Message-ID: <4EF2809E.7040104@itwm.fraunhofer.de> Date: Thu, 22 Dec 2011 01:58:06 +0100 From: Sven Breuner User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ITWM-CharSet: ISO-8859-1 X-ITWM-Scanned-By: mail2.itwm.fhg.de X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Wed, 21 Dec 2011 20:39:05 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Hi, can you please add the FhGFS remote file system magic "0x19830326" to the inotify blacklist of the src/tail.c:fremote function. We currently receive lots of problem reports regarding this issue. In general, I would also like to suggest changing from the current inotify blacklist to using an inotify whitelist (containing file systems that are known to support inotify, such as xfs, ext2/3/4, ...). This would allow setting the default for unknown file system to disabled inotify. Currently, the inotify mechanism is assumed to be working for all unknown file systems, which probably causes trouble for a lot of the different network file systems out there. Thanks and best regards, Sven --- Sven Breuner Fraunhofer HPC FhGFS Team http://www.fhgfs.com From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 22 Dec 2011 10:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Sven Breuner Cc: 10349@debbugs.gnu.org Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.13245482359693 (code B ref 10349); Thu, 22 Dec 2011 10:04:02 +0000 Received: (at 10349) by debbugs.gnu.org; 22 Dec 2011 10:03:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdfV9-0002WE-7X for submit@debbugs.gnu.org; Thu, 22 Dec 2011 05:03:55 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdfV2-0002W0-J5 for 10349@debbugs.gnu.org; Thu, 22 Dec 2011 05:03:49 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id C55A16033B; Thu, 22 Dec 2011 11:01:34 +0100 (CET) From: Jim Meyering In-Reply-To: <4EF2809E.7040104@itwm.fraunhofer.de> (Sven Breuner's message of "Thu, 22 Dec 2011 01:58:06 +0100") References: <4EF2809E.7040104@itwm.fraunhofer.de> Date: Thu, 22 Dec 2011 11:01:34 +0100 Message-ID: <874nwt6i2p.fsf@rho.meyering.net> Lines: 117 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Sven Breuner wrote: > can you please add the FhGFS remote file system magic "0x19830326" to > the inotify blacklist of the src/tail.c:fremote function. Thanks for the report. I've attached the expected patch below. > We currently receive lots of problem reports regarding this issue. > > In general, I would also like to suggest changing from the current > inotify blacklist to using an inotify whitelist (containing file > systems that are known to support inotify, such as xfs, ext2/3/4, > ...). This would allow setting the default for unknown file system to > disabled inotify. > Currently, the inotify mechanism is assumed to be working for all > unknown file systems, which probably causes trouble for a lot of the > different network file systems out there. We have a mechanism in place already to ensure that all file system types listed in /usr/include/linux/magic.h are known to stat -f. I see that FhGFS is not listed there. If it had been listed a few months ago, coreutils-8.14 would now support it. In your situation (a new remote FS for which GNU tail does not yet know its status as a remote FS), there are two ways to work around the problem (that inotify failing makes tail -f fail): - use the deliberately undocumented tail option, ---disable-inotify - add an argument of "-", telling tail -f to read stdin, which never works with inotify, so tail reverts to polling here, too. E.g., if you run this, tail -f your-usual-files - < /dev/null that "-" makes tail do what you want: skip the attempt to use inotify and revert to the tried-and-true (but more CPU-intensive, less-responsive) polling method. Are there so many new remote file systems coming into use now? That are not listed in /usr/include/linux/magic.h? If anyone knows of a better definitive list of file system magic numbers than that, please let us know. >From 896529709230021ba3d2b0000b28a6c4af13970a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 22 Dec 2011 09:26:31 +0100 Subject: [PATCH] tail,stat: add support for FhGFS * src/stat.c (human_fstype): Add a case: fhgfs, 0x19830326. * src/tail.c (fremote): Add S_MAGIC_FHGFS. * NEWS (Bug fixes): Update the entry for GPFS to mention FhGFS, too. Reported by Sven Breuner. --- NEWS | 4 ++-- THANKS.in | 1 + src/stat.c | 2 ++ src/tail.c | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 51c44c7..80b6c9a 100644 --- a/NEWS +++ b/NEWS @@ -28,9 +28,9 @@ GNU coreutils NEWS -*- outline -*- tac no longer fails to handle two or more non-seekable inputs [bug introduced in coreutils-5.3.0] - tail -f no longer tries to use inotify on GPFS file systems + tail -f no longer tries to use inotify on GPFS or FhGFS file systems [you might say this was introduced in coreutils-7.5, along with inotify - support, but the GPFS magic number wasn't in the usual places then.] + support, but the new magic numbers weren't in the usual places then.] * Noteworthy changes in release 8.14 (2011-10-12) [stable] diff --git a/THANKS.in b/THANKS.in index 3541c6f..44a617f 100644 --- a/THANKS.in +++ b/THANKS.in @@ -553,6 +553,7 @@ Steven P Watson steven@magelico.net Stuart Citrin ctrn3e8@gmail.com Stuart Kemp skemp@peter.bmc.com Stuart Shelton stuart@shelton.me +Sven Breuner sven.breuner@itwm.fraunhofer.de Szakacsits Szabolcs szaka@sienet.hu Tadayoshi Funaba tadf@kt.rim.or.jp TAKAI Kousuke takai@vlsi.kuee.kyoto-u.ac.jp diff --git a/src/stat.c b/src/stat.c index 0f87dfd..801073b 100644 --- a/src/stat.c +++ b/src/stat.c @@ -285,6 +285,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf) return "ext2"; case S_MAGIC_FAT: /* 0x4006 */ return "fat"; + case S_MAGIC_FHGFS: /* 0x19830326 */ + return "fhgfs"; case S_MAGIC_FUSEBLK: /* 0x65735546 */ return "fuseblk"; case S_MAGIC_FUSECTL: /* 0x65735543 */ diff --git a/src/tail.c b/src/tail.c index 1641a12..1f619f3 100644 --- a/src/tail.c +++ b/src/tail.c @@ -905,6 +905,7 @@ fremote (int fd, const char *name) case S_MAGIC_FUSECTL: case S_MAGIC_GFS: case S_MAGIC_GPFS: + case S_MAGIC_FHGFS: case S_MAGIC_KAFS: case S_MAGIC_LUSTRE: case S_MAGIC_NCP: -- 1.7.8.385.g1d1cb From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: Sven Breuner Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 22 Dec 2011 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 10349@debbugs.gnu.org Cc: Jim Meyering Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.13245644549628 (code B ref 10349); Thu, 22 Dec 2011 14:35:02 +0000 Received: (at 10349) by debbugs.gnu.org; 22 Dec 2011 14:34:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdjio-0002VF-C1 for submit@debbugs.gnu.org; Thu, 22 Dec 2011 09:34:14 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdjik-0002V6-Lw for 10349@debbugs.gnu.org; Thu, 22 Dec 2011 09:34:11 -0500 Received: from itwm2.itwm.fhg.de (itwm2.itwm.fhg.de [131.246.191.3]) by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pBMEVwBi020611 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for <10349@debbugs.gnu.org>; Thu, 22 Dec 2011 15:31:58 +0100 Received: from mail2.itwm.fhg.de ([131.246.191.79]:57350) by itwm2.itwm.fhg.de with esmtps (TLSv1:DES-CBC3-SHA:168) (/C=DE/ST=Rheinland-Pfalz/L=Kaiserslautern/O=Fraunhofer ITWM/OU=SLG/CN=mail2.itwm.fhg.de)(verified=1) (Exim 4.74 #1) id 1Rdjgc-0001yR-Cm; Thu, 22 Dec 2011 15:31:58 +0100 Message-ID: <4EF33F5E.7020707@itwm.fraunhofer.de> Date: Thu, 22 Dec 2011 15:31:58 +0100 From: Sven Breuner User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 References: <4EF2809E.7040104@itwm.fraunhofer.de> <874nwt6i2p.fsf@rho.meyering.net> In-Reply-To: <874nwt6i2p.fsf@rho.meyering.net> Content-Type: multipart/mixed; boundary="------------090801090605060906010905" X-ITWM-CharSet: X-ITWM-CharSet: ISO-8859-1 X-ITWM-CharSet: utf-8 X-ITWM-Scanned-By: mail2.itwm.fhg.de X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) This is a multi-part message in MIME format. --------------090801090605060906010905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Jim, Jim Meyering wrote on 12/22/2011 11:01 AM: > Sven Breuner wrote: >> can you please add the FhGFS remote file system magic "0x19830326" to >> the inotify blacklist of the src/tail.c:fremote function. > > I've attached the expected patch below. thanks for the patch! (I had problems finding out how the mechanism works, because I was searching for something like a "#define ...MAGIC ", which is why I didn't submit a patch in the first place. Now I see how it works.) >> Currently, the inotify mechanism is assumed to be working for all >> unknown file systems, which probably causes trouble for a lot of the >> different network file systems out there. > > We have a mechanism in place already to ensure that all file system > types listed in /usr/include/linux/magic.h are known to stat -f. > I see that FhGFS is not listed there. If it had been listed a few > months ago, coreutils-8.14 would now support it. > > In your situation (a new remote FS for which GNU tail does not > yet know its status as a remote FS), there are two ways to work > around the problem (that inotify failing makes tail -f fail): > > - use the deliberately undocumented tail option, ---disable-inotify > - add an argument of "-", telling tail -f to read stdin, which > never works with inotify, so tail reverts to polling here, too. Indeed, we are recommending an alias tail='tail ---disable-inotify' as a temporary solution to our users. > From 896529709230021ba3d2b0000b28a6c4af13970a Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Thu, 22 Dec 2011 09:26:31 +0100 > Subject: [PATCH] tail,stat: add support for FhGFS > [...] Thanks and best regards, Sven --------------090801090605060906010905 Content-Type: text/x-vcard; charset=utf-8; name="sven_breuner.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sven_breuner.vcf" begin:vcard fn:Sven Breuner n:Breuner;Sven org:Fraunhofer ITWM;Competence Center for High Performance Computing adr:;;Fraunhoferplatz 1;Kaiserslautern;;67663;Germany email;internet:sven.breuner@itwm.fraunhofer.de tel;work:+49 631 / 31600-4603 tel;fax:+49 631 / 31600-5603 url:http://www.itwm.fraunhofer.de version:2.1 end:vcard --------------090801090605060906010905-- From unknown Sat Sep 20 07:52:25 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Sven Breuner Subject: bug#10349: closed (Re: bug#10349: tail: fix --follow on FhGFS remote file systems) Message-ID: References: <87r4zw4lvx.fsf@rho.meyering.net> <4EF2809E.7040104@itwm.fraunhofer.de> X-Gnu-PR-Message: they-closed 10349 X-Gnu-PR-Package: coreutils Reply-To: 10349@debbugs.gnu.org Date: Thu, 22 Dec 2011 16:25:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1324571102-19621-1" This is a multi-part message in MIME format... ------------=_1324571102-19621-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #10349: tail: fix --follow on FhGFS remote file systems which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 10349@debbugs.gnu.org. --=20 10349: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D10349 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1324571102-19621-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 10349-done) by debbugs.gnu.org; 22 Dec 2011 16:24:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdlRQ-00055k-Vi for submit@debbugs.gnu.org; Thu, 22 Dec 2011 11:24:25 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdlRO-00055b-B6 for 10349-done@debbugs.gnu.org; Thu, 22 Dec 2011 11:24:23 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id E1ABC600A3; Thu, 22 Dec 2011 17:22:10 +0100 (CET) From: Jim Meyering To: Sven Breuner Subject: Re: bug#10349: tail: fix --follow on FhGFS remote file systems In-Reply-To: <4EF33F5E.7020707@itwm.fraunhofer.de> (Sven Breuner's message of "Thu, 22 Dec 2011 15:31:58 +0100") References: <4EF2809E.7040104@itwm.fraunhofer.de> <874nwt6i2p.fsf@rho.meyering.net> <4EF33F5E.7020707@itwm.fraunhofer.de> Date: Thu, 22 Dec 2011 17:22:10 +0100 Message-ID: <87r4zw4lvx.fsf@rho.meyering.net> Lines: 15 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 10349-done Cc: 10349-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Sven Breuner wrote: > Hi Jim, > > Jim Meyering wrote on 12/22/2011 11:01 AM: >> Sven Breuner wrote: >>> can you please add the FhGFS remote file system magic "0x19830326" to >>> the inotify blacklist of the src/tail.c:fremote function. >> >> I've attached the expected patch below. > > thanks for the patch! ... I've pushed that fix and (by the -done@ address, above) am marking this bug as "done". ------------=_1324571102-19621-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Dec 2011 01:39:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdXcn-0007xN-8t for submit@debbugs.gnu.org; Wed, 21 Dec 2011 20:39:14 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdX1C-00074E-4T for submit@debbugs.gnu.org; Wed, 21 Dec 2011 20:00:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdWz8-0003vW-1q for submit@debbugs.gnu.org; Wed, 21 Dec 2011 19:58:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:55327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdWz7-0003vS-U2 for submit@debbugs.gnu.org; Wed, 21 Dec 2011 19:58:14 -0500 Received: from eggs.gnu.org ([140.186.70.92]:42689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdWz6-0002y6-Ge for bug-coreutils@gnu.org; Wed, 21 Dec 2011 19:58:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdWz5-0003v9-6c for bug-coreutils@gnu.org; Wed, 21 Dec 2011 19:58:12 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:52653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdWz4-0003un-VM for bug-coreutils@gnu.org; Wed, 21 Dec 2011 19:58:11 -0500 Received: from itwm2.itwm.fhg.de (itwm2.itwm.fhg.de [131.246.191.3]) by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pBM0w600018711 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Thu, 22 Dec 2011 01:58:06 +0100 Received: from mail2.itwm.fhg.de ([131.246.191.79]:52305) by itwm2.itwm.fhg.de with esmtps (TLSv1:DES-CBC3-SHA:168) (/C=DE/ST=Rheinland-Pfalz/L=Kaiserslautern/O=Fraunhofer ITWM/OU=SLG/CN=mail2.itwm.fhg.de)(verified=1) (Exim 4.74 #1) id 1RdWz0-0007Eo-GN for bug-coreutils@gnu.org; Thu, 22 Dec 2011 01:58:06 +0100 Message-ID: <4EF2809E.7040104@itwm.fraunhofer.de> Date: Thu, 22 Dec 2011 01:58:06 +0100 From: Sven Breuner User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: tail: fix --follow on FhGFS remote file systems Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ITWM-CharSet: ISO-8859-1 X-ITWM-Scanned-By: mail2.itwm.fhg.de X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 21 Dec 2011 20:39:05 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Hi, can you please add the FhGFS remote file system magic "0x19830326" to the inotify blacklist of the src/tail.c:fremote function. We currently receive lots of problem reports regarding this issue. In general, I would also like to suggest changing from the current inotify blacklist to using an inotify whitelist (containing file systems that are known to support inotify, such as xfs, ext2/3/4, ...). This would allow setting the default for unknown file system to disabled inotify. Currently, the inotify mechanism is assumed to be working for all unknown file systems, which probably causes trouble for a lot of the different network file systems out there. Thanks and best regards, Sven --- Sven Breuner Fraunhofer HPC FhGFS Team http://www.fhgfs.com ------------=_1324571102-19621-1-- From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: Bob Proulx Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 22 Dec 2011 18:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 10349@debbugs.gnu.org Cc: Sven Breuner , Jim Meyering Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.132457753829442 (code B ref 10349); Thu, 22 Dec 2011 18:13:01 +0000 Received: (at 10349) by debbugs.gnu.org; 22 Dec 2011 18:12:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdn7q-0007ep-5M for submit@debbugs.gnu.org; Thu, 22 Dec 2011 13:12:18 -0500 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdn7n-0007ee-Hj for 10349@debbugs.gnu.org; Thu, 22 Dec 2011 13:12:16 -0500 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 6ED30211D1; Thu, 22 Dec 2011 11:10:03 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 3641E2DCDA; Thu, 22 Dec 2011 11:10:03 -0700 (MST) Date: Thu, 22 Dec 2011 11:10:03 -0700 From: Bob Proulx Message-ID: <20111222181003.GA7841@hysteria.proulx.com> References: <4EF2809E.7040104@itwm.fraunhofer.de> <874nwt6i2p.fsf@rho.meyering.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874nwt6i2p.fsf@rho.meyering.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.5 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Jim Meyering wrote: > Are there so many new remote file systems coming into use now? > That are not listed in /usr/include/linux/magic.h? The past can always be enumerated. The future is always changing. It isn't possible to have a complete list of future items. It is only possible to have a complete list of past items. The future is not yet written. I think it is best to have the unknown fallback be to the known reliable working code path. Does it matter how many or at what rate new filesystems are being created? Also I think people actually are creating new filesystems at a faster rate these days than before. Bob From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems References: <4EF2809E.7040104@itwm.fraunhofer.de> Resent-From: "Alan Curry" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 22 Dec 2011 21:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: bob@proulx.com (Bob Proulx) Cc: 10349@debbugs.gnu.org, Sven Breuner , Jim Meyering Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.132459077916427 (code B ref 10349); Thu, 22 Dec 2011 21:53:02 +0000 Received: (at 10349) by debbugs.gnu.org; 22 Dec 2011 21:52:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdqZP-0004Gt-2G for submit@debbugs.gnu.org; Thu, 22 Dec 2011 16:52:59 -0500 Received: from c-68-60-252-82.hsd1.in.comcast.net ([68.60.252.82] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1RdqZN-0004Gn-Jd for 10349@debbugs.gnu.org; Thu, 22 Dec 2011 16:52:58 -0500 Received: (qmail 28612 invoked by uid 1000); 22 Dec 2011 21:50:44 -0000 Message-ID: <20111222215044.28611.qmail@kosh.dhis.org> From: "Alan Curry" Date: Thu, 22 Dec 2011 16:50:44 -0500 (GMT+5) In-Reply-To: <20111222181003.GA7841@hysteria.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) Bob Proulx writes: > > Jim Meyering wrote: > > Are there so many new remote file systems coming into use now? > > That are not listed in /usr/include/linux/magic.h? > > The past can always be enumerated. The future is always changing. It > isn't possible to have a complete list of future items. It is only > possible to have a complete list of past items. The future is not yet > written. Between past and future is the present, i.e. the currently running kernel. Shouldn't it return an error when you use an interface that isn't implemented by the underlying filesystem? Why doesn't this happen? -- Alan Curry From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 22 Dec 2011 23:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Alan Curry Cc: 10349@debbugs.gnu.org, Sven Breuner , Eric Paris , Jim Meyering , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.132459783626715 (code B ref 10349); Thu, 22 Dec 2011 23:51:01 +0000 Received: (at 10349) by debbugs.gnu.org; 22 Dec 2011 23:50:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdsPE-0006wp-0Q for submit@debbugs.gnu.org; Thu, 22 Dec 2011 18:50:36 -0500 Received: from mail3.vodafone.ie ([213.233.128.45]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdsPB-0006wh-8W for 10349@debbugs.gnu.org; Thu, 22 Dec 2011 18:50:34 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBACXB805tTgB+/2dsb2JhbAAMN6lbhU4BAQEEMgFGEAsNAQoJFg8JAwIBAgFFBg0BBwEBvyWDfYgSBJpwjEM Received: from unknown (HELO [192.168.1.79]) ([109.78.0.126]) by mail3.vodafone.ie with ESMTP; 22 Dec 2011 23:48:19 +0000 Message-ID: <4EF3C1C3.7080600@draigBrady.com> Date: Thu, 22 Dec 2011 23:48:19 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> In-Reply-To: <20111222215044.28611.qmail@kosh.dhis.org> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.5 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) On 12/22/2011 09:50 PM, Alan Curry wrote: > Bob Proulx writes: >> >> Jim Meyering wrote: >>> Are there so many new remote file systems coming into use now? >>> That are not listed in /usr/include/linux/magic.h? >> >> The past can always be enumerated. The future is always changing. It >> isn't possible to have a complete list of future items. It is only >> possible to have a complete list of past items. The future is not yet >> written. > > Between past and future is the present, i.e. the currently running kernel. > Shouldn't it return an error when you use an interface that isn't implemented > by the underlying filesystem? Why doesn't this happen? That's a fair point. Eric shouldn't some/all remote file systems in the kernel return ENOTSUP for inotify operations? We'd still need to handle this in `tail` for unpatched kernels, but going forward it would decrease the coreutils maintenance burden. cheers, Pádraig. From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: Sven Breuner Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 22 Dec 2011 23:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Alan Curry Cc: 10349@debbugs.gnu.org, Jim Meyering , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.132459788326800 (code B ref 10349); Thu, 22 Dec 2011 23:52:01 +0000 Received: (at 10349) by debbugs.gnu.org; 22 Dec 2011 23:51:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdsPy-0006yC-OG for submit@debbugs.gnu.org; Thu, 22 Dec 2011 18:51:23 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdsPw-0006y2-8J for 10349@debbugs.gnu.org; Thu, 22 Dec 2011 18:51:21 -0500 Received: from itwm2.itwm.fhg.de (itwm2.itwm.fhg.de [131.246.191.3]) by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pBMNn6FC002181 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for <10349@debbugs.gnu.org>; Fri, 23 Dec 2011 00:49:06 +0100 Received: from mail2.itwm.fhg.de ([131.246.191.79]:59467) by itwm2.itwm.fhg.de with esmtps (TLSv1:DES-CBC3-SHA:168) (/C=DE/ST=Rheinland-Pfalz/L=Kaiserslautern/O=Fraunhofer ITWM/OU=SLG/CN=mail2.itwm.fhg.de)(verified=1) (Exim 4.74 #1) id 1RdsNk-0004Q6-Vw; Fri, 23 Dec 2011 00:49:05 +0100 Message-ID: <4EF3C1EE.5070503@itwm.fraunhofer.de> Date: Fri, 23 Dec 2011 00:49:02 +0100 From: Sven Breuner User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> In-Reply-To: <20111222215044.28611.qmail@kosh.dhis.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ITWM-CharSet: ISO-8859-1 X-ITWM-Scanned-By: mail2.itwm.fhg.de X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Hi Alan, Alan Curry wrote on 12/22/2011 10:50 PM: > Bob Proulx writes: >> >> Jim Meyering wrote: >>> Are there so many new remote file systems coming into use now? >>> That are not listed in /usr/include/linux/magic.h? >> >> The past can always be enumerated. The future is always changing. It >> isn't possible to have a complete list of future items. It is only >> possible to have a complete list of past items. The future is not yet >> written. > > Between past and future is the present, i.e. the currently running kernel. > Shouldn't it return an error when you use an interface that isn't implemented > by the underlying filesystem? Why doesn't this happen? Actually, the kernel provides a nice generic inotify framework for file systems, so that inotify support on a single machine comes almost automatically. In the case of FhGFS (and I assume it's similar for other network file systems) inotify works perfectly if the process modifying a file and the process inotify-watching the file are running on the same machine. Since inotify is generally a good thing and nice to have, you wouldn't want to do anything to make it return an error here. However, specifically the tail utility is also often used in a cluster environment when some compute nodes are writing a job log file and you are on a different machine watching that log file with "tail -f". Supporting this distributed inotify use case would mean quite some extra work for file systems and would rarely be useful for other distributed use cases (as distributed applications can normally just communicate directly via messages if they want to notify another machine about file updates, thus they won't need anything like inotify), which is probably the reason why most network file systems don't support distributed inotify. (For FhGFS, we're actually considering to add distributed inotify support, but since it's a low priority task for the reasons mentioned above, we probably won't add it in the near future.) Best regards, Sven From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 23 Dec 2011 00:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Alan Curry Cc: 10349@debbugs.gnu.org, Sven Breuner , Eric Paris , Jim Meyering , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.132459904928479 (code B ref 10349); Fri, 23 Dec 2011 00:11:02 +0000 Received: (at 10349) by debbugs.gnu.org; 23 Dec 2011 00:10:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdsin-0007PI-Bc for submit@debbugs.gnu.org; Thu, 22 Dec 2011 19:10:49 -0500 Received: from mail3.vodafone.ie ([213.233.128.45]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rdsil-0007P9-Hp for 10349@debbugs.gnu.org; Thu, 22 Dec 2011 19:10:48 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAMXF805tTgB+/2dsb2JhbAAMN6lbhU4BAQEEMgFGEAsNAQoJFg8JAwIBAgFFBg0BBwEBvx6DfYgSBJpwjEM Received: from unknown (HELO [192.168.1.79]) ([109.78.0.126]) by mail3.vodafone.ie with ESMTP; 23 Dec 2011 00:08:34 +0000 Message-ID: <4EF3C681.3000708@draigBrady.com> Date: Fri, 23 Dec 2011 00:08:33 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> <4EF3C1C3.7080600@draigBrady.com> In-Reply-To: <4EF3C1C3.7080600@draigBrady.com> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.5 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) On 12/22/2011 11:48 PM, Pádraig Brady wrote: > On 12/22/2011 09:50 PM, Alan Curry wrote: >> Bob Proulx writes: >>> >>> Jim Meyering wrote: >>>> Are there so many new remote file systems coming into use now? >>>> That are not listed in /usr/include/linux/magic.h? >>> >>> The past can always be enumerated. The future is always changing. It >>> isn't possible to have a complete list of future items. It is only >>> possible to have a complete list of past items. The future is not yet >>> written. >> >> Between past and future is the present, i.e. the currently running kernel. >> Shouldn't it return an error when you use an interface that isn't implemented >> by the underlying filesystem? Why doesn't this happen? > > That's a fair point. > > Eric shouldn't some/all remote file systems in the kernel > return ENOTSUP for inotify operations? Oh right, as Sven points out, a notification _is_ sent for local processes modifying a remote file. I guess we'd need a IN_REMOTE flag (send remote events too), which remote file systems would return ENOTSUP if they don't support that. That's getting a bit awkward though. cheers, Pádraig. From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 23 Dec 2011 12:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 10349@debbugs.gnu.org, Sven Breuner , Eric Paris , Alan Curry , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.132464225126039 (code B ref 10349); Fri, 23 Dec 2011 12:11:01 +0000 Received: (at 10349) by debbugs.gnu.org; 23 Dec 2011 12:10:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Re3xa-0006lw-Vv for submit@debbugs.gnu.org; Fri, 23 Dec 2011 07:10:51 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Re3xW-0006ln-G2 for 10349@debbugs.gnu.org; Fri, 23 Dec 2011 07:10:48 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 2DBF56325C; Fri, 23 Dec 2011 13:08:30 +0100 (CET) From: Jim Meyering In-Reply-To: <4EF3C681.3000708@draigBrady.com> ("=?UTF-8?Q?P=C3=A1draig?= Brady"'s message of "Fri, 23 Dec 2011 00:08:33 +0000") References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> <4EF3C1C3.7080600@draigBrady.com> <4EF3C681.3000708@draigBrady.com> Date: Fri, 23 Dec 2011 13:08:30 +0100 Message-ID: <87vcp71oe9.fsf@rho.meyering.net> Lines: 38 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) P=E1draig Brady wrote: > On 12/22/2011 11:48 PM, P=E1draig Brady wrote: >> On 12/22/2011 09:50 PM, Alan Curry wrote: >>> Bob Proulx writes: >>>> >>>> Jim Meyering wrote: >>>>> Are there so many new remote file systems coming into use now? >>>>> That are not listed in /usr/include/linux/magic.h? >>>> >>>> The past can always be enumerated. The future is always changing. It >>>> isn't possible to have a complete list of future items. It is only >>>> possible to have a complete list of past items. The future is not yet >>>> written. >>> >>> Between past and future is the present, i.e. the currently running kern= el. >>> Shouldn't it return an error when you use an interface that isn't imple= mented >>> by the underlying filesystem? Why doesn't this happen? >> >> That's a fair point. >> >> Eric shouldn't some/all remote file systems in the kernel >> return ENOTSUP for inotify operations? > > Oh right, as Sven points out, > a notification _is_ sent for local processes modifying a remote file. > I guess we'd need a IN_REMOTE flag (send remote events too), which > remote file systems would return ENOTSUP if they don't support that. > That's getting a bit awkward though. I'm thinking of recording[*] which file systems are local and which are remote. Then we can make tail -f warn when one or more of its file arguments resides on a remote file system. We may finally have to add and document --disable-inotify. Jim [*] It's easy to record local/remote in a table from which a switch stmt or gperf table is derived, just as is currently done for FS magic numbers. From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 23 Dec 2011 13:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10349@debbugs.gnu.org, Sven Breuner , Eric Paris , Alan Curry , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.13246486615805 (code B ref 10349); Fri, 23 Dec 2011 13:58:01 +0000 Received: (at 10349) by debbugs.gnu.org; 23 Dec 2011 13:57:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Re5cz-0001Va-H6 for submit@debbugs.gnu.org; Fri, 23 Dec 2011 08:57:41 -0500 Received: from mail1.vodafone.ie ([213.233.128.43]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Re5cx-0001VS-5J for 10349@debbugs.gnu.org; Fri, 23 Dec 2011 08:57:40 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAOCH9E5tTiPl/2dsb2JhbAAMN6lghU8BAQEDATIBRgULCw0LCRYPCQMCAQIBRQYNAQcBAYd2tz+DfYgSBJpxjEU Received: from unknown (HELO [192.168.1.79]) ([109.78.35.229]) by mail1.vodafone.ie with ESMTP; 23 Dec 2011 13:55:21 +0000 Message-ID: <4EF48848.6080409@draigBrady.com> Date: Fri, 23 Dec 2011 13:55:20 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> <4EF3C1C3.7080600@draigBrady.com> <4EF3C681.3000708@draigBrady.com> <87vcp71oe9.fsf@rho.meyering.net> In-Reply-To: <87vcp71oe9.fsf@rho.meyering.net> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.5 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) On 12/23/2011 12:08 PM, Jim Meyering wrote: > Pádraig Brady wrote: >> On 12/22/2011 11:48 PM, Pádraig Brady wrote: >>> On 12/22/2011 09:50 PM, Alan Curry wrote: >>>> Bob Proulx writes: >>>>> >>>>> Jim Meyering wrote: >>>>>> Are there so many new remote file systems coming into use now? >>>>>> That are not listed in /usr/include/linux/magic.h? >>>>> >>>>> The past can always be enumerated. The future is always changing. It >>>>> isn't possible to have a complete list of future items. It is only >>>>> possible to have a complete list of past items. The future is not yet >>>>> written. >>>> >>>> Between past and future is the present, i.e. the currently running kernel. >>>> Shouldn't it return an error when you use an interface that isn't implemented >>>> by the underlying filesystem? Why doesn't this happen? >>> >>> That's a fair point. >>> >>> Eric shouldn't some/all remote file systems in the kernel >>> return ENOTSUP for inotify operations? >> >> Oh right, as Sven points out, >> a notification _is_ sent for local processes modifying a remote file. >> I guess we'd need a IN_REMOTE flag (send remote events too), which >> remote file systems would return ENOTSUP if they don't support that. >> That's getting a bit awkward though. > > I'm thinking of recording[*] which file systems are local and which > are remote. You mean by tagging the table in stat.c with say "(remote)" after the hex constant? Then use that to build a header for use by tail::fremote() ? > Then we can make tail -f warn when one or more of > its file arguments resides on a remote file system. We may finally > have to add and document --disable-inotify. Currently we fall back to polling for remote file systems. I'm not sure it's worth warning since it's only a latency difference. > [*] It's easy to record local/remote in a table from which a switch stmt > or gperf table is derived, just as is currently done for FS magic numbers. cheers, Pádraig. From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 23 Dec 2011 14:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 10349@debbugs.gnu.org, Sven Breuner , Eric Paris , Alan Curry , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.13246491416531 (code B ref 10349); Fri, 23 Dec 2011 14:06:01 +0000 Received: (at 10349) by debbugs.gnu.org; 23 Dec 2011 14:05:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Re5kj-0001hI-Ah for submit@debbugs.gnu.org; Fri, 23 Dec 2011 09:05:41 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Re5kh-0001hB-8e for 10349@debbugs.gnu.org; Fri, 23 Dec 2011 09:05:40 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id C941360050; Fri, 23 Dec 2011 15:03:22 +0100 (CET) From: Jim Meyering In-Reply-To: <4EF48848.6080409@draigBrady.com> ("=?UTF-8?Q?P=C3=A1draig?= Brady"'s message of "Fri, 23 Dec 2011 13:55:20 +0000") References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> <4EF3C1C3.7080600@draigBrady.com> <4EF3C681.3000708@draigBrady.com> <87vcp71oe9.fsf@rho.meyering.net> <4EF48848.6080409@draigBrady.com> Date: Fri, 23 Dec 2011 15:03:22 +0100 Message-ID: <87wr9nz8ph.fsf@rho.meyering.net> Lines: 53 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) P=E1draig Brady wrote: > On 12/23/2011 12:08 PM, Jim Meyering wrote: >> P=E1draig Brady wrote: >>> On 12/22/2011 11:48 PM, P=E1draig Brady wrote: >>>> On 12/22/2011 09:50 PM, Alan Curry wrote: >>>>> Bob Proulx writes: >>>>>> >>>>>> Jim Meyering wrote: >>>>>>> Are there so many new remote file systems coming into use now? >>>>>>> That are not listed in /usr/include/linux/magic.h? >>>>>> >>>>>> The past can always be enumerated. The future is always changing. = It >>>>>> isn't possible to have a complete list of future items. It is only >>>>>> possible to have a complete list of past items. The future is not y= et >>>>>> written. >>>>> >>>>> Between past and future is the present, i.e. the currently running ke= rnel. >>>>> Shouldn't it return an error when you use an interface that isn't imp= lemented >>>>> by the underlying filesystem? Why doesn't this happen? >>>> >>>> That's a fair point. >>>> >>>> Eric shouldn't some/all remote file systems in the kernel >>>> return ENOTSUP for inotify operations? >>> >>> Oh right, as Sven points out, >>> a notification _is_ sent for local processes modifying a remote file. >>> I guess we'd need a IN_REMOTE flag (send remote events too), which >>> remote file systems would return ENOTSUP if they don't support that. >>> That's getting a bit awkward though. >> >> I'm thinking of recording[*] which file systems are local and which >> are remote. > > You mean by tagging the table in stat.c with say "(remote)" after the > hex constant? > Then use that to build a header for use by tail::fremote() ? Yes. >> Then we can make tail -f warn when one or more of >> its file arguments resides on a remote file system. We may finally >> have to add and document --disable-inotify. > > Currently we fall back to polling for remote file systems. > I'm not sure it's worth warning since it's only a latency difference. My original goal was to warn, for unknown file system types, that the type is unknown (suggesting to report it), and that tail -f is resorting to the use of polling. >> [*] It's easy to record local/remote in a table from which a switch stmt >> or gperf table is derived, just as is currently done for FS magic number= s. From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 23 Dec 2011 14:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10349@debbugs.gnu.org, Sven Breuner , Alan Curry , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.13246497367387 (code B ref 10349); Fri, 23 Dec 2011 14:16:02 +0000 Received: (at 10349) by debbugs.gnu.org; 23 Dec 2011 14:15:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Re5uK-0001v5-EM for submit@debbugs.gnu.org; Fri, 23 Dec 2011 09:15:36 -0500 Received: from mail1.vodafone.ie ([213.233.128.43]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Re5uI-0001ux-0X for 10349@debbugs.gnu.org; Fri, 23 Dec 2011 09:15:35 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAF6L9E5tTiPl/2dsb2JhbAAMN6lghU8BAQEEMgFGEAsNCwkWDwkDAgECAUUGDQEHAQG/PYN9iBIEmnGMRQ Received: from unknown (HELO [192.168.1.79]) ([109.78.35.229]) by mail1.vodafone.ie with ESMTP; 23 Dec 2011 14:13:17 +0000 Message-ID: <4EF48C7C.3060200@draigBrady.com> Date: Fri, 23 Dec 2011 14:13:16 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> <4EF3C1C3.7080600@draigBrady.com> <4EF3C681.3000708@draigBrady.com> <87vcp71oe9.fsf@rho.meyering.net> <4EF48848.6080409@draigBrady.com> <87wr9nz8ph.fsf@rho.meyering.net> In-Reply-To: <87wr9nz8ph.fsf@rho.meyering.net> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.5 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) On 12/23/2011 02:03 PM, Jim Meyering wrote: > Pádraig Brady wrote: >> On 12/23/2011 12:08 PM, Jim Meyering wrote: >>> Pádraig Brady wrote: >>>> On 12/22/2011 11:48 PM, Pádraig Brady wrote: >>>>> On 12/22/2011 09:50 PM, Alan Curry wrote: >>>>>> Bob Proulx writes: >>>>>>> >>>>>>> Jim Meyering wrote: >>>>>>>> Are there so many new remote file systems coming into use now? >>>>>>>> That are not listed in /usr/include/linux/magic.h? >>>>>>> >>>>>>> The past can always be enumerated. The future is always changing. It >>>>>>> isn't possible to have a complete list of future items. It is only >>>>>>> possible to have a complete list of past items. The future is not yet >>>>>>> written. >>>>>> >>>>>> Between past and future is the present, i.e. the currently running kernel. >>>>>> Shouldn't it return an error when you use an interface that isn't implemented >>>>>> by the underlying filesystem? Why doesn't this happen? >>>>> >>>>> That's a fair point. >>>>> >>>>> Eric shouldn't some/all remote file systems in the kernel >>>>> return ENOTSUP for inotify operations? >>>> >>>> Oh right, as Sven points out, >>>> a notification _is_ sent for local processes modifying a remote file. >>>> I guess we'd need a IN_REMOTE flag (send remote events too), which >>>> remote file systems would return ENOTSUP if they don't support that. >>>> That's getting a bit awkward though. >>> >>> I'm thinking of recording[*] which file systems are local and which >>> are remote. >> >> You mean by tagging the table in stat.c with say "(remote)" after the >> hex constant? >> Then use that to build a header for use by tail::fremote() ? > > Yes. > >>> Then we can make tail -f warn when one or more of >>> its file arguments resides on a remote file system. We may finally >>> have to add and document --disable-inotify. >> >> Currently we fall back to polling for remote file systems. >> I'm not sure it's worth warning since it's only a latency difference. > > My original goal was to warn, for unknown file system types, > that the type is unknown (suggesting to report it), and that > tail -f is resorting to the use of polling. Oh right, warn about unknown. That would make sense. cheers, Pádraig. From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 23 Dec 2011 18:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 10349@debbugs.gnu.org, Sven Breuner , Alan Curry , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.132466402431178 (code B ref 10349); Fri, 23 Dec 2011 18:14:02 +0000 Received: (at 10349) by debbugs.gnu.org; 23 Dec 2011 18:13:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Re9cl-00086p-Mm for submit@debbugs.gnu.org; Fri, 23 Dec 2011 13:13:44 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Re9ci-00086g-Cl for 10349@debbugs.gnu.org; Fri, 23 Dec 2011 13:13:42 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 9339B600C1; Fri, 23 Dec 2011 19:11:22 +0100 (CET) From: Jim Meyering In-Reply-To: <4EF48C7C.3060200@draigBrady.com> ("=?UTF-8?Q?P=C3=A1draig?= Brady"'s message of "Fri, 23 Dec 2011 14:13:16 +0000") References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> <4EF3C1C3.7080600@draigBrady.com> <4EF3C681.3000708@draigBrady.com> <87vcp71oe9.fsf@rho.meyering.net> <4EF48848.6080409@draigBrady.com> <87wr9nz8ph.fsf@rho.meyering.net> <4EF48C7C.3060200@draigBrady.com> Date: Fri, 23 Dec 2011 19:11:22 +0100 Message-ID: <87y5u3xinp.fsf@rho.meyering.net> Lines: 502 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) P=E1draig Brady wrote: ... >> My original goal was to warn, for unknown file system types, >> that the type is unknown (suggesting to report it), and that >> tail -f is resorting to the use of polling. > > Oh right, warn about unknown. > That would make sense. Here's a proposed patch: >From 9d8d9d7151b9d47597a9808a6dfc4e0df5af04c5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 22 Dec 2011 23:23:02 +0100 Subject: [PATCH] tail: with -f, use polling when a file is on an FS of unknown type Before we would use inotify in that case, which would work as long as updates were taking place locally, but not at all when remote. Move hard-coded list of known remote FS types into a more maintainable table in stat.c, alongside the list of FS names and magic numbers. Generate a new is_local_fs_type function. * src/Makefile.am (fs-is-local.h): New rule, generated file. * src/extract-magic: Revamp to parse local/remote keyword after each magic number in src/stat.c's case statements. Accept new --local option. * src/.gitignore: Ignore the generated fs-is-local.h. * src/tail.c [HAVE_INOTIFY]: Include fs-is-local.h. (fremote) [HAVE_INOTIFY]: Use the new function in place of the switch stmt with hard-coded list of FS types. Emit a warning when processing a file on a file system of unknown type. * NEWS (Changes in behavior): Mention it. Suggested by Sven Breuner. --- NEWS | 7 ++ src/.gitignore | 1 + src/Makefile.am | 9 +++ src/extract-magic | 48 ++++++++++++--- src/stat.c | 164 ++++++++++++++++++++++++++-----------------------= --- src/tail.c | 30 ++++------ 6 files changed, 150 insertions(+), 109 deletions(-) diff --git a/NEWS b/NEWS index 80b6c9a..9b96f80 100644 --- a/NEWS +++ b/NEWS @@ -32,6 +32,13 @@ GNU coreutils NEWS -*= - outline -*- [you might say this was introduced in coreutils-7.5, along with inotify support, but the new magic numbers weren't in the usual places then.] +** Changes in behavior + + tail -f now uses polling (not inotify) when any of its file arguments + resides on a file system of unknown type. In addition, for each such + argument, tail -f prints a warning with the FS type magic number and a + request to report it to the bug-reporting address. + * Noteworthy changes in release 8.14 (2011-10-12) [stable] diff --git a/src/.gitignore b/src/.gitignore index d397370..d25a8e5 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -31,6 +31,7 @@ false fmt fold fs.h +fs-is-local.h getlimits ginstall groups diff --git a/src/Makefile.am b/src/Makefile.am index f36e138..7d33803 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -148,6 +148,7 @@ noinst_HEADERS =3D \ fiemap.h \ find-mount-point.h \ fs.h \ + fs-is-local.h \ group-list.h \ ioblksize.h \ ls.h \ @@ -597,6 +598,14 @@ fs-kernel-magic: Makefile | LC_ALL=3DC sort \ > $@-t && mv $@-t $@ +BUILT_SOURCES +=3D fs-is-local.h +fs-is-local.h: stat.c extract-magic + $(AM_V_GEN)rm -f $@ + $(AM_V_at)$(PERL) $(srcdir)/extract-magic --remote $(srcdir)/stat.c \ + > $@t + $(AM_V_at)chmod a-w $@t + $(AM_V_at)mv $@t $@ + BUILT_SOURCES +=3D fs.h fs.h: stat.c extract-magic $(AM_V_GEN)rm -f $@ diff --git a/src/extract-magic b/src/extract-magic index 6bc054f..8a4644f 100644 --- a/src/extract-magic +++ b/src/extract-magic @@ -65,10 +65,15 @@ FIXME: describe OPTIONS: - Derive #define directives from specially formatted `case ...:' statement= s. + There are two modes of operation, the default, which is to emit + #define directives derived from specially formatted `case' statements, + and that with --local, which is to emit a static inline function + mapping S_MAGIC_* values to 1, 0, -1, corresponding to known-local, + known-remote/distributed/network and unknown, respectively. - --help display this help and exit - --version output version information and exit + --local emit an is_local_fs_type function + --help display this help and exit + --version output version information and exit EOF } @@ -76,8 +81,12 @@ EOF } { + # The default is to print S_MAGIC_* definitions. + my $emit_magic =3D 1; + GetOptions ( + 'remote' =3D> sub { $emit_magic =3D 0 }, help =3D> sub { usage 0 }, version =3D> sub { print "$ME version $VERSION\n"; exit }, ) or usage 1; @@ -103,31 +112,50 @@ EOF # Fail if there is a `case S_MAGIC_.*' line without # a properly formed comment. - print <)) { $line =3D~ /^[ \t]+case S_MAGIC_/ or next; - $line =3D~ m!^[ \t]+case (S_MAGIC_\w+): /\* (0x[0-9A-Fa-f]+) \*/$! + $line =3D~ + m!^[ \t]+case (S_MAGIC_\w+): /\* (0x[0-9A-Fa-f]+) (local|remote) \= */! or (warn "$ME:$file:$.: malformed case S_MAGIC_... line"), $fail =3D 1, next; my $name =3D $1; - my $value =3D $2; - print "# define $name $value\n"; + my $magic =3D $2; + my $local =3D $3 eq 'local' ? 1 : 0; + print $emit_magic + ? "# define $name $magic\n" + : " case $name: return $local;\n"; } - print <<\EOF; + $emit_magic + and print <<\EOF; #elif defined __GNU__ # include #endif EOF + $emit_magic + or printf " default: return -1;\n }\n}\n"; + close FH; exit $fail; diff --git a/src/stat.c b/src/stat.c index 801073b..0a454cd 100644 --- a/src/stat.c +++ b/src/stat.c @@ -237,169 +237,169 @@ human_fstype (STRUCT_STATVFS const *statfsbuf) a comment. The S_MAGIC_... name and constant are automatically combined to produce the #define directives in fs.h. */ - case S_MAGIC_ADFS: /* 0xADF5 */ + case S_MAGIC_ADFS: /* 0xADF5 local */ return "adfs"; - case S_MAGIC_AFFS: /* 0xADFF */ + case S_MAGIC_AFFS: /* 0xADFF local */ return "affs"; - case S_MAGIC_AFS: /* 0x5346414F */ + case S_MAGIC_AFS: /* 0x5346414F remote */ return "afs"; - case S_MAGIC_ANON_INODE_FS: /* 0x09041934 */ + case S_MAGIC_ANON_INODE_FS: /* 0x09041934 local */ return "anon-inode FS"; - case S_MAGIC_AUTOFS: /* 0x0187 */ + case S_MAGIC_AUTOFS: /* 0x0187 local */ return "autofs"; - case S_MAGIC_BEFS: /* 0x42465331 */ + case S_MAGIC_BEFS: /* 0x42465331 local */ return "befs"; - case S_MAGIC_BFS: /* 0x1BADFACE */ + case S_MAGIC_BFS: /* 0x1BADFACE local */ return "bfs"; - case S_MAGIC_BINFMT_MISC: /* 0x42494E4D */ + case S_MAGIC_BINFMT_MISC: /* 0x42494E4D local */ return "binfmt_misc"; - case S_MAGIC_BTRFS: /* 0x9123683E */ + case S_MAGIC_BTRFS: /* 0x9123683E local */ return "btrfs"; - case S_MAGIC_CGROUP: /* 0x0027E0EB */ + case S_MAGIC_CGROUP: /* 0x0027E0EB local */ return "cgroupfs"; - case S_MAGIC_CIFS: /* 0xFF534D42 */ + case S_MAGIC_CIFS: /* 0xFF534D42 remote */ return "cifs"; - case S_MAGIC_CODA: /* 0x73757245 */ + case S_MAGIC_CODA: /* 0x73757245 remote */ return "coda"; - case S_MAGIC_COH: /* 0x012FF7B7 */ + case S_MAGIC_COH: /* 0x012FF7B7 local */ return "coh"; - case S_MAGIC_CRAMFS: /* 0x28CD3D45 */ + case S_MAGIC_CRAMFS: /* 0x28CD3D45 local */ return "cramfs"; - case S_MAGIC_CRAMFS_WEND: /* 0x453DCD28 */ + case S_MAGIC_CRAMFS_WEND: /* 0x453DCD28 local */ return "cramfs-wend"; - case S_MAGIC_DEBUGFS: /* 0x64626720 */ + case S_MAGIC_DEBUGFS: /* 0x64626720 local */ return "debugfs"; - case S_MAGIC_DEVFS: /* 0x1373 */ + case S_MAGIC_DEVFS: /* 0x1373 local */ return "devfs"; - case S_MAGIC_DEVPTS: /* 0x1CD1 */ + case S_MAGIC_DEVPTS: /* 0x1CD1 local */ return "devpts"; - case S_MAGIC_ECRYPTFS: /* 0xF15F */ + case S_MAGIC_ECRYPTFS: /* 0xF15F local */ return "ecryptfs"; - case S_MAGIC_EFS: /* 0x00414A53 */ + case S_MAGIC_EFS: /* 0x00414A53 local */ return "efs"; - case S_MAGIC_EXT: /* 0x137D */ + case S_MAGIC_EXT: /* 0x137D local */ return "ext"; - case S_MAGIC_EXT2: /* 0xEF53 */ + case S_MAGIC_EXT2: /* 0xEF53 local */ return "ext2/ext3"; - case S_MAGIC_EXT2_OLD: /* 0xEF51 */ + case S_MAGIC_EXT2_OLD: /* 0xEF51 local */ return "ext2"; - case S_MAGIC_FAT: /* 0x4006 */ + case S_MAGIC_FAT: /* 0x4006 local */ return "fat"; - case S_MAGIC_FHGFS: /* 0x19830326 */ + case S_MAGIC_FHGFS: /* 0x19830326 remote */ return "fhgfs"; - case S_MAGIC_FUSEBLK: /* 0x65735546 */ + case S_MAGIC_FUSEBLK: /* 0x65735546 remote */ return "fuseblk"; - case S_MAGIC_FUSECTL: /* 0x65735543 */ + case S_MAGIC_FUSECTL: /* 0x65735543 remote */ return "fusectl"; - case S_MAGIC_FUTEXFS: /* 0x0BAD1DEA */ + case S_MAGIC_FUTEXFS: /* 0x0BAD1DEA local */ return "futexfs"; - case S_MAGIC_GFS: /* 0x1161970 */ + case S_MAGIC_GFS: /* 0x1161970 remote */ return "gfs/gfs2"; - case S_MAGIC_GPFS: /* 0x47504653 */ + case S_MAGIC_GPFS: /* 0x47504653 remote */ return "gpfs"; - case S_MAGIC_HFS: /* 0x4244 */ + case S_MAGIC_HFS: /* 0x4244 local */ return "hfs"; - case S_MAGIC_HPFS: /* 0xF995E849 */ + case S_MAGIC_HPFS: /* 0xF995E849 local */ return "hpfs"; - case S_MAGIC_HUGETLBFS: /* 0x958458F6 */ + case S_MAGIC_HUGETLBFS: /* 0x958458F6 local */ return "hugetlbfs"; - case S_MAGIC_INOTIFYFS: /* 0x2BAD1DEA */ + case S_MAGIC_INOTIFYFS: /* 0x2BAD1DEA local */ return "inotifyfs"; - case S_MAGIC_ISOFS: /* 0x9660 */ + case S_MAGIC_ISOFS: /* 0x9660 local */ return "isofs"; - case S_MAGIC_ISOFS_R_WIN: /* 0x4004 */ + case S_MAGIC_ISOFS_R_WIN: /* 0x4004 local */ return "isofs"; - case S_MAGIC_ISOFS_WIN: /* 0x4000 */ + case S_MAGIC_ISOFS_WIN: /* 0x4000 local */ return "isofs"; - case S_MAGIC_JFFS: /* 0x07C0 */ + case S_MAGIC_JFFS: /* 0x07C0 local */ return "jffs"; - case S_MAGIC_JFFS2: /* 0x72B6 */ + case S_MAGIC_JFFS2: /* 0x72B6 local */ return "jffs2"; - case S_MAGIC_JFS: /* 0x3153464A */ + case S_MAGIC_JFS: /* 0x3153464A local */ return "jfs"; - case S_MAGIC_KAFS: /* 0x6B414653 */ + case S_MAGIC_KAFS: /* 0x6B414653 remote */ return "k-afs"; - case S_MAGIC_LUSTRE: /* 0x0BD00BD0 */ + case S_MAGIC_LUSTRE: /* 0x0BD00BD0 remote */ return "lustre"; - case S_MAGIC_MINIX: /* 0x137F */ + case S_MAGIC_MINIX: /* 0x137F local */ return "minix"; - case S_MAGIC_MINIX_30: /* 0x138F */ + case S_MAGIC_MINIX_30: /* 0x138F local */ return "minix (30 char.)"; - case S_MAGIC_MINIX_V2: /* 0x2468 */ + case S_MAGIC_MINIX_V2: /* 0x2468 local */ return "minix v2"; - case S_MAGIC_MINIX_V2_30: /* 0x2478 */ + case S_MAGIC_MINIX_V2_30: /* 0x2478 local */ return "minix v2 (30 char.)"; - case S_MAGIC_MINIX_V3: /* 0x4D5A */ + case S_MAGIC_MINIX_V3: /* 0x4D5A local */ return "minix3"; - case S_MAGIC_MQUEUE: /* 0x19800202 */ + case S_MAGIC_MQUEUE: /* 0x19800202 local */ return "mqueue"; - case S_MAGIC_MSDOS: /* 0x4D44 */ + case S_MAGIC_MSDOS: /* 0x4D44 local */ return "msdos"; - case S_MAGIC_NCP: /* 0x564C */ + case S_MAGIC_NCP: /* 0x564C remote */ return "novell"; - case S_MAGIC_NFS: /* 0x6969 */ + case S_MAGIC_NFS: /* 0x6969 remote */ return "nfs"; - case S_MAGIC_NFSD: /* 0x6E667364 */ + case S_MAGIC_NFSD: /* 0x6E667364 remote */ return "nfsd"; - case S_MAGIC_NILFS: /* 0x3434 */ + case S_MAGIC_NILFS: /* 0x3434 local */ return "nilfs"; - case S_MAGIC_NTFS: /* 0x5346544E */ + case S_MAGIC_NTFS: /* 0x5346544E local */ return "ntfs"; - case S_MAGIC_OPENPROM: /* 0x9FA1 */ + case S_MAGIC_OPENPROM: /* 0x9FA1 local */ return "openprom"; - case S_MAGIC_OCFS2: /* 0x7461636f */ + case S_MAGIC_OCFS2: /* 0x7461636f remote */ return "ocfs2"; - case S_MAGIC_PROC: /* 0x9FA0 */ + case S_MAGIC_PROC: /* 0x9FA0 local */ return "proc"; - case S_MAGIC_PSTOREFS: /* 0x6165676C */ + case S_MAGIC_PSTOREFS: /* 0x6165676C local */ return "pstorefs"; - case S_MAGIC_QNX4: /* 0x002F */ + case S_MAGIC_QNX4: /* 0x002F local */ return "qnx4"; - case S_MAGIC_RAMFS: /* 0x858458F6 */ + case S_MAGIC_RAMFS: /* 0x858458F6 local */ return "ramfs"; - case S_MAGIC_REISERFS: /* 0x52654973 */ + case S_MAGIC_REISERFS: /* 0x52654973 local */ return "reiserfs"; - case S_MAGIC_ROMFS: /* 0x7275 */ + case S_MAGIC_ROMFS: /* 0x7275 local */ return "romfs"; - case S_MAGIC_RPC_PIPEFS: /* 0x67596969 */ + case S_MAGIC_RPC_PIPEFS: /* 0x67596969 local */ return "rpc_pipefs"; - case S_MAGIC_SECURITYFS: /* 0x73636673 */ + case S_MAGIC_SECURITYFS: /* 0x73636673 local */ return "securityfs"; - case S_MAGIC_SELINUX: /* 0xF97CFF8C */ + case S_MAGIC_SELINUX: /* 0xF97CFF8C local */ return "selinux"; - case S_MAGIC_SMB: /* 0x517B */ + case S_MAGIC_SMB: /* 0x517B remote */ return "smb"; - case S_MAGIC_SOCKFS: /* 0x534F434B */ + case S_MAGIC_SOCKFS: /* 0x534F434B local */ return "sockfs"; - case S_MAGIC_SQUASHFS: /* 0x73717368 */ + case S_MAGIC_SQUASHFS: /* 0x73717368 local */ return "squashfs"; - case S_MAGIC_SYSFS: /* 0x62656572 */ + case S_MAGIC_SYSFS: /* 0x62656572 local */ return "sysfs"; - case S_MAGIC_SYSV2: /* 0x012FF7B6 */ + case S_MAGIC_SYSV2: /* 0x012FF7B6 local */ return "sysv2"; - case S_MAGIC_SYSV4: /* 0x012FF7B5 */ + case S_MAGIC_SYSV4: /* 0x012FF7B5 local */ return "sysv4"; - case S_MAGIC_TMPFS: /* 0x01021994 */ + case S_MAGIC_TMPFS: /* 0x01021994 local */ return "tmpfs"; - case S_MAGIC_UDF: /* 0x15013346 */ + case S_MAGIC_UDF: /* 0x15013346 local */ return "udf"; - case S_MAGIC_UFS: /* 0x00011954 */ + case S_MAGIC_UFS: /* 0x00011954 local */ return "ufs"; - case S_MAGIC_UFS_BYTESWAPPED: /* 0x54190100 */ + case S_MAGIC_UFS_BYTESWAPPED: /* 0x54190100 local */ return "ufs"; - case S_MAGIC_USBDEVFS: /* 0x9FA2 */ + case S_MAGIC_USBDEVFS: /* 0x9FA2 local */ return "usbdevfs"; - case S_MAGIC_V9FS: /* 0x01021997 */ + case S_MAGIC_V9FS: /* 0x01021997 local */ return "v9fs"; - case S_MAGIC_VXFS: /* 0xA501FCF5 */ + case S_MAGIC_VXFS: /* 0xA501FCF5 local */ return "vxfs"; - case S_MAGIC_XENFS: /* 0xABBA1974 */ + case S_MAGIC_XENFS: /* 0xABBA1974 local */ return "xenfs"; - case S_MAGIC_XENIX: /* 0x012FF7B4 */ + case S_MAGIC_XENIX: /* 0x012FF7B4 local */ return "xenix"; - case S_MAGIC_XFS: /* 0x58465342 */ + case S_MAGIC_XFS: /* 0x58465342 local */ return "xfs"; - case S_MAGIC_XIAFS: /* 0x012FD16D */ + case S_MAGIC_XIAFS: /* 0x012FD16D local */ return "xia"; # elif __GNU__ diff --git a/src/tail.c b/src/tail.c index 1f619f3..4581845 100644 --- a/src/tail.c +++ b/src/tail.c @@ -54,6 +54,7 @@ /* inotify needs to know if a file is local. */ # include "fs.h" +# include "fs-is-local.h" # if HAVE_SYS_STATFS_H # include # elif HAVE_SYS_VFS_H @@ -896,26 +897,21 @@ fremote (int fd, const char *name) } else { - switch (buf.f_type) + switch (is_local_fs_type (buf.f_type)) { - case S_MAGIC_AFS: - case S_MAGIC_CIFS: - case S_MAGIC_CODA: - case S_MAGIC_FUSEBLK: - case S_MAGIC_FUSECTL: - case S_MAGIC_GFS: - case S_MAGIC_GPFS: - case S_MAGIC_FHGFS: - case S_MAGIC_KAFS: - case S_MAGIC_LUSTRE: - case S_MAGIC_NCP: - case S_MAGIC_NFS: - case S_MAGIC_NFSD: - case S_MAGIC_OCFS2: - case S_MAGIC_SMB: + case 0: break; - default: + case -1: + error (0, 0, _("unrecognized file system type 0x%08lx for %s. " + "please report this to %s. reverting to polling"), + buf.f_type, quote (name), PACKAGE_BUGREPORT); + /* Treat as "remote", so caller polls. */ + break; + case 1: remote =3D false; + break; + default: + assert (!"unexpected return value from is_local_fs_type"); } } # endif -- 1.7.8.1.367.g25ecc From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 23 Dec 2011 18:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10349@debbugs.gnu.org, Sven Breuner , Alan Curry , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.13246664522216 (code B ref 10349); Fri, 23 Dec 2011 18:55:01 +0000 Received: (at 10349) by debbugs.gnu.org; 23 Dec 2011 18:54:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReAFu-0000Ze-KI for submit@debbugs.gnu.org; Fri, 23 Dec 2011 13:54:11 -0500 Received: from mail1.vodafone.ie ([213.233.128.43]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReAFr-0000ZU-Ad for 10349@debbugs.gnu.org; Fri, 23 Dec 2011 13:54:08 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAO/M9E5tTiPl/2dsb2JhbAAMN6lfhU8BAQEDATIBRgULCw0LCRYPCQMCAQIBRQYNAQcBAYd2t0iDfYgSBJpxjEU Received: from unknown (HELO [192.168.1.79]) ([109.78.35.229]) by mail1.vodafone.ie with ESMTP; 23 Dec 2011 18:51:35 +0000 Message-ID: <4EF4CDB7.6010303@draigBrady.com> Date: Fri, 23 Dec 2011 18:51:35 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> <4EF3C1C3.7080600@draigBrady.com> <4EF3C681.3000708@draigBrady.com> <87vcp71oe9.fsf@rho.meyering.net> <4EF48848.6080409@draigBrady.com> <87wr9nz8ph.fsf@rho.meyering.net> <4EF48C7C.3060200@draigBrady.com> <87y5u3xinp.fsf@rho.meyering.net> In-Reply-To: <87y5u3xinp.fsf@rho.meyering.net> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.5 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) On 12/23/2011 06:11 PM, Jim Meyering wrote: > Here's a proposed patch: Looks good, one nit. > --- a/src/extract-magic > +++ b/src/extract-magic > @@ -65,10 +65,15 @@ FIXME: describe > > OPTIONS: > > - Derive #define directives from specially formatted `case ...:' statements. > + There are two modes of operation, the default, which is to emit > + #define directives derived from specially formatted `case' statements, > + and that with --local, which is to emit a static inline function > + mapping S_MAGIC_* values to 1, 0, -1, corresponding to known-local, > + known-remote/distributed/network and unknown, respectively. > > - --help display this help and exit > - --version output version information and exit > + --local emit an is_local_fs_type function > + --help display this help and exit > + --version output version information and exit s/--local/--remote/ ? > diff --git a/src/stat.c b/src/stat.c > index 801073b..0a454cd 100644 > --- a/src/stat.c > +++ b/src/stat.c > + case S_MAGIC_AFS: /* 0x5346414F remote */ > + case S_MAGIC_CIFS: /* 0xFF534D42 remote */ > + case S_MAGIC_CODA: /* 0x73757245 remote */ > + case S_MAGIC_FHGFS: /* 0x19830326 remote */ > + case S_MAGIC_FUSEBLK: /* 0x65735546 remote */ > + case S_MAGIC_FUSECTL: /* 0x65735543 remote */ > + case S_MAGIC_GFS: /* 0x1161970 remote */ > + case S_MAGIC_GPFS: /* 0x47504653 remote */ > + case S_MAGIC_KAFS: /* 0x6B414653 remote */ > + case S_MAGIC_LUSTRE: /* 0x0BD00BD0 remote */ > + case S_MAGIC_NCP: /* 0x564C remote */ > + case S_MAGIC_NFS: /* 0x6969 remote */ > + case S_MAGIC_NFSD: /* 0x6E667364 remote */ > + case S_MAGIC_OCFS2: /* 0x7461636f remote */ > + case S_MAGIC_SMB: /* 0x517B remote */ cheers, Pádraig. From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 23 Dec 2011 19:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady Cc: 10349@debbugs.gnu.org, Sven Breuner , Alan Curry , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.13246668872878 (code B ref 10349); Fri, 23 Dec 2011 19:02:01 +0000 Received: (at 10349) by debbugs.gnu.org; 23 Dec 2011 19:01:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReAMw-0000kM-Hj for submit@debbugs.gnu.org; Fri, 23 Dec 2011 14:01:27 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReAMt-0000kE-G2 for 10349@debbugs.gnu.org; Fri, 23 Dec 2011 14:01:25 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id D6B056016E; Fri, 23 Dec 2011 19:59:05 +0100 (CET) From: Jim Meyering In-Reply-To: <4EF4CDB7.6010303@draigBrady.com> ("=?UTF-8?Q?P=C3=A1draig?= Brady"'s message of "Fri, 23 Dec 2011 18:51:35 +0000") References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> <4EF3C1C3.7080600@draigBrady.com> <4EF3C681.3000708@draigBrady.com> <87vcp71oe9.fsf@rho.meyering.net> <4EF48848.6080409@draigBrady.com> <87wr9nz8ph.fsf@rho.meyering.net> <4EF48C7C.3060200@draigBrady.com> <87y5u3xinp.fsf@rho.meyering.net> <4EF4CDB7.6010303@draigBrady.com> Date: Fri, 23 Dec 2011 19:59:05 +0100 Message-ID: <87sjkbxgg6.fsf@rho.meyering.net> Lines: 57 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) P=E1draig Brady wrote: > On 12/23/2011 06:11 PM, Jim Meyering wrote: >> Here's a proposed patch: > > Looks good, one nit. > >> --- a/src/extract-magic >> +++ b/src/extract-magic >> @@ -65,10 +65,15 @@ FIXME: describe >> >> OPTIONS: >> >> - Derive #define directives from specially formatted `case ...:' statem= ents. >> + There are two modes of operation, the default, which is to emit >> + #define directives derived from specially formatted `case' statements, >> + and that with --local, which is to emit a static inline function >> + mapping S_MAGIC_* values to 1, 0, -1, corresponding to known-local, >> + known-remote/distributed/network and unknown, respectively. >> >> - --help display this help and exit >> - --version output version information and exit >> + --local emit an is_local_fs_type function >> + --help display this help and exit >> + --version output version information and exit > > s/--local/--remote/ ? Good catch. Thank you. I first did it with --remote, but then switched to --local, but missed two: diff --git a/src/Makefile.am b/src/Makefile.am index 7d33803..c12b9d9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -601,7 +601,7 @@ fs-kernel-magic: Makefile BUILT_SOURCES +=3D fs-is-local.h fs-is-local.h: stat.c extract-magic $(AM_V_GEN)rm -f $@ - $(AM_V_at)$(PERL) $(srcdir)/extract-magic --remote $(srcdir)/stat.c \ + $(AM_V_at)$(PERL) $(srcdir)/extract-magic --local $(srcdir)/stat.c \ > $@t $(AM_V_at)chmod a-w $@t $(AM_V_at)mv $@t $@ diff --git a/src/extract-magic b/src/extract-magic index 8a4644f..57d3681 100644 --- a/src/extract-magic +++ b/src/extract-magic @@ -86,7 +86,7 @@ EOF GetOptions ( - 'remote' =3D> sub { $emit_magic =3D 0 }, + local =3D> sub { $emit_magic =3D 0 }, help =3D> sub { usage 0 }, version =3D> sub { print "$ME version $VERSION\n"; exit }, ) or usage 1; From unknown Sat Sep 20 07:52:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10349: tail: fix --follow on FhGFS remote file systems Resent-From: Sven Breuner Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 23 Dec 2011 20:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10349 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Jim Meyering Cc: 10349@debbugs.gnu.org, =?UTF-8?Q?P=C3=A1draig?= Brady , Alan Curry , Bob Proulx Received: via spool by 10349-submit@debbugs.gnu.org id=B10349.132467257611163 (code B ref 10349); Fri, 23 Dec 2011 20:37:01 +0000 Received: (at 10349) by debbugs.gnu.org; 23 Dec 2011 20:36:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReBqh-0002tz-2J for submit@debbugs.gnu.org; Fri, 23 Dec 2011 15:36:16 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ReBqe-0002to-3Q for 10349@debbugs.gnu.org; Fri, 23 Dec 2011 15:36:13 -0500 Received: from itwm2.itwm.fhg.de (itwm2.itwm.fhg.de [131.246.191.3]) by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pBNKXroR024107 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for <10349@debbugs.gnu.org>; Fri, 23 Dec 2011 21:33:53 +0100 Received: from mail2.itwm.fhg.de ([131.246.191.79]:35824) by itwm2.itwm.fhg.de with esmtps (TLSv1:DES-CBC3-SHA:168) (/C=DE/ST=Rheinland-Pfalz/L=Kaiserslautern/O=Fraunhofer ITWM/OU=SLG/CN=mail2.itwm.fhg.de)(verified=1) (Exim 4.74 #1) id 1ReBoN-0001Ss-Ps; Fri, 23 Dec 2011 21:33:51 +0100 Message-ID: <4EF4E5AF.9030905@itwm.fraunhofer.de> Date: Fri, 23 Dec 2011 21:33:51 +0100 From: Sven Breuner User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 References: <4EF2809E.7040104@itwm.fraunhofer.de> <20111222215044.28611.qmail@kosh.dhis.org> <4EF3C1C3.7080600@draigBrady.com> <4EF3C681.3000708@draigBrady.com> <87vcp71oe9.fsf@rho.meyering.net> <4EF48848.6080409@draigBrady.com> <87wr9nz8ph.fsf@rho.meyering.net> <4EF48C7C.3060200@draigBrady.com> <87y5u3xinp.fsf@rho.meyering.net> In-Reply-To: <87y5u3xinp.fsf@rho.meyering.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-ITWM-CharSet: ISO-8859-1 X-ITWM-Scanned-By: mail2.itwm.fhg.de Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mailgw1.uni-kl.de id pBNKXroR024107 X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Jim Meyering wrote on 12/23/2011 07:11 PM: > P=E1draig Brady wrote: > ... >>> My original goal was to warn, for unknown file system types, >>> that the type is unknown (suggesting to report it), and that >>> tail -f is resorting to the use of polling. >> >> Oh right, warn about unknown. >> That would make sense. > > Here's a proposed patch: > [...] > Subject: [PATCH] tail: with -f, use polling when a file is on an FS of > unknown type >[...] thanks for that. Definitely a good thing (including the more explicit=20 table of local/remote fs types and the idea of printing a message for=20 unknown fs types to show people an easy way to contribute to the table). Best regards, Sven