Blame SOURCES/coreutils-8.22-newfilesystems.patch

dd59ef
 src/fs-is-local.h | 23 ++++++++++++++++++++
dd59ef
 src/stat.c        | 64 +++++++++++++++++++++++++++++++++++++++++++++++++------
dd59ef
 src/tail.c        |  2 ++
dd59ef
 3 files changed, 83 insertions(+), 6 deletions(-)
dd59ef
dd59ef
diff --git a/src/fs-is-local.h b/src/fs-is-local.h
dd59ef
index 61849da..5f73488 100644
dd59ef
--- a/src/fs-is-local.h
dd59ef
+++ b/src/fs-is-local.h
dd59ef
@@ -6,30 +6,39 @@ is_local_fs_type (unsigned long int magic)
dd59ef
 {
dd59ef
   switch (magic)
dd59ef
     {
dd59ef
+      case S_MAGIC_AAFS: return 1;
dd59ef
+      case S_MAGIC_ACFS: return 0;
dd59ef
       case S_MAGIC_ADFS: return 1;
dd59ef
       case S_MAGIC_AFFS: return 1;
dd59ef
       case S_MAGIC_AFS: return 0;
dd59ef
       case S_MAGIC_ANON_INODE_FS: return 1;
dd59ef
       case S_MAGIC_AUFS: return 0;
dd59ef
       case S_MAGIC_AUTOFS: return 1;
dd59ef
+      case S_MAGIC_BALLOON_KVM: return 1;
dd59ef
       case S_MAGIC_BEFS: return 1;
dd59ef
       case S_MAGIC_BDEVFS: return 1;
dd59ef
       case S_MAGIC_BFS: return 1;
dd59ef
+      case S_MAGIC_BPF_FS: return 1;
dd59ef
       case S_MAGIC_BINFMTFS: return 1;
dd59ef
       case S_MAGIC_BTRFS: return 1;
dd59ef
+      case S_MAGIC_BTRFS_TEST: return 1;
dd59ef
       case S_MAGIC_CEPH: return 0;
dd59ef
       case S_MAGIC_CGROUP: return 1;
dd59ef
+      case S_MAGIC_CGROUP2: return 1;
dd59ef
       case S_MAGIC_CIFS: return 0;
dd59ef
       case S_MAGIC_CODA: return 0;
dd59ef
       case S_MAGIC_COH: return 1;
dd59ef
+      case S_MAGIC_CONFIGFS: return 1;
dd59ef
       case S_MAGIC_CRAMFS: return 1;
dd59ef
       case S_MAGIC_CRAMFS_WEND: return 1;
dd59ef
+      case S_MAGIC_DAXFS: return 1;
dd59ef
       case S_MAGIC_DEBUGFS: return 1;
dd59ef
       case S_MAGIC_DEVFS: return 1;
dd59ef
       case S_MAGIC_DEVPTS: return 1;
dd59ef
       case S_MAGIC_ECRYPTFS: return 1;
dd59ef
       case S_MAGIC_EFIVARFS: return 1;
dd59ef
       case S_MAGIC_EFS: return 1;
dd59ef
+      case S_MAGIC_EXFS: return 1;
dd59ef
       case S_MAGIC_EXOFS: return 1;
dd59ef
       case S_MAGIC_EXT: return 1;
dd59ef
       case S_MAGIC_EXT2: return 1;
dd59ef
@@ -43,10 +52,13 @@ is_local_fs_type (unsigned long int magic)
dd59ef
       case S_MAGIC_GFS: return 0;
dd59ef
       case S_MAGIC_GPFS: return 0;
dd59ef
       case S_MAGIC_HFS: return 1;
dd59ef
+      case S_MAGIC_HFS_PLUS: return 1;
dd59ef
+      case S_MAGIC_HFS_X: return 1;
dd59ef
       case S_MAGIC_HOSTFS: return 1;
dd59ef
       case S_MAGIC_HPFS: return 1;
dd59ef
       case S_MAGIC_HUGETLBFS: return 1;
dd59ef
       case S_MAGIC_MTD_INODE_FS: return 1;
dd59ef
+      case S_MAGIC_IBRIX: return 0;
dd59ef
       case S_MAGIC_INOTIFYFS: return 1;
dd59ef
       case S_MAGIC_ISOFS: return 1;
dd59ef
       case S_MAGIC_ISOFS_R_WIN: return 1;
dd59ef
@@ -55,7 +67,9 @@ is_local_fs_type (unsigned long int magic)
dd59ef
       case S_MAGIC_JFFS2: return 1;
dd59ef
       case S_MAGIC_JFS: return 1;
dd59ef
       case S_MAGIC_KAFS: return 0;
dd59ef
+      case S_MAGIC_LOGFS: return 1;
dd59ef
       case S_MAGIC_LUSTRE: return 0;
dd59ef
+      case S_MAGIC_M1FS: return 1;
dd59ef
       case S_MAGIC_MINIX: return 1;
dd59ef
       case S_MAGIC_MINIX_30: return 1;
dd59ef
       case S_MAGIC_MINIX_V2: return 1;
dd59ef
@@ -67,23 +81,29 @@ is_local_fs_type (unsigned long int magic)
dd59ef
       case S_MAGIC_NFS: return 0;
dd59ef
       case S_MAGIC_NFSD: return 0;
dd59ef
       case S_MAGIC_NILFS: return 1;
dd59ef
+      case S_MAGIC_NSFS: return 1;
dd59ef
       case S_MAGIC_NTFS: return 1;
dd59ef
       case S_MAGIC_OPENPROM: return 1;
dd59ef
       case S_MAGIC_OCFS2: return 0;
dd59ef
+      case S_MAGIC_OVERLAYFS: return 0;
dd59ef
       case S_MAGIC_PANFS: return 0;
dd59ef
       case S_MAGIC_PIPEFS: return 0;
dd59ef
+      case S_MAGIC_PRL_FS: return 0;
dd59ef
       case S_MAGIC_PROC: return 1;
dd59ef
       case S_MAGIC_PSTOREFS: return 1;
dd59ef
       case S_MAGIC_QNX4: return 1;
dd59ef
       case S_MAGIC_QNX6: return 1;
dd59ef
       case S_MAGIC_RAMFS: return 1;
dd59ef
+      case S_MAGIC_RDTGROUP: return 1;
dd59ef
       case S_MAGIC_REISERFS: return 1;
dd59ef
       case S_MAGIC_ROMFS: return 1;
dd59ef
       case S_MAGIC_RPC_PIPEFS: return 1;
dd59ef
+      case S_MAGIC_SDCARDFS: return 1;
dd59ef
       case S_MAGIC_SECURITYFS: return 1;
dd59ef
       case S_MAGIC_SELINUX: return 1;
dd59ef
       case S_MAGIC_SMACK: return 1;
dd59ef
       case S_MAGIC_SMB: return 0;
dd59ef
+      case S_MAGIC_SMB2: return 0;
dd59ef
       case S_MAGIC_SNFS: return 0;
dd59ef
       case S_MAGIC_SOCKFS: return 1;
dd59ef
       case S_MAGIC_SQUASHFS: return 1;
dd59ef
@@ -91,6 +111,7 @@ is_local_fs_type (unsigned long int magic)
dd59ef
       case S_MAGIC_SYSV2: return 1;
dd59ef
       case S_MAGIC_SYSV4: return 1;
dd59ef
       case S_MAGIC_TMPFS: return 1;
dd59ef
+      case S_MAGIC_TRACEFS: return 1;
dd59ef
       case S_MAGIC_UBIFS: return 1;
dd59ef
       case S_MAGIC_UDF: return 1;
dd59ef
       case S_MAGIC_UFS: return 1;
dd59ef
@@ -100,11 +121,13 @@ is_local_fs_type (unsigned long int magic)
dd59ef
       case S_MAGIC_VMHGFS: return 0;
dd59ef
       case S_MAGIC_VXFS: return 0;
dd59ef
       case S_MAGIC_VZFS: return 1;
dd59ef
+      case S_MAGIC_WSLFS: return 1;
dd59ef
       case S_MAGIC_XENFS: return 1;
dd59ef
       case S_MAGIC_XENIX: return 1;
dd59ef
       case S_MAGIC_XFS: return 1;
dd59ef
       case S_MAGIC_XIAFS: return 1;
dd59ef
       case S_MAGIC_ZFS: return 1;
dd59ef
+      case S_MAGIC_ZSMALLOC: return 1;
dd59ef
       default: return -1;
dd59ef
     }
dd59ef
 }
