On 12/12/15 19:14, Pádraig Brady wrote:
> On 12/12/15 13:04, Pascal wrote:
>> hi,
>> tail reports this on a particular file :
>>
>> tail: unrecognized file system type 0x794c7630 for '/var/log/xxx.log'. 
>> please report this to [email protected] <mailto:[email protected]>. 
>> reverting to polling
>>
>> the file system used is :
>>
>> /dev/loop0 /run/archiso/sfs/airootfs squashfs ro,relatime 0 0
>> airootfs / overlay 
>> rw,relatime,lowerdir=/run/archiso/sfs/airootfs,upperdir=/run/archiso/cowspace/persistent_live/x86_64/upperdir,workdir=/run/archiso/cowspace/persistent_live/x86_64/workdir
>>  0 0
>>
>> this is a live cd of archlinux build with archiso.
>>
>> regards, lacsaP.
> 
> Interesting. I see that the following is not defined
> in the standard linux/magic.h location:
> #define OVERLAYFS_SUPER_MAGIC 0x794c7630
> 
> I'll fix that up, and see if there is a handy way
> to identify other MAGIC values in the kernel.

Patch attached.

thanks,
Pádraig
From 51c97ec7f0d2c99ced667c7b4ec080ae08c7267b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Sun, 13 Dec 2015 14:58:53 +0000
Subject: [PATCH] stat: report file system type for "overlayfs"

* src/stat.c (human_fstype): Add "overlayfs", and tag it as "remote"
to ensure that tail continues to use the more conservative polling mode.
* README-release: Remove a stale comment about updating fremote()
in tail.c.  Also give a link to *_SUPER_MAGIC definitions
not in the standard linux/magic.h location.
* NEWS: Mention that this file system is recognized.
---
 NEWS           |  4 ++--
 README-release | 11 ++++++++---
 src/stat.c     |  5 +++++
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/NEWS b/NEWS
index 2988146..3768ceb 100644
--- a/NEWS
+++ b/NEWS
@@ -63,8 +63,8 @@ GNU coreutils NEWS                                    -*- 
outline -*-
   ls -w0 is now interpreted as no limit on the length of the outputted line.
 
   stat -f --format=%T now reports the file system type for new Linux
-  pseudo file systems "bpf_fs", "btrfs_test", "nsfs" and "tracefs",
-  and remote file system "acfs".
+  pseudo file systems "bpf_fs", "btrfs_test", "nsfs", "overlayfs"
+  and "tracefs", and remote file system "acfs".
 
 
 * Noteworthy changes in release 8.24 (2015-07-03) [stable]
diff --git a/README-release b/README-release
index 5da96a7..88356bc 100644
--- a/README-release
+++ b/README-release
@@ -36,9 +36,14 @@ FIXME: enable excluded programs like arch? to get their 
manual pages?
       -O src/fs-latest-magic.h
 
   If it finds a new file system magic number, add it to src/stat.c.
-  If it is a remote file system, add the new S_MAGIC_* name you created
-  in stat.c to the list of remote file system types in src/tail.c's
-  fremote function.
+  If it is a remote file system tag it as such.
+
+  Note there may be some new file systems magic values not defined
+  in that linux/magic.h file, which can be seen at:
+
+    https://www.livegrep.com/search/linux\
+    ?q=%23define+.*_SUPER_MAGIC+-file%3Amagic\.h
+
 
 * Pre-release testing:
 
diff --git a/src/stat.c b/src/stat.c
index d568524..e6a36f0 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -394,6 +394,11 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
       return "openprom";
     case S_MAGIC_OCFS2: /* 0x7461636F remote */
       return "ocfs2";
+    case S_MAGIC_OVERLAYFS: /* 0x794C7630 remote */
+      /* This may overlay remote file systems.
+         Also there have been issues reported with inotify and overlayfs,
+         so mark as "remote" so that polling is used.  */
+      return "overlayfs";
     case S_MAGIC_PANFS: /* 0xAAD7AAEA remote */
       return "panfs";
     case S_MAGIC_PIPEFS: /* 0x50495045 remote */
-- 
2.5.0

Reply via email to