Skip to content

std::io::UnstableFileStat doesn't report the correct number of blocks for files on Linux #10871

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

Closed
derekchiang opened this issue Dec 9, 2013 · 5 comments

Comments

@derekchiang
Copy link
Contributor

Platform: 64-bit Ubuntu 13.10

Symptom: the blocks field of UnstableFileStat of any file is always 8, regardless of the actual file size.

@alexcrichton
Copy link
Member

Can you confirm that using the raw stat in C shows the number of blocks changing?

@derekchiang
Copy link
Contributor Author

@alexcrichton sorry I'm not very familiar with Rust's codebase. How do I confirm this?

@alexcrichton
Copy link
Member

Oh I'm just curious what stat from C reports. If the C stat and the rust stat report the same thing, then there's probably no problem here. If they report different things, then there's something that we need to look into.

@derekchiang
Copy link
Contributor Author

@alexcrichton Yeah C reports the same thing. There is nothing wrong with Rust; I made a mistake :)

@alexcrichton
Copy link
Member

Thanks for looking into this!

flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 2, 2023
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