block: vhd: impl Resizable for FixedVhdDiskSync

Fixed VHD does not support resize, return UnsupportedFeature.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-03-24 14:01:34 +01:00
committed by Bo Chen
parent 74b0613c04
commit 60af47c99b

View File

@@ -80,6 +80,16 @@ impl disk_file::Geometry for FixedVhdDiskSync {}
impl disk_file::SparseCapable for FixedVhdDiskSync {}
impl disk_file::Resizable for FixedVhdDiskSync {
fn resize(&mut self, _size: u64) -> BlockResult<()> {
Err(BlockError::new(
BlockErrorKind::UnsupportedFeature,
DiskFileError::ResizeError(std::io::Error::other("resize not supported for fixed VHD")),
)
.with_op(ErrorOp::Resize))
}
}
pub struct FixedVhdSync {
raw_file_sync: RawFileSync,
size: u64,