mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-03-20 07:58:55 +00:00
vm-migration: Extend Migratable to notify when migration is complete
Add a way to let every Migratable object know when the migration is complete, so they can take appropriate actions. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
152a3b98c9
commit
f65538b08f
@ -56,6 +56,9 @@ pub enum MigratableError {
|
||||
|
||||
#[error("Failed to retrieve dirty ranges for migratable component: {0}")]
|
||||
DirtyLog(#[source] anyhow::Error),
|
||||
|
||||
#[error("Failed to complete migration for migratable component: {0}")]
|
||||
CompleteMigration(#[source] anyhow::Error),
|
||||
}
|
||||
|
||||
/// A Pausable component can be paused and resumed.
|
||||
@ -301,4 +304,8 @@ pub trait Migratable: Send + Pausable + Snapshottable + Transportable {
|
||||
fn dirty_log(&mut self) -> std::result::Result<MemoryRangeTable, MigratableError> {
|
||||
Ok(MemoryRangeTable::default())
|
||||
}
|
||||
|
||||
fn complete_migration(&mut self) -> std::result::Result<(), MigratableError> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user