forked from cloud-hypervisor/cloud-hypervisor
-
Notifications
You must be signed in to change notification settings - Fork 4
virtio-blk: blockdev-mirroring for live storage migration #175
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
Draft
Coffeeri
wants to merge
34
commits into
cyberus-technology:gardenlinux
Choose a base branch
from
Coffeeri:blockdev-mirror-cyberus-synchronous-completions
base: gardenlinux
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
8ebd3ee
block: add mirror module skeleton
Coffeeri 884a612
block: add MirroringAsyncIo skeleton
Coffeeri 77015a8
block: add range lock primitive for mirror
Coffeeri 7d4594d
block: add CompletionWaiter for single-fd waits
Coffeeri 8fbc26c
block: mirror mutating I/O to destination
Coffeeri 10525d3
block: add background copy worker for mirror
Coffeeri dac280a
virtio-devices: swap disk_image via queue commands
Coffeeri 203ecaf
virtio-devices: pre-allocate per-queue command slots
Coffeeri fb381b2
block: add BlockMirrorHandle
Coffeeri 2dfb9a6
block: add MirroringAsyncIo::create
Coffeeri f437d60
virtio-devices: add Block::start_mirror
Coffeeri 46a1d49
virtio-devices, block: add mirror status helper
Coffeeri 7c0d721
vmm: add device manager block mirror start and status
Coffeeri 20fe1a5
vmm: add vm.disk-mirror-start REST endpoint
Coffeeri f4e4b95
vmm: add vm.disk-mirror-status REST endpoint
Coffeeri b7f3393
block: implement MirroringAsyncIo::submit_batch_requests
Coffeeri 68ba2d9
block: add AsyncIo::has_inflight_requests
Coffeeri a644e48
virtio-devices: drain mirror wrapper before disk_image swap
Coffeeri 3639383
virtio-devices, block: add Block::complete_mirror
Coffeeri 3bfd8eb
vmm: add vm.disk-mirror-complete REST endpoint
Coffeeri dd6699a
virtio-devices, block: add Block::cancel_mirror
Coffeeri 11ff106
vmm: deny conflicting ops while a disk mirror runs
Coffeeri 966500a
vmm: add vm.disk-mirror-cancel REST endpoint
Coffeeri bc1da3d
block: preserve sparseness in CopyWorker
Coffeeri 1999e8f
block: add mirror unit tests
Coffeeri c5af8f6
block: test range guard held across mirror write
Coffeeri 7f5d22f
virtio-devices, block: reject mirror ops on a paused device
Coffeeri 929650e
vmm: reject mirror destination already backing a disk
Coffeeri b1e3252
vmm: seccomp: allow io_uring and eventfd2 on vcpus
Coffeeri 0f97c7c
block: test batched submit on partial failure
Coffeeri 4659f3f
block: test mirror phase transitions and op fan-out
Coffeeri c41132d
docs: add disk mirroring guide
Coffeeri 7bba622
vmm: add configurable mirror destination mode
Coffeeri 3a4a6e4
vmm: dedup block device lookup in DeviceManager
Coffeeri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
I'm still reviewing, but had some questions:
Writes are mirrored through
MirroringAsyncIo, so we could track what areas where already written by the mirroring and omit/skip those in the copy worker. This would allow us to avoid coordination through theRangeLockManager. Would that be possible?Why does snapshotting conflict with storage migration?
Do you have some benchmarks, tests or something else that supports this? I have no clue whether this is reasonable or not.
File unrelated, just so the discussion can be resolved.
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.
Thank you for taking the time to look at the PR!
AsyncIObackend. Maybe we can add support for this in the future. I tried to keep the logic/ state "simple" here.