Add WalkConfiguration::skip_mountpoints()#88
Merged
jeckersb merged 1 commit intocoreos:mainfrom Mar 5, 2026
Merged
Conversation
When walking with noxdev(), mountpoint directories are still visited (passed to the callback) even though they are not traversed. This means callers need to check every directory to determine if it's a mountpoint before acting on it, which largely defeats the purpose of noxdev(). Add a new skip_mountpoints() option that skips mountpoint directories entirely -- they are neither visited nor traversed. This uses the existing statx-based MOUNT_ROOT detection and is Linux-only. The two options are independent: noxdev() controls traversal across devices, while skip_mountpoints() controls whether mountpoints are visited at all. Closes coreos#87 Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: John Eckersberg <jeckersb@redhat.com>
64ecbc5 to
5cf8a53
Compare
Collaborator
Author
|
Marking as draft until I wire this in to bootc-dev/bootc#2045 to sanity check it fixes things over there |
cgwalters
approved these changes
Mar 5, 2026
|
|
||
| #[test] | ||
| #[cfg(any(target_os = "android", target_os = "linux"))] | ||
| fn test_walk_skip_mountpoints() -> Result<()> { |
Member
There was a problem hiding this comment.
Fine as is however one option is for us to add an integration suite; with containers we can control the mounts isntead of just hoping for the best with what we find in /.
Collaborator
Author
Just finished, things are looking good over there 👍 |
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.
When walking with noxdev(), mountpoint directories are still visited
(passed to the callback) even though they are not traversed. This
means callers need to check every directory to determine if it's a
mountpoint before acting on it, which largely defeats the purpose of
noxdev().
Add a new skip_mountpoints() option that skips mountpoint directories
entirely -- they are neither visited nor traversed. This uses the
existing statx-based MOUNT_ROOT detection and is Linux-only.
The two options are independent: noxdev() controls traversal across
devices, while skip_mountpoints() controls whether mountpoints are
visited at all.
Closes #87
Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: John Eckersberg jeckersb@redhat.com