On 15/04/2026 09:34, Lukáš Zaoral wrote:
On 14. 4. 2026, at 23:07, Pádraig Brady <[email protected]> wrote:

On 14/04/2026 13:09, Lukáš Zaoral wrote:
Do not compare only with the latest entry for given device id but also
all previously saved entries with the same id.
* src/df.c (struct devlist): Add next_same_dev struct member.
(filter_mount_list): Iterate over next_same_dev to find duplicates.
* tests/df/skip-duplicates.sh: Add test cases.

This does look correct,
though I'm a bit worried about quadratic behaviour
in the case of many mounts sharing the same dev id.

Yes, I’m aware of the complexity but I couldn’t think of a better way.

Was there a distro bug to help base the practical considerations.

Yes, there is a distribution bug [1] but it is not urgent (the link should
be public).  This problem was found during the investigation of other
issues by my colleagues from support.

This ticket sat on the bottom of my backlog for a very long time and I
have no plans to fix it in RHEL at this point but since I’ve already
made a patch, I wanted to send it to upstream.

Regards,
Lukas

[1]: https://redhat.atlassian.net/browse/RHEL-5649

OK I included that reference and pushed.
Let's not over engineer it for the uncommon case.
We can revisit if it becomes an issue.

thanks,
Padraig


Reply via email to