[Top][All Lists]

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

[PATCH] stat,tail: recognize new local FS type: pipefs

From: Jim Meyering
Subject: [PATCH] stat,tail: recognize new local FS type: pipefs
Date: Mon, 26 Dec 2011 16:50:04 +0100

After the recent change to tail -f,

    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.

I noticed this failure from

    tail: test f-pipe-1.p: stderr mismatch, comparing f-pipe-1.p.E (actual) and 
f-pipe-1.p.3 (expected)
    *** f-pipe-1.p.E    Mon Dec 26 10:52:44 2011
    --- f-pipe-1.p.3    Mon Dec 26 10:52:44 2011
    *** 1 ****
    - tail: unrecognized file system type 0x50495045 for `standard input'. 
please report this to address@hidden reverting to polling
    --- 0 ----

Looking up 0x50495045, I found "pipefs".
I've labeled it as "remote" to make it so tail uses polling, not
inotify with it.  If anyone happens to know that inotify does work
with that type of file system, please let us know.

>From b1230020dc5c5acc9f9ab16c3c397c0aecb5977b Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 26 Dec 2011 16:09:48 +0100
Subject: [PATCH] stat,tail: recognize new FS type: pipefs

* src/stat.c (human_fstype) [S_MAGIC_PIPEFS]: New case.
* NEWS (Bug fixes): Mention this.
 NEWS       |    2 ++
 src/stat.c |    5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index 9b96f80..9a2f31c 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,8 @@ GNU coreutils NEWS                                    -*- 
outline -*-
   and NcFsd file systems.  This did not affect Unix/Linux-based kernels.
   [bug introduced in coreutils-8.0, when rm began using fts]

+  stat -f now recognizes the FhGFS and PipeFS file system types.
   tac no longer fails to handle two or more non-seekable inputs
   [bug introduced in coreutils-5.3.0]

diff --git a/src/stat.c b/src/stat.c
index cb9a63c..d4de6c7 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -349,6 +349,11 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
       return "openprom";
     case S_MAGIC_OCFS2: /* 0x7461636f remote */
       return "ocfs2";
+    case S_MAGIC_PIPEFS: /* 0x50495045 remote */
+      /* FIXME: change syntax or add an optional attribute like "inotify:no".
+         The above is labeled as "remote" so that tail always uses polling,
+         but this isn't really a remote file system type.  */
+      return "pipefs";
     case S_MAGIC_PROC: /* 0x9FA0 local */
       return "proc";
     case S_MAGIC_PSTOREFS: /* 0x6165676C local */

reply via email to

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