|
|
b2edc3 |
From b60a61d7e5f6504518095d9ee8c7c8b185bedb23 Mon Sep 17 00:00:00 2001
|
|
|
b2edc3 |
From: Marc Dionne <marc.dionne@auristor.com>
|
|
|
b2edc3 |
Date: Wed, 5 Feb 2020 13:35:12 -0800
|
|
|
b2edc3 |
Subject: [PATCH 1/2] mountlist: Consider AFS filesystems as remote
|
|
|
b2edc3 |
|
|
|
b2edc3 |
df --local relies on the ME_REMOTE macro to determine if a given
|
|
|
b2edc3 |
mount entry should be considered "local". There is special logic
|
|
|
b2edc3 |
for nfs and smb/cifs mounts, but /afs as mounted by OpenAFS, the
|
|
|
b2edc3 |
kernel's kafs module or AuriStorFS is treated as a local mount.
|
|
|
b2edc3 |
* lib/mountlist.c (ME_REMOTE): Treat mounts of type 'afs'
|
|
|
b2edc3 |
(OpenAFS, kernel kafs) and 'auristorfs' (AuriStorFS) as remote.
|
|
|
b2edc3 |
|
|
|
b2edc3 |
Copyright-paperwork-exempt: yes
|
|
|
b2edc3 |
|
|
|
b2edc3 |
Upstream-commit: 7a15069b68a376f26c5dca34ae2689c5bf8adc99
|
|
|
b2edc3 |
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
|
b2edc3 |
---
|
|
|
b2edc3 |
lib/mountlist.c | 3 +++
|
|
|
b2edc3 |
1 file changed, 3 insertions(+)
|
|
|
b2edc3 |
|
|
|
b2edc3 |
diff --git a/lib/mountlist.c b/lib/mountlist.c
|
|
|
b2edc3 |
index b691f38..1b1e5e4 100644
|
|
|
b2edc3 |
--- a/lib/mountlist.c
|
|
|
b2edc3 |
+++ b/lib/mountlist.c
|
|
|
b2edc3 |
@@ -224,6 +224,7 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
|
|
|
b2edc3 |
#ifndef ME_REMOTE
|
|
|
b2edc3 |
/* A file system is "remote" if its Fs_name contains a ':'
|
|
|
b2edc3 |
or if (it is of type (smbfs or cifs) and its Fs_name starts with '//')
|
|
|
b2edc3 |
+ or if it is of type (afs or auristorfs)
|
|
|
b2edc3 |
or Fs_name is equal to "-hosts" (used by autofs to mount remote fs). */
|
|
|
b2edc3 |
# define ME_REMOTE(Fs_name, Fs_type) \
|
|
|
b2edc3 |
(strchr (Fs_name, ':') != NULL \
|
|
|
b2edc3 |
@@ -231,6 +232,8 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
|
|
|
b2edc3 |
&& (Fs_name)[1] == '/' \
|
|
|
b2edc3 |
&& (strcmp (Fs_type, "smbfs") == 0 \
|
|
|
b2edc3 |
|| strcmp (Fs_type, "cifs") == 0)) \
|
|
|
b2edc3 |
+ || strcmp (Fs_type, "afs") == 0 \
|
|
|
b2edc3 |
+ || strcmp (Fs_type, "auristorfs") == 0 \
|
|
|
b2edc3 |
|| (strcmp("-hosts", Fs_name) == 0))
|
|
|
b2edc3 |
#endif
|
|
|
b2edc3 |
|
|
|
b2edc3 |
--
|
|
|
b2edc3 |
2.21.1
|
|
|
b2edc3 |
|
|
|
b2edc3 |
|
|
|
b2edc3 |
From 41010dfb0cc100f41fb16d93f9fa36dc07e63ac6 Mon Sep 17 00:00:00 2001
|
|
|
b2edc3 |
From: Kenneth D'souza <kdsouza@redhat.com>
|
|
|
b2edc3 |
Date: Sat, 8 Feb 2020 13:54:35 +0000
|
|
|
b2edc3 |
Subject: [PATCH 2/2] mountlist: consider smb3 file systems as remote
|
|
|
b2edc3 |
|
|
|
b2edc3 |
* lib/mountlist.c (ME_REMOTE): Recognize file systems of type
|
|
|
b2edc3 |
"smb3" as remote.
|
|
|
b2edc3 |
|
|
|
b2edc3 |
Upstream-commit: 4d4a22ab1f719b7c6c3fe3dbf45d11baafd3c563
|
|
|
b2edc3 |
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
|
b2edc3 |
---
|
|
|
b2edc3 |
lib/mountlist.c | 1 +
|
|
|
b2edc3 |
1 file changed, 1 insertion(+)
|
|
|
b2edc3 |
|
|
|
b2edc3 |
diff --git a/lib/mountlist.c b/lib/mountlist.c
|
|
|
b2edc3 |
index 1b1e5e4..8ad74a2 100644
|
|
|
b2edc3 |
--- a/lib/mountlist.c
|
|
|
b2edc3 |
+++ b/lib/mountlist.c
|
|
|
b2edc3 |
@@ -231,6 +231,7 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
|
|
|
b2edc3 |
|| ((Fs_name)[0] == '/' \
|
|
|
b2edc3 |
&& (Fs_name)[1] == '/' \
|
|
|
b2edc3 |
&& (strcmp (Fs_type, "smbfs") == 0 \
|
|
|
b2edc3 |
+ || strcmp (Fs_type, "smb3") == 0 \
|
|
|
b2edc3 |
|| strcmp (Fs_type, "cifs") == 0)) \
|
|
|
b2edc3 |
|| strcmp (Fs_type, "afs") == 0 \
|
|
|
b2edc3 |
|| strcmp (Fs_type, "auristorfs") == 0 \
|
|
|
b2edc3 |
--
|
|
|
b2edc3 |
2.21.1
|
|
|
b2edc3 |
|