GNU bug report logs -
#33785
df: don't suppress remote mounts
Previous Next
Reported by: lzhong <lzhong <at> suse.com>
Date: Tue, 18 Dec 2018 07:02:02 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 17/12/18 22:42, lzhong wrote:
> Hi list,
>
> According to the following commit
>
> commit 2e81e62243409c5c574b899f52b08c000e4d99fd
> Author: Pádraig Brady <P <at> draigBrady.com>
> Date: Wed Oct 29 02:49:17 2014 +0000
>
> df: only suppress remote mounts of separate exports with --total
>
> ...
>
> diff --git a/NEWS b/NEWS
> index 5d3bc58bd..2c7e590e0 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -32,6 +32,11 @@ GNU coreutils NEWS
> -*- outline -*-
>
> ** Changes in behavior
>
> + df no longer suppresses separate exports of the same remote device, as
> + these are generally explicitly mounted. The --total option does still
> + suppress duplicate remote file systems.
> + [suppression was introduced in coreutils-8.21]
>
> The remote mounts should not be suppressed after this change. However,
> it turns out
>
> it doesn't work as the message described. The remote mounts are still
> suppressed. And here is
>
> my patch for this problem:
>
> 1 From 72be959fc9f49420b07b4df5c5017821232cf498 Mon Sep 17 00:00:00 2001
> 2 From: Lidong Zhong <lzhong <at> suse.com>
> 3 Date: Tue, 18 Dec 2018 14:24:13 +0800
> 4 Subject: [PATCH] df: don't suppress remote mounts
> 5 MIME-Version: 1.0
> 6 Content-Type: text/plain; charset=UTF-8
> 7 Content-Transfer-Encoding: 8bit
> 8
> 9 This is the fix for the following commit.
> 10 commit 2e81e62243409c5c574b899f52b08c000e4d99fd
> 11 Author: Pádraig Brady <P <at> draigBrady.com>
> 12 Date: Wed Oct 29 02:49:17 2014 +0000
> 13
> 14 df: only suppress remote mounts of separate exports with --total
> 15
> 16 It doesn't work as the commit message described. The remote mounts
> 17 are also suppressed after this change.
> 18 ---
> 19 src/df.c | 2 +-
> 20 1 file changed, 1 insertion(+), 1 deletion(-)
> 21
> 22 diff --git a/src/df.c b/src/df.c
> 23 index 55532219f..0246e3df9 100644
> 24 --- a/src/df.c
> 25 +++ b/src/df.c
> 26 @@ -722,7 +722,7 @@ filter_mount_list (bool devices_only)
> 27 < strlen (me->me_mntroot));
> 28 if (! print_grand_total
> 29 && me->me_remote && seen_dev->me->me_remote
> 30 - && ! STREQ (seen_dev->me->me_devname,
> me->me_devname))
> 31 + && STREQ (seen_dev->me->me_devname, me->me_devname))
> 32 {
> 33 /* Don't discard remote entries with different
> locations,
> 34 as these are more likely to be explicitly
> mounted.
>
> Please share your opinion.
The intent of the patch was not to suppress _separate_ exports on the server.
I.E. nas.example.com:/Photos and nas.example.com:/Download would not
be suppressed (even if they have the same device id).
If you want all nfs mounts you could `df -a -t nfs`
cheers,
Pádraig
This bug report was last modified 6 years and 124 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.