mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-02 11:35:46 +00:00
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 <sebastien.boeuf@intel.com>
This commit is contained in:
parent
0852287fee
commit
12db6e5068
@ -383,8 +383,8 @@ pub enum DeviceManagerError {
|
|||||||
/// Expected resources for virtio-pci could not be found.
|
/// Expected resources for virtio-pci could not be found.
|
||||||
MissingVirtioPciResources,
|
MissingVirtioPciResources,
|
||||||
|
|
||||||
/// Expected resources for virtio-fs could not be found.
|
/// Expected resources for virtio-pmem could not be found.
|
||||||
MissingVirtioFsResources,
|
MissingVirtioPmemResources,
|
||||||
|
|
||||||
/// Missing PCI b/d/f from the DeviceNode.
|
/// Missing PCI b/d/f from the DeviceNode.
|
||||||
MissingDeviceNodePciBdf,
|
MissingDeviceNodePciBdf,
|
||||||
@ -2173,10 +2173,6 @@ impl DeviceManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if cache_range.is_none() {
|
|
||||||
return Err(DeviceManagerError::MissingVirtioFsResources);
|
|
||||||
}
|
|
||||||
|
|
||||||
cache_range
|
cache_range
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
@ -2334,7 +2330,7 @@ impl DeviceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if region_range.is_none() {
|
if region_range.is_none() {
|
||||||
return Err(DeviceManagerError::MissingVirtioFsResources);
|
return Err(DeviceManagerError::MissingVirtioPmemResources);
|
||||||
}
|
}
|
||||||
|
|
||||||
region_range
|
region_range
|
||||||
|
Loading…
Reference in New Issue
Block a user