From df5d2d64b228c9a52a23713e10968d86463b3bf8 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 24 Mar 2026 17:10:08 +0100 Subject: [PATCH] block: vhd: impl Resizable for FixedVhdDiskAsync Fixed VHD does not support resize, return UnsupportedFeature. Signed-off-by: Anatol Belski --- block/src/fixed_vhd_async.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/block/src/fixed_vhd_async.rs b/block/src/fixed_vhd_async.rs index bba4f07de..c265636c8 100644 --- a/block/src/fixed_vhd_async.rs +++ b/block/src/fixed_vhd_async.rs @@ -78,6 +78,16 @@ impl disk_file::Geometry for FixedVhdDiskAsync {} impl disk_file::SparseCapable for FixedVhdDiskAsync {} +impl disk_file::Resizable for FixedVhdDiskAsync { + 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 FixedVhdAsync { raw_file_async: RawFileAsync, size: u64,