From ffdc8c49d19911fa471964de36dd2fb055682320 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 25 Mar 2026 16:42:26 +0100 Subject: [PATCH] block: vhdx: impl Resizable for VhdxDiskSync Returns UnsupportedFeature, VHDX resize is not supported. Signed-off-by: Anatol Belski --- block/src/vhdx_sync.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/block/src/vhdx_sync.rs b/block/src/vhdx_sync.rs index c3b04c9d1..3eb8a91be 100644 --- a/block/src/vhdx_sync.rs +++ b/block/src/vhdx_sync.rs @@ -70,6 +70,16 @@ impl disk_file::Geometry for VhdxDiskSync {} impl disk_file::SparseCapable for VhdxDiskSync {} +impl disk_file::Resizable for VhdxDiskSync { + fn resize(&mut self, _size: u64) -> BlockResult<()> { + Err(BlockError::new( + BlockErrorKind::UnsupportedFeature, + DiskFileError::ResizeError(std::io::Error::other("resize not supported for VHDX")), + ) + .with_op(ErrorOp::Resize)) + } +} + impl DiskFile for VhdxDiskSync { fn logical_size(&mut self) -> DiskFileResult { Ok(self.vhdx_file.lock().unwrap().virtual_disk_size())