Skip to main content

parse_dev_mounts

Function parse_dev_mounts 

Source
pub fn parse_dev_mounts(text: &str) -> Vec<String>
Expand description

WRITABLE /dev/-backed mount points from /proc/mounts, deduplicated by source device (bind mounts and btrfs subvolumes re-list one device many times; space is a per-DEVICE fact).

Read-only mounts are excluded, and it matters: snap images are /dev/loop* squashfs mounts that are 100% full BY CONSTRUCTION, so one installed snap would pin the storage item at bright-orange forever. Verified on this host — /dev/loop0 /snap/... ro,... at 100% while the fullest writable filesystem sat at 40%. A read-only filesystem cannot fill up, so its fullness is not a utilization.