bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* [PATCH] mountlist: recognize more file system types as remote
@ 2020-10-27 21:23 Pádraig Brady
  2020-11-03  8:31 ` Kamil Dudka
  0 siblings, 1 reply; 3+ messages in thread
From: Pádraig Brady @ 2020-10-27 21:23 UTC (permalink / raw)
  To: bug-gnulib

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 include virtual machine file systems,
as though they may not be distributed to separate hosts,
they're remote to the current kernel.

* lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
"remote" file systems from stat.c in coreutils.
---
 ChangeLog       |  7 +++++++
 lib/mountlist.c | 11 ++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 4eb5bcb1d..41e284558 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-10-27  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-10-26  Paul Eggert  <eggert@cs.ucla.edu>
 
 	sys_stat: update comments for S_IRWXUGO, S_IXUGO
diff --git a/lib/mountlist.c b/lib/mountlist.c
index ca1be63f2..8205c29bd 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -224,7 +224,7 @@ 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 if it is of any other of the listed types
    or Fs_name is equal to "-hosts" (used by autofs to mount remote fs).  */
 # define ME_REMOTE(Fs_name, Fs_type)            \
     (strchr (Fs_name, ':') != NULL              \
@@ -233,8 +233,17 @@ 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, "prl_fs") == 0         \
+     || strcmp (Fs_type, "vboxsf") == 0         \
+     || strcmp (Fs_type, "vxfs") == 0           \
      || strcmp ("-hosts", Fs_name) == 0)
 #endif
 
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mountlist: recognize more file system types as remote
  2020-10-27 21:23 [PATCH] mountlist: recognize more file system types as remote Pádraig Brady
@ 2020-11-03  8:31 ` Kamil Dudka
  2020-11-03 14:08   ` Pádraig Brady
  0 siblings, 1 reply; 3+ messages in thread
From: Kamil Dudka @ 2020-11-03  8:31 UTC (permalink / raw)
  To: Pádraig Brady; +Cc: bug-gnulib

On Tuesday, October 27, 2020 10:23:15 PM CET Pádraig Brady wrote:
> 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 include virtual machine file systems,
> as though they may not be distributed to separate hosts,
> they're remote to the current kernel.
> 
> * lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
> "remote" file systems from stat.c in coreutils.

Looks good to me.

Kamil

> ---
>  ChangeLog       |  7 +++++++
>  lib/mountlist.c | 11 ++++++++++-
>  2 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/ChangeLog b/ChangeLog
> index 4eb5bcb1d..41e284558 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,10 @@
> +2020-10-27  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-10-26  Paul Eggert  <eggert@cs.ucla.edu>
> 
>  	sys_stat: update comments for S_IRWXUGO, S_IXUGO
> diff --git a/lib/mountlist.c b/lib/mountlist.c
> index ca1be63f2..8205c29bd 100644
> --- a/lib/mountlist.c
> +++ b/lib/mountlist.c
> @@ -224,7 +224,7 @@ 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 if it is of any other of the listed types
>     or Fs_name is equal to "-hosts" (used by autofs to mount remote fs).  */
> # define ME_REMOTE(Fs_name, Fs_type)            \
>      (strchr (Fs_name, ':') != NULL              \
> @@ -233,8 +233,17 @@ 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, "prl_fs") == 0         \
> +     || strcmp (Fs_type, "vboxsf") == 0         \
> +     || strcmp (Fs_type, "vxfs") == 0           \
> 
>       || strcmp ("-hosts", Fs_name) == 0)
> 
>  #endif




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mountlist: recognize more file system types as remote
  2020-11-03  8:31 ` Kamil Dudka
@ 2020-11-03 14:08   ` Pádraig Brady
  0 siblings, 0 replies; 3+ messages in thread
From: Pádraig Brady @ 2020-11-03 14:08 UTC (permalink / raw)
  To: Kamil Dudka; +Cc: bug-gnulib

On 03/11/2020 08:31, Kamil Dudka wrote:
> On Tuesday, October 27, 2020 10:23:15 PM CET Pádraig Brady wrote:
>> 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 include virtual machine file systems,
>> as though they may not be distributed to separate hosts,
>> they're remote to the current kernel.
>>
>> * lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
>> "remote" file systems from stat.c in coreutils.
> 
> Looks good to me.
> 
> Kamil
> 
>> ---
>>   ChangeLog       |  7 +++++++
>>   lib/mountlist.c | 11 ++++++++++-
>>   2 files changed, 17 insertions(+), 1 deletion(-)
>>
>> diff --git a/ChangeLog b/ChangeLog
>> index 4eb5bcb1d..41e284558 100644
>> --- a/ChangeLog
>> +++ b/ChangeLog
>> @@ -1,3 +1,10 @@
>> +2020-10-27  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-10-26  Paul Eggert  <eggert@cs.ucla.edu>
>>
>>   	sys_stat: update comments for S_IRWXUGO, S_IXUGO
>> diff --git a/lib/mountlist.c b/lib/mountlist.c
>> index ca1be63f2..8205c29bd 100644
>> --- a/lib/mountlist.c
>> +++ b/lib/mountlist.c
>> @@ -224,7 +224,7 @@ 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 if it is of any other of the listed types
>>      or Fs_name is equal to "-hosts" (used by autofs to mount remote fs).  */
>> # define ME_REMOTE(Fs_name, Fs_type)            \
>>       (strchr (Fs_name, ':') != NULL              \
>> @@ -233,8 +233,17 @@ 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, "prl_fs") == 0         \
>> +     || strcmp (Fs_type, "vboxsf") == 0         \
>> +     || strcmp (Fs_type, "vxfs") == 0           \
>>
>>        || strcmp ("-hosts", Fs_name) == 0)
>>
>>   #endif

Thanks for the review.

Upon further consideration I'm reluctant to include
the "VM" file systems here. I.e. vboxsf and prl_fs,
as they do consume space on the local machine.
I'll add a comment about those instead, and will push.

cheers,
Pádraig


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-03 14:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 21:23 [PATCH] mountlist: recognize more file system types as remote Pádraig Brady
2020-11-03  8:31 ` Kamil Dudka
2020-11-03 14:08   ` Pádraig Brady

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).