From 12db6e5068251b763625bdd3507e620150f040ca Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Mon, 26 Jul 2021 15:18:11 +0200 Subject: [PATCH] vmm: Allow restoring virtio-fs with no cache region It's totally acceptable to snapshot and restore a virtio-fs device that has no cache region, since this is a valid mode of functioning for virtio-fs itself. Signed-off-by: Sebastien Boeuf --- vmm/src/device_manager.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index 38a505e22..089daced1 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -383,8 +383,8 @@ pub enum DeviceManagerError { /// Expected resources for virtio-pci could not be found. MissingVirtioPciResources, - /// Expected resources for virtio-fs could not be found. - MissingVirtioFsResources, + /// Expected resources for virtio-pmem could not be found. + MissingVirtioPmemResources, /// Missing PCI b/d/f from the DeviceNode. MissingDeviceNodePciBdf, @@ -2173,10 +2173,6 @@ impl DeviceManager { } } - if cache_range.is_none() { - return Err(DeviceManagerError::MissingVirtioFsResources); - } - cache_range } else { None @@ -2334,7 +2330,7 @@ impl DeviceManager { } if region_range.is_none() { - return Err(DeviceManagerError::MissingVirtioFsResources); + return Err(DeviceManagerError::MissingVirtioPmemResources); } region_range