GNU bug report logs - #49298
[PATCH] df: do not print duplicated entires with NFS and bind mounts

Previous Next

Package: coreutils;

Reported by: Kamil Dudka <kdudka <at> redhat.com>

Date: Wed, 30 Jun 2021 15:54:01 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 49298-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Kamil Dudka <kdudka <at> redhat.com>, 49298-done <at> debbugs.gnu.org
Subject: Re: bug#49298: [PATCH] df: do not print duplicated entires with NFS
 and bind mounts
Date: Fri, 2 Jul 2021 16:07:38 +0100
On 30/06/2021 16:53, Kamil Dudka wrote:
> As originally reported in <https://bugzilla.redhat.com/1962515>,
> df invoked without -a printed duplicated entries for NFS mounts
> of bind mounts.  This is a regression from commit v8.25-54-g1c17f61ef99,
> which introduced the use of a hash table.
> 
> The proposed patch makes sure that the devlist entry seen the last time
> is used for comparison when eliminating duplicated mount entries.  This
> way it worked before introducing the hash table.
> 
> Patch co-authored by Roberto Bergantinos.
> 
> * src/ls.c (struct devlist): Introduce the seen_last pointer.
> (devlist_for_dev): Return the devlist entry seen the last time if found.
> (filter_mount_list): Remember the devlist entry seen the last time for
> each hashed item.


Indeed order is significant here as we can have multiple entries for the same dev nums.
The patch looks good and restores the ordering from before commit 1c17f61ef.
I'll will apply this.
Marking as done.

thanks!
Pádraig




This bug report was last modified 3 years and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.