From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id A34401FF0E4 for ; Tue, 11 Aug 2026 10:06:04 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 3140021473; Tue, 11 Aug 2026 10:06:04 +0200 (CEST) Message-ID: Date: Tue, 11 Aug 2026 10:05:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH pve-storage v2 1/2] qemu-img: drop unused image resize timeout parameter To: Jakob Klocker , pve-devel@lists.proxmox.com References: <20260804090438.58491-1-j.klocker@proxmox.com> <20260804090438.58491-2-j.klocker@proxmox.com> <0b7288d3-15d7-4024-86e9-0620671f21f5@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1786435545681 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.926 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 43R4VBXXBO5JDESMWELK5SPLLG5AXIXZ X-Message-ID-Hash: 43R4VBXXBO5JDESMWELK5SPLLG5AXIXZ X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Am 11.08.26 um 8:23 AM schrieb Jakob Klocker: > On Thu Aug 6, 2026 at 3:04 PM CEST, Fiona Ebner wrote: >> Am 04.08.26 um 11:04 AM schrieb Jakob Klocker: >>> qemu_img_resize is only ever called with a hardcoded 10 second timeout, >>> so exposing it as a parameter serves no purpose. >> >> The Storage::Common module is a bit special, because we want to allow >> third-party plugins to re-use these methods too. There might already be >> a caller from outside our code-base which does use the parameter, so I'd >> rather keep it. The default value should still be adapted to fix the bug >> of course and our callers can rely on that. >> >> Of course, changing the default would also be an interface change, but I >> would consider it okay. Dropping the parameter is also a bit of a >> timebomb, becuase the next time we add a parameter, an existing caller >> currently passing a value for timeout would suddenly pass a value for >> the newly added parameter. >> > > I didn't know about third-party plugins reusing Storage::Common - thanks > for pointing that out. > > Since I couldn't find this documented anywhere, would it be worth noting > on the storage plugin development wiki page [0] that these helpers may > be reused? > > [0] https://pve.proxmox.com/wiki/Storage_Plugin_Development > Yes, I was also thinking about it. Mentioned the module and its purpose there now: https://pve.proxmox.com/wiki/Storage_Plugin_Development#Common_helper_functions >>> >>> Signed-off-by: Jakob Klocker >>> --- >>> 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) >