all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Elias Huhsovitz" <e.huhsovitz@proxmox.com>
To: "Jakob Klocker" <j.klocker@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH pve-storage v2 1/2] qemu-img: drop unused image resize timeout parameter
Date: Wed, 05 Aug 2026 17:20:21 +0200	[thread overview]
Message-ID: <DKH419JQJOMP.3JKD2QO66NUA0@proxmox.com> (raw)
In-Reply-To: <20260804090438.58491-2-j.klocker@proxmox.com>

Good Refactor, no warnings/errors when resizing disk using:

pvesh set /nodes/{node}/qemu/{vmid}/resize --disk scsi0 --size +{num}G

and the GUI option VM->Disk Action->Resize

Therefore consider it:

Reviewed-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
Tested-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>

On Tue Aug 4, 2026 at 11:04 AM CEST, Jakob Klocker wrote:
> qemu_img_resize is only ever called with a hardcoded 10 second timeout,
> so exposing it as a parameter serves no purpose.
>
> Signed-off-by: Jakob Klocker <j.klocker@proxmox.com>
> ---
>  src/PVE/Storage/Common.pm    | 8 ++++----
>  src/PVE/Storage/LVMPlugin.pm | 2 +-
>  src/PVE/Storage/Plugin.pm    | 2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
> index 3932aee..725f623 100644
> --- a/src/PVE/Storage/Common.pm
> +++ b/src/PVE/Storage/Common.pm
> @@ -259,16 +259,16 @@ sub qemu_img_measure {
>  
>  =head3 qemu_img_resize
>  
> -    qemu_img_resize($path, $format, $size, $preallocation, $timeout)
> +    qemu_img_resize($path, $format, $size, $preallocation)
>  
>  Resize a qemu image C<$path> with format C<$format> to a target Kb size C<$size>.
> -Default timeout C<$timeout> is 10s if not specified.
>  C<$preallocation> allows to specify the preallocation option for the resize operation.
> +The operation uses a default timeout of 10s.
>  
>  =cut
>  
>  sub qemu_img_resize {
> -    my ($path, $format, $size, $preallocation, $timeout) = @_;
> +    my ($path, $format, $size, $preallocation) = @_;
>  
>      die "format is missing" if !$format;
>  
> @@ -276,7 +276,7 @@ sub qemu_img_resize {
>      push $cmd->@*, "--preallocation=$preallocation" if $preallocation;
>      push $cmd->@*, '-f', $format, $path, $size;
>  
> -    $timeout = 10 if !$timeout;
> +    my $timeout = 10;
>      run_command($cmd, timeout => $timeout);
>  }
>  
> diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
> index b8646c2..768ff95 100644
> --- a/src/PVE/Storage/LVMPlugin.pm
> +++ b/src/PVE/Storage/LVMPlugin.pm
> @@ -1081,7 +1081,7 @@ sub volume_resize {
>  
>      if (!$running && $format eq 'qcow2') {
>          my $preallocation = PVE::Storage::Plugin::preallocation_cmd_opt($scfg, $format);
> -        PVE::Storage::Common::qemu_img_resize($path, $format, $size, $preallocation, 10);
> +        PVE::Storage::Common::qemu_img_resize($path, $format, $size, $preallocation);
>      }
>  
>      return 1;
> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
> index 4f69f9b..082355d 100644
> --- a/src/PVE/Storage/Plugin.pm
> +++ b/src/PVE/Storage/Plugin.pm
> @@ -1373,7 +1373,7 @@ sub volume_resize {
>      my $format = ($class->parse_volname($volname))[6];
>  
>      my $preallocation = preallocation_cmd_opt($scfg, $format);
> -    PVE::Storage::Common::qemu_img_resize($path, $format, $size, $preallocation, 10);
> +    PVE::Storage::Common::qemu_img_resize($path, $format, $size, $preallocation);
>  
>      return undef;
>  }





  reply	other threads:[~2026-08-05 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04  9:04 [PATCH storage v2 0/2] fix #7598: qemu-img: increase timeout for image resize Jakob Klocker
2026-08-04  9:04 ` [PATCH pve-storage v2 1/2] qemu-img: drop unused image resize timeout parameter Jakob Klocker
2026-08-05 15:20   ` Elias Huhsovitz [this message]
2026-08-04  9:04 ` [PATCH pve-storage v2 2/2] fix #7598: qemu-img: increase timeout for image resizing in worker context Jakob Klocker
2026-08-05 15:30   ` Elias Huhsovitz

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=DKH419JQJOMP.3JKD2QO66NUA0@proxmox.com \
    --to=e.huhsovitz@proxmox.com \
    --cc=j.klocker@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal