#1051136 coreutils: df: respects -l too late with filesystem specified

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
наб
Date:
2023-09-03 11:21:04 UTC
Severity:
normal
#1051136#5
Date:
2023-09-03 11:18:27 UTC
From:
To:
Dear Maintainer,

df -l /mnt/nfs will hang (presumably in statvfs()) when the NFS mount
is hung. I say presumably because I originally encountered this in
voreutils df, which I fixed by doing stat() on the path to figure
out what mount entry the user wants, filtering,
and /only then/ doing statvfs:
https://git.sr.ht/~nabijaczleweli/voreutils/commit/2f45313638e65be5911772f1e651a8bf16fbbf39

I'm assuming coreutils df does something similar to my old code
(stat and statvfs instantly, figure out, filter),
which doesn't work for the purposes of what df -l is supposed to do.

A similarly-easy fix, probably.

Best,
наб