dd59ef
diff --git a/src/stat.c b/src/stat.c
dd59ef
index ba491f4..718b32a 100644
dd59ef
--- a/src/stat.c
dd59ef
+++ b/src/stat.c
dd59ef
@@ -240,6 +240,10 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
          a comment.  The S_MAGIC_... name and constant are automatically
dd59ef
          combined to produce the #define directives in fs.h.  */
dd59ef
 
dd59ef
+    case S_MAGIC_AAFS: /* 0x5A3C69F0 local */
dd59ef
+      return "aafs";
dd59ef
+    case S_MAGIC_ACFS: /* 0x61636673 remote */
dd59ef
+      return "acfs";
dd59ef
     case S_MAGIC_ADFS: /* 0xADF5 local */
dd59ef
       return "adfs";
dd59ef
     case S_MAGIC_AFFS: /* 0xADFF local */
dd59ef
@@ -255,30 +259,42 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "aufs";
dd59ef
     case S_MAGIC_AUTOFS: /* 0x0187 local */
dd59ef
       return "autofs";
dd59ef
+    case S_MAGIC_BALLOON_KVM: /* 0x13661366 local */
dd59ef
+      return "balloon-kvm-fs";
dd59ef
     case S_MAGIC_BEFS: /* 0x42465331 local */
