Subject: Re: bug#14020: tail: unrecognized file system type 0x24051905

From: Pádraig Brady <[email-masked]>
Date: Fri, 22 Mar 2013 12:24:35 +0000

On 03/20/2013 10:01 PM, Joseph Chen wrote:
> Not sure if this is an already known issue but I was asked to report this error:
> 
> tail: unrecognized file system type 0x24051905 for '/var/log/asterisk/messages'. please report this to [email-masked]. reverting to polling
> 
> This file that is being tail'ed locates on a UBIFS NAND partition.

The attached should address this.

thanks!
Pádraig.

>From ba98da72ad96fdce23c977acc7eb292c1580a7fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email-masked]>
Date: Fri, 22 Mar 2013 12:15:04 +0000
Subject: [PATCH] stat,tail: improve support for efivarfs, exofs, f2fs and
 ubifs

* src/stat.c (human_fstype): Add new file system ID definitions.
* NEWS: Mention the improvement.
Fixes http://bugs.gnu.org/14020
---
 NEWS       |    7 +++++++
 src/stat.c |    8 ++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index e0cc08a..483669d 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,13 @@ GNU coreutils NEWS                                    -*- outline -*-
   uniq accepts a new option: --group to print all items, while separating
   unique groups with empty lines.
 
+** Improvements
+
+  stat and tail work better with EFIVARFS, EXOFS, F2FS and UBIFS.
+  stat -f --format=%T now reports the file system type, and tail -f now uses
+  inotify for files on those file systems, rather than the default (for unknown
+  file system types) of issuing a warning and reverting to polling.
+
 ** Build-related
 
   factor now builds on aarch64 based systems [bug introduced in coreutils-8.20]
diff --git a/src/stat.c b/src/stat.c
index a1938a7..8ba958a 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -288,14 +288,20 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
       return "devpts";
     case S_MAGIC_ECRYPTFS: /* 0xF15F local */
       return "ecryptfs";
+    case S_MAGIC_EFIVARFS: /* 0xDE5E81E4 local */
+      return "efivarfs";
     case S_MAGIC_EFS: /* 0x00414A53 local */
       return "efs";
+    case S_MAGIC_EXOFS: /* 0x5DF5 local */
+      return "exofs";
     case S_MAGIC_EXT: /* 0x137D local */
       return "ext";
     case S_MAGIC_EXT2: /* 0xEF53 local */
       return "ext2/ext3";
     case S_MAGIC_EXT2_OLD: /* 0xEF51 local */
       return "ext2";
+    case S_MAGIC_F2FS: /* 0xF2F52010 local */
+      return "f2fs";
     case S_MAGIC_FAT: /* 0x4006 local */
       return "fat";
     case S_MAGIC_FHGFS: /* 0x19830326 remote */
@@ -405,6 +411,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
       return "sysv4";
     case S_MAGIC_TMPFS: /* 0x01021994 local */
       return "tmpfs";
+    case S_MAGIC_UBIFS: /* 0x24051905 local */
+      return "ubifs";
     case S_MAGIC_UDF: /* 0x15013346 local */
       return "udf";
     case S_MAGIC_UFS: /* 0x00011954 local */
-- 
1.7.7.6