Large logical size (Docker.raw) causes misleading disk usage — consider using allocated size #23
StudentWeis
started this conversation in
Ideas
Replies: 1 comment
-
@emilevr I don't know if I got that right. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Env:
What Happen:

A file at ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw appears in the report as "1.0 TB". This large logical size causes sorting and summary results to be misleading.
Root cause:
The code currently uses metadata.len() / logical size semantics (or equivalent). For sparse or VM image files, this reports the file’s logical size rather than actual allocated blocks.
Suggested fix:
On Unix/macOS, use allocated blocks for disk usage: metadata.blocks() * 512 (std::os::unix::fs::MetadataExt) to compute actual allocated bytes.
Expose a CLI option to choose between "logical size" and "allocated size", or document the current behavior and add a blacklist for known VM image paths (e.g. com.docker.docker).
My attempts:

Beta Was this translation helpful? Give feedback.
All reactions