dd59ef
       return "befs";
dd59ef
     case S_MAGIC_BDEVFS: /* 0x62646576 local */
dd59ef
       return "bdevfs";
dd59ef
     case S_MAGIC_BFS: /* 0x1BADFACE local */
dd59ef
       return "bfs";
dd59ef
+    case S_MAGIC_BPF_FS: /* 0xCAFE4A11 local */
dd59ef
+      return "bpf_fs";
dd59ef
     case S_MAGIC_BINFMTFS: /* 0x42494E4D local */
dd59ef
       return "binfmt_misc";
dd59ef
     case S_MAGIC_BTRFS: /* 0x9123683E local */
dd59ef
       return "btrfs";
dd59ef
+    case S_MAGIC_BTRFS_TEST: /* 0x73727279 local */
dd59ef
+      return "btrfs_test";
dd59ef
     case S_MAGIC_CEPH: /* 0x00C36400 remote */
dd59ef
       return "ceph";
dd59ef
     case S_MAGIC_CGROUP: /* 0x0027E0EB local */
dd59ef
       return "cgroupfs";
dd59ef
+    case S_MAGIC_CGROUP2: /* 0x63677270 local */
dd59ef
+      return "cgroup2fs";
dd59ef
     case S_MAGIC_CIFS: /* 0xFF534D42 remote */
dd59ef
       return "cifs";
dd59ef
     case S_MAGIC_CODA: /* 0x73757245 remote */
dd59ef
       return "coda";
dd59ef
     case S_MAGIC_COH: /* 0x012FF7B7 local */
dd59ef
       return "coh";
dd59ef
+    case S_MAGIC_CONFIGFS: /* 0x62656570 local */
dd59ef
+      return "configfs";
dd59ef
     case S_MAGIC_CRAMFS: /* 0x28CD3D45 local */
dd59ef
       return "cramfs";
dd59ef
     case S_MAGIC_CRAMFS_WEND: /* 0x453DCD28 local */
dd59ef
       return "cramfs-wend";
dd59ef
+    case S_MAGIC_DAXFS: /* 0x64646178 local */
dd59ef
+      return "daxfs";
dd59ef
     case S_MAGIC_DEBUGFS: /* 0x64626720 local */
dd59ef
       return "debugfs";
dd59ef
     case S_MAGIC_DEVFS: /* 0x1373 local */
dd59ef
@@ -291,6 +307,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "efivarfs";
dd59ef
     case S_MAGIC_EFS: /* 0x00414A53 local */
dd59ef
       return "efs";
dd59ef
+    case S_MAGIC_EXFS: /* 0x45584653 local */
dd59ef
+      return "exfs";
dd59ef
     case S_MAGIC_EXOFS: /* 0x5DF5 local */
dd59ef
       return "exofs";
dd59ef
     case S_MAGIC_EXT: /* 0x137D local */
dd59ef
@@ -311,13 +329,17 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "fusectl";
dd59ef
     case S_MAGIC_FUTEXFS: /* 0x0BAD1DEA local */
dd59ef
       return "futexfs";
dd59ef
-    case S_MAGIC_GFS: /* 0x1161970 remote */
dd59ef
+    case S_MAGIC_GFS: /* 0x01161970 remote */
dd59ef
       return "gfs/gfs2";
dd59ef
     case S_MAGIC_GPFS: /* 0x47504653 remote */
