Subject: Re: bug#49298: [PATCH] df: do not print duplicated entires with NFS and bind mounts

From: Pádraig Brady <[email-masked]>
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