From unknown Tue Jun 17 22:20:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33785: df: don't suppress remote mounts Resent-From: lzhong Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 18 Dec 2018 07:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33785 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 33785@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.154511652014974 (code B ref -1); Tue, 18 Dec 2018 07:02:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Dec 2018 07:02:00 +0000 Received: from localhost ([127.0.0.1]:52522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZ9OB-0003tS-K5 for submit@debbugs.gnu.org; Tue, 18 Dec 2018 02:02:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZ95T-0003O2-CG for submit@debbugs.gnu.org; Tue, 18 Dec 2018 01:42:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZ95N-00054s-6G for submit@debbugs.gnu.org; Tue, 18 Dec 2018 01:42:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49165) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gZ95N-00054j-1r for submit@debbugs.gnu.org; Tue, 18 Dec 2018 01:42:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZ95L-0003rp-Tn for bug-coreutils@gnu.org; Tue, 18 Dec 2018 01:42:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZ95G-0004zg-U3 for bug-coreutils@gnu.org; Tue, 18 Dec 2018 01:42:31 -0500 Received: from smtp2.provo.novell.com ([137.65.250.81]:51715) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gZ95G-0004wq-Jj for bug-coreutils@gnu.org; Tue, 18 Dec 2018 01:42:26 -0500 Received: from l3-laptop.suse (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (TLS encrypted); Mon, 17 Dec 2018 23:42:12 -0700 From: lzhong Message-ID: Date: Tue, 18 Dec 2018 14:42:06 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Tue, 18 Dec 2018 02:01:57 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi list, According to the following commit commit 2e81e62243409c5c574b899f52b08c000e4d99fd Author: Pádraig Brady 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   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 +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. Regards, Lidong From unknown Tue Jun 17 22:20:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33785: df: don't suppress remote mounts Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 19 Dec 2018 17:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33785 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 33785@debbugs.gnu.org Received: via spool by 33785-submit@debbugs.gnu.org id=B33785.154523910822486 (code B ref 33785); Wed, 19 Dec 2018 17:06:01 +0000 Received: (at 33785) by debbugs.gnu.org; 19 Dec 2018 17:05:08 +0000 Received: from localhost ([127.0.0.1]:55037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZfHP-0005qc-Pi for submit@debbugs.gnu.org; Wed, 19 Dec 2018 12:05:08 -0500 Received: from mail.magicbluesmoke.com ([82.195.144.49]:34836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZfHO-0005qR-8B for 33785@debbugs.gnu.org; Wed, 19 Dec 2018 12:05:06 -0500 Received: from localhost.localdomain (unknown [109.76.149.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id E4B469962 for <33785@debbugs.gnu.org>; Wed, 19 Dec 2018 17:05:04 +0000 (GMT) References: From: =?UTF-8?Q?P=C3=A1draig?= Brady Message-ID: <61fe8ece-04d0-31cd-048c-af5105acfbb5@draigBrady.com> Date: Wed, 19 Dec 2018 09:05:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 +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 > 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 +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 From unknown Tue Jun 17 22:20:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33785: df: don't suppress remote mounts Resent-From: Assaf Gordon Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 18 Jan 2019 06:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33785 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?P=C3=A1draig?= Brady , 33785@debbugs.gnu.org Received: via spool by 33785-submit@debbugs.gnu.org id=B33785.154779147020291 (code B ref 33785); Fri, 18 Jan 2019 06:05:02 +0000 Received: (at 33785) by debbugs.gnu.org; 18 Jan 2019 06:04:30 +0000 Received: from localhost ([127.0.0.1]:35529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkNGY-0005H8-5p for submit@debbugs.gnu.org; Fri, 18 Jan 2019 01:04:30 -0500 Received: from mail-pl1-f178.google.com ([209.85.214.178]:43676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkNGV-0005Gm-Mc; Fri, 18 Jan 2019 01:04:28 -0500 Received: by mail-pl1-f178.google.com with SMTP id gn14so5856403plb.10; Thu, 17 Jan 2019 22:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=AVHEhvLAbWyL8+x91Uhh/2EUbHG3SKm286cg6+9aGT0=; b=YuKkhwuJwy0k/zGTfyacLtKgdsjabYbMypknkWEMFWi06lMOl1eFM6s0yNiIn05oLH JYOQ2/DZtXxiVSc9KAMOBUQs8MYJOqK74PkiML3MxLR4koqW8kkDYMu2Ys1lFbe/MNBD bpHiEuw3yYfESZx0Ov3Q4WHJg/GDaakNs0kEHajwXcRScVsN20ljHEsXc8qpayIInRwy YBhV3lc7Mph1quvuvqxNuIgAD98ynrpGluWG6wiG3U3xP26Zz/knwbLfHG357iLDR8I0 wtuo2/QTQDY5J9HsUwb/gbAvlRKJ23Ng9TRkg2YTWpm5XOwYsS/qSlG52p8+hC5mtw1H 6q2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AVHEhvLAbWyL8+x91Uhh/2EUbHG3SKm286cg6+9aGT0=; b=gzxLHdcGMvoHzhqCk3h4rD4/FNAc1E6EYNOJclOb5c901xPdYW67Q/fUScRAUj+mCB 4f0KaWvrszRFJHIwQB2W+90DO2+CBzNHjiOQuuJ9BrJQMIXmQQ5z/6AP2p3lwACT8uZc 4sHy9ba2G0FMzf/w0VgzKnV8WwuoYqFi81ia/ejw97P34WQHuDJuwfJZWQoDzWpwXFbP xCaUDcDlUgLFsOUDy0qWEoN6qY0/W1oLJ/bCu4l7C0g1sh6nt76EIScGKv4p9j36jkMk BJJGcn+0g8jzqMhyzVMooGm4VZ+6GjhUpr3NNYrdl4FFCcmlF8qTUDyMl5a6fLgZg5nV OlJA== X-Gm-Message-State: AJcUukckK5rpeT+M52kSJnxwBPMzY39Y+k+qyFWvCECzGLY8lmij7zHK lgJtodMYnDUDLMqLL4F8SmHR6fXX X-Google-Smtp-Source: ALg8bN4H7a6BwRj/BA98JAAufYy3MfNnSjlXx0sPOjO7WI9DfpQnelvYs64pvvhGT41zf0Fuu3REeA== X-Received: by 2002:a17:902:bd0b:: with SMTP id p11mr18031798pls.259.1547791461331; Thu, 17 Jan 2019 22:04:21 -0800 (PST) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id 184sm4823337pfe.106.2019.01.17.22.04.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 22:04:19 -0800 (PST) References: <61fe8ece-04d0-31cd-048c-af5105acfbb5@draigBrady.com> From: Assaf Gordon Message-ID: Date: Thu, 17 Jan 2019 23:04:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <61fe8ece-04d0-31cd-048c-af5105acfbb5@draigBrady.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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