dd59ef
       return "gpfs";
dd59ef
     case S_MAGIC_HFS: /* 0x4244 local */
dd59ef
       return "hfs";
dd59ef
-    case S_MAGIC_HOSTFS: /* 0xC0FFEE local */
dd59ef
+    case S_MAGIC_HFS_PLUS: /* 0x482B local */
dd59ef
+      return "hfs+";
dd59ef
+    case S_MAGIC_HFS_X: /* 0x4858 local */
dd59ef
+      return "hfsx";
dd59ef
+    case S_MAGIC_HOSTFS: /* 0x00C0FFEE local */
dd59ef
       return "hostfs";
dd59ef
     case S_MAGIC_HPFS: /* 0xF995E849 local */
dd59ef
       return "hpfs";
dd59ef
@@ -325,6 +347,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "hugetlbfs";
dd59ef
     case S_MAGIC_MTD_INODE_FS: /* 0x11307854 local */
dd59ef
       return "inodefs";
dd59ef
+    case S_MAGIC_IBRIX: /* 0x013111A8 remote */
dd59ef
+      return "ibrix";
dd59ef
     case S_MAGIC_INOTIFYFS: /* 0x2BAD1DEA local */
dd59ef
       return "inotifyfs";
dd59ef
     case S_MAGIC_ISOFS: /* 0x9660 local */
dd59ef
@@ -341,8 +365,12 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "jfs";
dd59ef
     case S_MAGIC_KAFS: /* 0x6B414653 remote */
dd59ef
       return "k-afs";
dd59ef
+    case S_MAGIC_LOGFS: /* 0xC97E8168 local */
dd59ef
+      return "logfs";
dd59ef
     case S_MAGIC_LUSTRE: /* 0x0BD00BD0 remote */
dd59ef
       return "lustre";
dd59ef
+    case S_MAGIC_M1FS: /* 0x5346314D local */
dd59ef
+      return "m1fs";
dd59ef
     case S_MAGIC_MINIX: /* 0x137F local */
dd59ef
       return "minix";
dd59ef
     case S_MAGIC_MINIX_30: /* 0x138F local */
dd59ef
@@ -365,19 +393,28 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "nfsd";
dd59ef
     case S_MAGIC_NILFS: /* 0x3434 local */
dd59ef
       return "nilfs";
dd59ef
+    case S_MAGIC_NSFS: /* 0x6E736673 local */
dd59ef
+      return "nsfs";
dd59ef
     case S_MAGIC_NTFS: /* 0x5346544E local */
dd59ef
       return "ntfs";
dd59ef
     case S_MAGIC_OPENPROM: /* 0x9FA1 local */
dd59ef
       return "openprom";
dd59ef
-    case S_MAGIC_OCFS2: /* 0x7461636f remote */
dd59ef
+    case S_MAGIC_OCFS2: /* 0x7461636F remote */
dd59ef
       return "ocfs2";
dd59ef
+    case S_MAGIC_OVERLAYFS: /* 0x794C7630 remote */
dd59ef
+      /* This may overlay remote file systems.
dd59ef
+         Also there have been issues reported with inotify and overlayfs,
dd59ef
+         so mark as "remote" so that polling is used.  */
dd59ef
+      return "overlayfs";
dd59ef
     case S_MAGIC_PANFS: /* 0xAAD7AAEA remote */
dd59ef
       return "panfs";
dd59ef
     case S_MAGIC_PIPEFS: /* 0x50495045 remote */
dd59ef
       /* FIXME: change syntax or add an optional attribute like "inotify:no".
dd59ef
-         The above is labeled as "remote" so that tail always uses polling,
dd59ef
-         but this isn't really a remote file system type.  */
dd59ef
+         pipefs and prlfs are labeled as "remote" so that tail always polls,
dd59ef
+         but these aren't really remote file system types.  */
dd59ef
       return "pipefs";
dd59ef
+    case S_MAGIC_PRL_FS: /* 0x7C7C6673 remote */
dd59ef
+      return "prl_fs";
dd59ef
     case S_MAGIC_PROC: /* 0x9FA0 local */
dd59ef
       return "proc";
dd59ef
     case S_MAGIC_PSTOREFS: /* 0x6165676C local */
dd59ef
@@ -388,12 +425,16 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "qnx6";
dd59ef
     case S_MAGIC_RAMFS: /* 0x858458F6 local */
dd59ef
       return "ramfs";
