bug#33785: df: don't suppress remote mounts
tags 33785 notabug close 33785 stop Hello, On 2018-12-19 10:05 a.m., Pádraig Brady wrote: On 17/12/18 22:42, lzhong wrote: According to the following commit commit 2e81e62243409c5c574b899f52b08c000e4d99fd df: only suppress remote mounts of separate exports with --total [...] 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 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` With no further comments, I'm closing this as "notabug". Discussion can continue by replying to this thread. -assaf
bug#33785: df: don't suppress remote mounts
On 17/12/18 22:42, lzhong wrote: > Hi list, > > According to the following commit > > commit 2e81e62243409c5c574b899f52b08c000e4d99fd > Author: Pádraig Brady > Date: Wed Oct 29 02:49:17 2014 + > > 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 >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 > 12 Date: Wed Oct 29 02:49:17 2014 + > 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)); > 28if (! 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
bug#33785: df: don't suppress remote mounts
Hi list, According to the following commit commit 2e81e62243409c5c574b899f52b08c000e4d99fd Author: Pádraig Brady Date: Wed Oct 29 02:49:17 2014 + 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 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 12 Date: Wed Oct 29 02:49:17 2014 + 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. Regards, Lidong