Open klaernie opened 8 years ago
I created a branch to attempt to fix this issue (fix-blocking-stat-call
).
Note that the issue described here is linux specific since on the BSDs, the MNT_NOWAIT
flag is used which prevents calls from blocking.
This 55dec576c6c24e9075eb8d24b6161a5555194be3 fixes the issue for remote file systems. Apart from remote fs, do you see any fs for which this would be a problem?
Technically this can happen for every filesystem - the underlying layer must just be broken enough. But dfc already behaves correctly, and was just taking a long time.
My biggest thought was about the point, that dfc checks every mount on the system, instead of only the ones it was asked for. With coreutils df it's a bit different - it will only check filesystems that you asked for. So if I run dfc against a single filesystem it should only statfs() this filesystem, and ignore the others.
dfc blindly
statfs()
es every filesystem it find, not just the ones asked about.This leads to blocking when some automounted filesystems cannot be mounted, but the problematic filesystem is excluded either by type or
-l
.In comparison coreutils df only
statfs()
es the filesystems it will actually print.in comparison to