plan9: allow distinct Plan9 share configurations for the same host path - #2939
Open
Harsh Rawat (rawahars) wants to merge 1 commit into
Open
Harsh Rawat (rawahars) wants to merge 1 commit into
Harsh Rawat (rawahars) wants to merge 1 commit into
Conversation
Earlier, Plan9 shares were deduplicated solely by host path, and each share tracked only one guest mount configuration. Reusing a host path with different read-only or file-access settings therefore caused container creation to fail with a configuration mismatch. Allow a host path to own multiple configured shares while continuing to reuse equivalent shares. Within each share, reuse and reference-count matching guest mounts while creating independent mounts for different configurations. Track the exact share and mount selected by each reservation so mapping, cleanup, and retries operate on the correct resources. Use distinct ro/rw guest paths and preserve the filename when mapping a single host file. Identical configurations retain the existing reuse behavior, while releasing one configuration does not affect other active mappings. Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
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.
Summary
Earlier, Plan9 shares were deduplicated solely by host path, and each share tracked only one guest mount configuration. Reusing a host path with different read-only or file-access settings therefore caused container creation to fail with a configuration mismatch.
Allow a host path to own multiple configured shares while continuing to reuse equivalent shares. Within each share, reuse and reference-count matching guest mounts while creating independent mounts for different configurations.
Track the exact share and mount selected by each reservation so mapping, cleanup, and retries operate on the correct resources. Use distinct ro/rw guest paths and preserve the filename when mapping a single host file.
Identical configurations retain the existing reuse behavior, while releasing one configuration does not affect other active mappings.
Previous Failure and New Behavior
Before
Two containers in the same LCOW UVM could not mount the same host path with different configurations:
C:\shared→/data(rw)C:\shared→/data(ro)The second request failed with:
Now
The same host path can have multiple configured shares:
roandrw, use separate shares.Testing