Blame SOURCES/coreutils-8.32-new-fs-types.patch

e63663
From 09400b7f7f48d8eedc0df55de8073a43bc0aac96 Mon Sep 17 00:00:00 2001
e63663
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
e63663
Date: Tue, 27 Oct 2020 20:15:43 +0000
e63663
Subject: [PATCH 1/2] stat,tail: sync file system constants from the linux
e63663
 kernel
e63663
e63663
* src/stat.c: Add magic constants for "devmem", and
e63663
"zonefs" file systems.
e63663
* NEWS: Mention the improvement.
e63663
e63663
Upstream-commit: ff80b6b0a0507e24f39cc1aad09d147f5187430b
e63663
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
e63663
---
e63663
 src/stat.c | 4 ++++
e63663
 1 file changed, 4 insertions(+)
e63663
e63663
diff --git a/src/stat.c b/src/stat.c
e63663
index 5012622..8cd69da 100644
e63663
--- a/src/stat.c
e63663
+++ b/src/stat.c
e63663
@@ -347,6 +347,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
e63663
       return "debugfs";
e63663
     case S_MAGIC_DEVFS: /* 0x1373 local */
e63663
       return "devfs";
e63663
+    case S_MAGIC_DEVMEM: /* 0x454D444D local */
e63663
+      return "devmem";
e63663
     case S_MAGIC_DEVPTS: /* 0x1CD1 local */
e63663
       return "devpts";
e63663
     case S_MAGIC_DMA_BUF: /* 0x444D4142 local */
e63663
@@ -549,6 +551,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
e63663
       return "z3fold";
e63663
     case S_MAGIC_ZFS: /* 0x2FC12FC1 local */
e63663
       return "zfs";
e63663
+    case S_MAGIC_ZONEFS: /* 0x5A4F4653 local */
e63663
+      return "zonefs";
e63663
     case S_MAGIC_ZSMALLOC: /* 0x58295829 local */
e63663
       return "zsmallocfs";
e63663
 
e63663
-- 
e63663
2.25.4
e63663
e63663
e63663
From d5948fd41013dfe4d2d10083111821667977c6d1 Mon Sep 17 00:00:00 2001
e63663
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
e63663
Date: Tue, 27 Oct 2020 21:04:14 +0000
e63663
Subject: [PATCH 2/2] mountlist: recognize more file system types as remote
e63663
e63663
Sync "remote" file systems from stat.c in coreutils.
e63663
Note we only consider file systems that do not use host:resource
e63663
mount source.  I.e. those that don't generally use a colon when
e63663
mounting, as that case is already considered.  Searching for
e63663
"<fstype> /etc/fstab" was informative for identifying these.
e63663
The full list of "remote" file systems in coreutils is currently:
e63663
  acfs afs ceph cifs coda fhgfs fuseblk fusectl
e63663
  gfs gfs2 gpfs ibrix k-afs lustre novell nfs nfsd
e63663
  ocfs2 panfs prl_fs smb smb2 snfs vboxsf vmhgfs vxfs
e63663
Note also we do not include virtual machine file systems,
e63663
as even though they're remote to the current kernel,
e63663
they are generally not distributed to separate hosts.
e63663
e63663
* lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
e63663
"remote" file systems from stat.c in coreutils.
e63663
e63663
Upstream-commit: dd1fc46be12d671c1a9d9dc5a6fa8c766e99aa2f
e63663
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
e63663
---
e63663
 lib/mountlist.c | 12 ++++++++++--
e63663
 1 file changed, 10 insertions(+), 2 deletions(-)
e63663
e63663
diff --git a/lib/mountlist.c b/lib/mountlist.c
e63663
index 7abe024..e0227b7 100644
e63663
--- a/lib/mountlist.c
e63663
+++ b/lib/mountlist.c
e63663
@@ -221,8 +221,9 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
e63663
 #ifndef ME_REMOTE
e63663
 /* A file system is "remote" if its Fs_name contains a ':'
e63663
    or if (it is of type (smbfs or cifs) and its Fs_name starts with '//')
e63663
-   or if it is of type (afs or auristorfs)
e63663
-   or Fs_name is equal to "-hosts" (used by autofs to mount remote fs).  */
e63663
+   or if it is of any other of the listed types
e63663
+   or Fs_name is equal to "-hosts" (used by autofs to mount remote fs).
e63663
+   "VM" file systems like prl_fs or vboxsf are not considered remote here. */
e63663
 # define ME_REMOTE(Fs_name, Fs_type)            \
e63663
     (strchr (Fs_name, ':') != NULL              \
e63663
      || ((Fs_name)[0] == '/'                    \
e63663
@@ -230,8 +231,15 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
e63663
          && (strcmp (Fs_type, "smbfs") == 0     \
e63663
              || strcmp (Fs_type, "smb3") == 0   \
e63663
              || strcmp (Fs_type, "cifs") == 0)) \
e63663
+     || strcmp (Fs_type, "acfs") == 0           \
e63663
      || strcmp (Fs_type, "afs") == 0            \
e63663
+     || strcmp (Fs_type, "coda") == 0           \
e63663
      || strcmp (Fs_type, "auristorfs") == 0     \
e63663
+     || strcmp (Fs_type, "fhgfs") == 0          \
e63663
+     || strcmp (Fs_type, "gpfs") == 0           \
e63663
+     || strcmp (Fs_type, "ibrix") == 0          \
e63663
+     || strcmp (Fs_type, "ocfs2") == 0          \
e63663
+     || strcmp (Fs_type, "vxfs") == 0           \
e63663
      || strcmp ("-hosts", Fs_name) == 0)
e63663
 #endif
e63663
 
e63663
-- 
e63663
2.25.4
e63663