-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regions can now be read-only #6150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As usual, I have questions because I don't know how anything works
Up until this point, regions were only ever read-write, and region snapshots were read-only. In order to support snapshot replacement, Crucible recently gained support for read-only downstairs that performs a "clone" operation to copy blocks from another read-only downstairs. This commit adds a "read-only" flag to Region, and adds support for Nexus initializing a downstairs with this new clone option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure I grok this correctly:
- Nothing actually tells Crucible about this flag yet, right?
- The case of
read_only = false
is currently treated identically toread_only = true
, with the only exception being the error thrown inregion_replacement_start.rs
, correct?
Did you expect for this flag to have a meaning before merging, or is this acting as more of a placeholder?
Correct, this PR was carved out of the snapshot replacement work to be reviewed separately.
Yeah - allocation wise there isn't much difference between a read-only region and a read-write region, they both require the same amount of space. The difference is in how they're initialized.
Right now this is only a placeholder - the snapshot replacement PR number 3 are is the one that will make use of it. |
Up until this point, regions were only ever read-write, and region snapshots were read-only. In order to support snapshot replacement, Crucible recently gained support for read-only downstairs that performs a "clone" operation to copy blocks from another read-only downstairs.
This commit adds a "read-only" flag to Region, and adds support for Nexus initializing a downstairs with this new clone option.