mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: qcow_sync: impl Resizable for QcowDiskSync
Add ErrorOp::Resize variant and implement the Resizable trait. Resize is rejected when a backing file is present. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
554562fef2
commit
f35bec19e8
@@ -68,6 +68,8 @@ pub enum ErrorOp {
|
||||
DetectImageType,
|
||||
/// Duplicating a backing-file descriptor.
|
||||
DupBackingFd,
|
||||
/// Resizing a disk image.
|
||||
Resize,
|
||||
}
|
||||
|
||||
impl Display for ErrorOp {
|
||||
@@ -76,6 +78,7 @@ impl Display for ErrorOp {
|
||||
Self::Open => write!(f, "open"),
|
||||
Self::DetectImageType => write!(f, "detect_image_type"),
|
||||
Self::DupBackingFd => write!(f, "dup_backing_fd"),
|
||||
Self::Resize => write!(f, "resize"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user