[pve-devel] [PATCH storage 2/3] esxi: fix return value of volume_size_info for vmx volumes
Fiona Ebner
f.ebner at proxmox.com
Tue Dec 10 12:56:58 CET 2024
Am 10.12.24 um 12:19 schrieb Fabian Grünbichler:
> in case of an array context, it should also return the format, else a caller
> might assume it failed.
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
> src/PVE/Storage/ESXiPlugin.pm | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
> index 37f9e75..609f3f9 100644
> --- a/src/PVE/Storage/ESXiPlugin.pm
> +++ b/src/PVE/Storage/ESXiPlugin.pm
> @@ -535,7 +535,9 @@ sub volume_resize {
> sub volume_size_info {
> my ($class, $scfg, $storeid, $volname, $timeout) = @_;
>
> - return 0 if $volname =~ /\.vmx$/;
> + if ($volname =~ /\.vmx$/) {
> + return wantarray ? ('vmx', 0) : 0 ;
The order is wrong. It is ($size, $format, $used, $parent, $ctime)
> + }
>
> my $filename = $class->path($scfg, $volname, $storeid, undef);
> return PVE::Storage::Plugin::file_size_info($filename, $timeout, 'auto-detect');
More information about the pve-devel
mailing list