From: Fiona Ebner <f.ebner@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
"Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Subject: Re: [pve-devel] [PATCH storage v2 2/3] esxi: fix return value of volume_size_info for vmx volumes
Date: Tue, 10 Dec 2024 13:34:47 +0100 [thread overview]
Message-ID: <bf8d4972-8cc8-4aba-8af7-ba75b405d550@proxmox.com> (raw)
In-Reply-To: <20241210121757.433869-3-f.gruenbichler@proxmox.com>
Am 10.12.24 um 13:17 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@proxmox.com>
> ---
> v2: fix return value ordering, thanks Fiona!
>
> 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..70735f9 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 ? (0, 'vmx') : 0 ;
Style nit: space before semicolon
> + }
>
> my $filename = $class->path($scfg, $volname, $storeid, undef);
> return PVE::Storage::Plugin::file_size_info($filename, $timeout, 'auto-detect');
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2024-12-10 12:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 12:17 [pve-devel] [PATCH storage v2 0/3] file_size_info follow-ups Fabian Grünbichler
2024-12-10 12:17 ` [pve-devel] [PATCH storage v2 1/3] storage: plugin: return 'raw' format when parsing non-image volumes Fabian Grünbichler
2024-12-10 12:17 ` [pve-devel] [PATCH storage v2 2/3] esxi: fix return value of volume_size_info for vmx volumes Fabian Grünbichler
2024-12-10 12:34 ` Fiona Ebner [this message]
2024-12-10 12:17 ` [pve-devel] [PATCH storage v2 3/3] file_size_info: add warning when falling back to raw format Fabian Grünbichler
2024-12-10 12:35 ` [pve-devel] [PATCH storage v2 0/3] file_size_info follow-ups Fiona Ebner
2024-12-10 13:35 ` [pve-devel] applied-series: " Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf8d4972-8cc8-4aba-8af7-ba75b405d550@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.