From 44ff2de5761ed48e251ab6b7e44272ccc804c544 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 6 Dec 2024 17:25:22 +0100 Subject: [PATCH] plugin: volume size info: specify format when querying file info This avoids auto-detection by qemu-img and so the information will be correct with respect to the actual image format on the storage layer. Signed-off-by: Fiona Ebner --- src/PVE/Storage/Plugin.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm index a90aed9..11b0545 100644 --- a/src/PVE/Storage/Plugin.pm +++ b/src/PVE/Storage/Plugin.pm @@ -1122,8 +1122,9 @@ sub update_volume_attribute { sub volume_size_info { my ($class, $scfg, $storeid, $volname, $timeout) = @_; + my $format = ($class->parse_volname($volname))[6]; my $path = $class->filesystem_path($scfg, $volname); - return file_size_info($path, $timeout); + return file_size_info($path, $timeout, $format); }