Our disk usage calculation in opt-dist (
|
pub fn print_free_disk_space() -> anyhow::Result<()> { |
) assumes that distinct disks will not be reported twice. However, currently sysinfo will report docker mounts (overlay fs) in addition to the main disk, leading to buggy double-counting:
$ docker run --rm -it -v `pwd`:/mnt ubuntu:26.04 /mnt/target/debug/check-sysinfo
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
[src/main.rs:3:9] disk = Disk("/dev/root")[FS: "ext4"][Type: Unknown(-1)][removable: no][I/O: DiskUsage { total_written_bytes: 0, written_bytes: 0, total_read_bytes: 0, read_bytes: 0 }] mounted on "/mnt": 225873375232/311227166720 B
[src/main.rs:4:9] humansize::format_size(disk.available_space(), humansize::BINARY) = "210.36 GiB"
[src/main.rs:3:9] disk = Disk("overlay")[FS: "overlay"][Type: Unknown(-1)][removable: no][I/O: DiskUsage { total_written_bytes: 0, written_bytes: 0, total_read_bytes: 0, read_bytes: 0 }] mounted on "/": 225873375232/311227166720 B
[src/main.rs:4:9] humansize::format_size(disk.available_space(), humansize::BINARY) = "210.36 GiB"
I suspect this is also the root cause of why Crater keeps filing up its disks... cc rust-lang/crater#762
Our disk usage calculation in opt-dist (
rust/src/tools/opt-dist/src/utils/mod.rs
Line 18 in 8a3308e
I suspect this is also the root cause of why Crater keeps filing up its disks... cc rust-lang/crater#762