MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / release_disk_locks

Method release_disk_locks

vmm/src/device_manager.rs:2612–2619  ·  view source on GitHub ↗

Release all advisory locks held for the disk images. This should only be called when the VM is stopped and the VMM supposed to shut down. A new VMM, either after a live migration or a state save/resume cycle, should then acquire all locks before the VM starts to run.

(&self)

Source from the content-addressed store, hash-verified

2610 /// state save/resume cycle, should then acquire all locks before the VM
2611 /// starts to run.
2612 pub fn release_disk_locks(&self) -> DeviceManagerResult<()> {
2613 for dev in &self.block_devices {
2614 let mut dev = dev.lock().unwrap();
2615 dev.unlock_image()
2616 .map_err(DeviceManagerError::DiskLockError)?;
2617 }
2618 Ok(())
2619 }
2620
2621 fn make_virtio_devices(&mut self) -> DeviceManagerResult<()> {
2622 // Create "standard" virtio devices (net/block/rng)

Callers

nothing calls this directly

Calls 1

unlock_imageMethod · 0.80

Tested by

no test coverage detected