-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: df: filter filesystem types after mount point resolution #7452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Could you please add a test to make sure we don't regress? |
@sylvestre I have now added coverage by expanding an existing test, let me know what you think. I assumed that |
GNU testsuite comparison:
|
This may also fix issue #6073 which relates to nested mounts having different filesystem types |
sorry but could you please rebase the patch ? sorry again |
ba03926
to
8f22549
Compare
GNU testsuite comparison:
|
8f22549
to
dab13ed
Compare
GNU testsuite comparison:
|
@sylvestre done |
thanks and sorry for the latency! |
This PR fixes #6194 .
When
df
receives both a-t
type filter and file paths, the mount point for each path must be determined before the filesystem type filter is applied.The cause of this bug was that the filtering was applied at
coreutils/src/uu/df/src/df.rs
Line 387 in e147063
coreutils/src/uu/df/src/df.rs
Line 403 in e147063
This led to mount points being incorrectly determined for paths in some cases. For instance, on MacOS
cargo run df -a -t apfs /dev
would print the mount point at/
. More examples are given in #6194The fix was to re-order filtering and mount point resolution.