Tries to acquire advisory locks for all disk images. This should only be called when a VM boots or VM state is restored. For live-migration, the locks must be released on the destination side before they are acquired again by the receiving side.
(&self)
| 2595 | /// For live-migration, the locks must be released on the destination side |
| 2596 | /// before they are acquired again by the receiving side. |
| 2597 | pub fn try_lock_disks(&self) -> DeviceManagerResult<()> { |
| 2598 | for dev in &self.block_devices { |
| 2599 | let mut dev = dev.lock().unwrap(); |
| 2600 | dev.try_lock_image() |
| 2601 | .map_err(DeviceManagerError::DiskLockError)?; |
| 2602 | } |
| 2603 | Ok(()) |
| 2604 | } |
| 2605 | |
| 2606 | /// Release all advisory locks held for the disk images. |
| 2607 | /// |
no test coverage detected