]> Savannah Git Hosting - gnulib.git/commitdiff
mountlist: recognize more file system types as remote
authorPádraig Brady <P@draigBrady.com>
Tue, 27 Oct 2020 21:04:14 +0000 (21:04 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 3 Nov 2020 14:16:56 +0000 (14:16 +0000)
Sync "remote" file systems from stat.c in coreutils.
Note we only consider file systems that do not use host:resource
mount source.  I.e. those that don't generally use a colon when
mounting, as that case is already considered.  Searching for
"<fstype> /etc/fstab" was informative for identifying these.
The full list of "remote" file systems in coreutils is currently:
  acfs afs ceph cifs coda fhgfs fuseblk fusectl
  gfs gfs2 gpfs ibrix k-afs lustre novell nfs nfsd
  ocfs2 panfs prl_fs smb smb2 snfs vboxsf vmhgfs vxfs
Note also we do not include virtual machine file systems,
as even though they're remote to the current kernel,
they are generally not distributed to separate hosts.

* lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
"remote" file systems from stat.c in coreutils.

ChangeLog
lib/mountlist.c

index 03904e4e958ecc0ee35042c6d3453954ef1befdd..6a9c762c1c27d45baf722bbcfd5f009f7489e1e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-11-03  Pádraig Brady  <P@draigBrady.com>
+
+       mountlist: recognize more file system types as remote
+
+       * lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
+       "remote" file systems from stat.c in coreutils.
+
 2020-11-02  Bernhard Voelker  <mail@bernhard-voelker.de>
 
        verify tests: Fix -Wuninitialized warning (regression 2020-10-30).
index ca1be63f21ec44f5bee8b1e5400ba391005c5934..026d653306aaa415e9fc80a059a75cfefc7ba185 100644 (file)
@@ -224,8 +224,9 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
 #ifndef ME_REMOTE
 /* A file system is "remote" if its Fs_name contains a ':'
    or if (it is of type (smbfs or cifs) and its Fs_name starts with '//')
-   or if it is of type (afs or auristorfs)
-   or Fs_name is equal to "-hosts" (used by autofs to mount remote fs).  */
+   or if it is of any other of the listed types
+   or Fs_name is equal to "-hosts" (used by autofs to mount remote fs).
+   "VM" file systems like prl_fs or vboxsf are not considered remote here. */
 # define ME_REMOTE(Fs_name, Fs_type)            \
     (strchr (Fs_name, ':') != NULL              \
      || ((Fs_name)[0] == '/'                    \
@@ -233,8 +234,15 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
          && (strcmp (Fs_type, "smbfs") == 0     \
              || strcmp (Fs_type, "smb3") == 0   \
              || strcmp (Fs_type, "cifs") == 0)) \
+     || strcmp (Fs_type, "acfs") == 0           \
      || strcmp (Fs_type, "afs") == 0            \
+     || strcmp (Fs_type, "coda") == 0           \
      || strcmp (Fs_type, "auristorfs") == 0     \
+     || strcmp (Fs_type, "fhgfs") == 0          \
+     || strcmp (Fs_type, "gpfs") == 0           \
+     || strcmp (Fs_type, "ibrix") == 0          \
+     || strcmp (Fs_type, "ocfs2") == 0          \
+     || strcmp (Fs_type, "vxfs") == 0           \
      || strcmp ("-hosts", Fs_name) == 0)
 #endif