From 60af47c99ba877e8725e632f98a91647e228c11f Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 24 Mar 2026 14:01:34 +0100 Subject: [PATCH] block: vhd: impl Resizable for FixedVhdDiskSync Fixed VHD does not support resize, return UnsupportedFeature. Signed-off-by: Anatol Belski --- block/src/fixed_vhd_sync.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/block/src/fixed_vhd_sync.rs b/block/src/fixed_vhd_sync.rs index c66a945cb..10836853a 100644 --- a/block/src/fixed_vhd_sync.rs +++ b/block/src/fixed_vhd_sync.rs @@ -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,