dd59ef
+    case S_MAGIC_RDTGROUP: /* 0x07655821 local */
dd59ef
+      return "rdt";
dd59ef
     case S_MAGIC_REISERFS: /* 0x52654973 local */
dd59ef
       return "reiserfs";
dd59ef
     case S_MAGIC_ROMFS: /* 0x7275 local */
dd59ef
       return "romfs";
dd59ef
     case S_MAGIC_RPC_PIPEFS: /* 0x67596969 local */
dd59ef
       return "rpc_pipefs";
dd59ef
+    case S_MAGIC_SDCARDFS: /* 0x5DCA2DF5 local */
dd59ef
+      return "sdcardfs";
dd59ef
     case S_MAGIC_SECURITYFS: /* 0x73636673 local */
dd59ef
       return "securityfs";
dd59ef
     case S_MAGIC_SELINUX: /* 0xF97CFF8C local */
dd59ef
@@ -402,6 +443,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "smackfs";
dd59ef
     case S_MAGIC_SMB: /* 0x517B remote */
dd59ef
       return "smb";
dd59ef
+    case S_MAGIC_SMB2: /* 0xFE534D42 remote */
dd59ef
+      return "smb2";
dd59ef
     case S_MAGIC_SNFS: /* 0xBEEFDEAD remote */
dd59ef
       return "snfs";
dd59ef
     case S_MAGIC_SOCKFS: /* 0x534F434B local */
dd59ef
@@ -416,6 +459,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "sysv4";
dd59ef
     case S_MAGIC_TMPFS: /* 0x01021994 local */
dd59ef
       return "tmpfs";
dd59ef
+    case S_MAGIC_TRACEFS: /* 0x74726163 local */
dd59ef
+      return "tracefs";
dd59ef
     case S_MAGIC_UBIFS: /* 0x24051905 local */
dd59ef
       return "ubifs";
dd59ef
     case S_MAGIC_UDF: /* 0x15013346 local */
dd59ef
@@ -430,10 +475,14 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "v9fs";
dd59ef
     case S_MAGIC_VMHGFS: /* 0xBACBACBC remote */
dd59ef
       return "vmhgfs";
dd59ef
-    case S_MAGIC_VXFS: /* 0xA501FCF5 local */
dd59ef
+    case S_MAGIC_VXFS: /* 0xA501FCF5 remote */
dd59ef
+      /* Veritas File System can run in single instance or clustered mode,
dd59ef
+         so mark as remote to cater for the latter case.  */
dd59ef
       return "vxfs";
dd59ef
     case S_MAGIC_VZFS: /* 0x565A4653 local */
dd59ef
       return "vzfs";
dd59ef
+    case S_MAGIC_WSLFS: /* 0x53464846 local */
dd59ef
+      return "wslfs";
dd59ef
     case S_MAGIC_XENFS: /* 0xABBA1974 local */
dd59ef
       return "xenfs";
dd59ef
     case S_MAGIC_XENIX: /* 0x012FF7B4 local */
dd59ef
@@ -444,6 +493,9 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
dd59ef
       return "xia";
dd59ef
     case S_MAGIC_ZFS: /* 0x2FC12FC1 local */
dd59ef
       return "zfs";
dd59ef
+    case S_MAGIC_ZSMALLOC: /* 0x58295829 local */
dd59ef
+      return "zsmallocfs";
dd59ef
+
dd59ef
 
dd59ef
 # elif __GNU__
dd59ef
     case FSTYPE_UFS:
dd59ef
diff --git a/src/tail.c b/src/tail.c
dd59ef
index dc4e10d..f4575d8 100644
dd59ef
--- a/src/tail.c
dd59ef
+++ b/src/tail.c
dd59ef
@@ -898,6 +898,7 @@ fremote (int fd, const char *name)
dd59ef
         case 0:
dd59ef
           break;
dd59ef
         case -1:
dd59ef
+#if 0
dd59ef
           {
dd59ef
             unsigned long int fs_type = buf.f_type;
dd59ef
             error (0, 0, _("unrecognized file system type 0x%08lx for %s. "
dd59ef
@@ -905,6 +906,7 @@ fremote (int fd, const char *name)
dd59ef
                    fs_type, quote (name), PACKAGE_BUGREPORT);
dd59ef
             /* Treat as "remote", so caller polls.  */
dd59ef
           }
dd59ef
+#endif
dd59ef
           break;
dd59ef
         case 1:
dd59ef
           remote = false;