Skip to content
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

Filesystem Boundaries #1

Open
dsully opened this issue Mar 24, 2020 · 3 comments
Open

Filesystem Boundaries #1

dsully opened this issue Mar 24, 2020 · 3 comments

Comments

@dsully
Copy link

dsully commented Mar 24, 2020

Other tools (such as dust) work across filesystem boundaries. Is there a reason dirstat-rs specifically does not?

I see in lib.rs:

if volume_id != root_dev {
    return Err("Filesystem boundary crossed".into());
}

Commenting out those lines makes ds work as I would expect.

Thanks

@Mart-Bogdan
Copy link
Contributor

Lunux's du also don't cross boundaries. IDK what is the reasoning.

One of possible reasons -- to not fail to endless recursion from symlinks. Perhaps other reasons exist as well.

@Mart-Bogdan
Copy link
Contributor

P.S. when I used du last time it crossed boundaries, but I definitely noticed code related to fs detection side du sources. But I am not 100% sure how du works, and lack experience with Linux/unix.

@Mart-Bogdan
Copy link
Contributor

I tested on Linux. du -x won't cross boundaries.

So I suggest dirstat-rs should also have -x option, and skip other file systems only with that option.

If we want to be as consistent with du. If we want to preserve backward compatibility with dirstat-rs -- could go in opposite direction and us -X to allow passing boundaries.

I would prefer to make it compatible with du.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants