Repository navigation
fix(disk): ignore virtual loop, ram devices, and Waydroid container mounts - #6
Merged
Merged
Conversation
…te changelog and man page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When container engines like Waydroid run, their rootfs and vendor image files are mounted as virtual loop devices (
/dev/loop0,/dev/loop1) formatted as nativeext4. Becauseext4is a standard physical filesystem type and loop devices were not filtered by device prefix,kkfetchdisplayed them as physical disk partitions (Disk2: (/var/lib/waydroid/rootfs),Disk3: (/var/lib/waydroid/rootfs/vendor)).Solution
/dev/loop*and/dev/ram*inget_all_disks_with_usage. This skips virtual loopback mounts (such as Waydroid, mounted ISOs, or snap images) before anystatvfssyscalls are made, preserving sub-2ms latency./var/lib/waydroidtoIGNORED_MOUNT_PREFIXESalongside Docker, Podman/containers, and Flatpak directories.Verification
test_loop_and_waydroid_mounts_filteredinsrc/modules/disk.rs.cargo test: all 286 unit and CLI tests pass.cargo clippy --all-targets -- -D warnings: clean (0 warnings).cargo fmt --check: clean.