Repository navigation
worktree prune safety round 7: mirrored parent mounts, raw paths, cached namespace views (part of #15298) - #15930
Merged
Merged
Conversation
…hed namespace views (part of #15298) - a mount that shows a parent of the worktree at the host's own path, as a snap service, Flatpak or -v /home:/home does, no longer holds every slot on its own; the other-user entry rule is unchanged - an own process in another mount namespace keeps its raw paths next to the mapped ones, so a same-path bind still matches - the mount mapping is built once per mount namespace - add reports an oversized user.bazelrc as include_too_large
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.
Fixes the post-merge review of #15925.
host.rs): a mount now records whether it shows the host directory at the host's own path. Such a mirror of a parent of the worktree, from a snap service, another user's Flatpak or bwrap, or-v /home:/home, no longer holds every slot on its own, whether/homeis its own partition or a bind of/homefrom the root filesystem. A mirror at or inside the worktree still counts, and so does a writable parent bind at another path, such as-v /home:/data. The "other user can enter" rule is unchanged. A root process can't be read, so a root container that only mirrors/homeand works in a slot is no longer seen.host.rs): an own process in another mount namespace keeps its raw cwd, fd and map paths next to the mapped ones, so a same-path bind still matches when a deeper host mount on the same device wins the mapping.host.rs): the mount mapping, including each mount's canonical host path, is built once per mount namespace and shared by every process in that namespace.addnow reports an oversizeduser.bazelrcwith the codeinclude_too_large, built fromErrorKind::FileTooLarge, and the test checks that code.Regression tests:
a_parent_mount_holds_the_worktree_only_when_writable_and_not_a_mirror(table; replaces the read-only-bind test)a_same_path_bind_counts_when_a_deeper_host_mount_wins_the_mappingprocesses_in_one_mount_namespace_share_one_mappingan_own_process_in_another_mount_namespace_counts_where_its_paths_lead_on_the_host(updated)add_copies_user_bazelrc_only_from_a_bounded_regular_file(updated)mounts_outside_the_own_namespace_map_back_to_host_directories(mirror flag)Docs:
docs/cli/commands/worktree.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hw5ZsSt78ouJoi3QnQ