From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 6CF5B1FF16E for ; Mon, 3 Feb 2025 15:40:18 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1460031FE; Mon, 3 Feb 2025 15:40:17 +0100 (CET) Message-ID: <060e9962-b4e4-4342-8f20-94930bdc21e9@proxmox.com> Date: Mon, 3 Feb 2025 15:39:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion References: Content-Language: en-US From: Fiona Ebner In-Reply-To: X-SPAM-LEVEL: Spam detection results: 0 AWL -0.047 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH pve-storage] qcow2: resize: add preallocation support X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Am 19.12.24 um 17:18 schrieb Alexandre Derumier via pve-devel: > Seem that we totally forgot to add it, it's available since 2017 > https://www.mail-archive.com/qemu-devel@nongnu.org/msg436979.html Nit: it's better to link to the commit rather than the mailing list for things that are already applied. Missing your Signed-off-by. Hmm, I wanted to suggest to query the image to see what kind of preallocation it was created with and then use that setting to stay consistent. But that information doesn't seem to get recorded (on an image-wide level) AFAICS. It might be surprising that changes to the storage configuration setting will also apply to already existing images and we should document the behavior for resize in the description of the 'preallocation' setting. Seems like the "block_resize" QMP command does not have the setting at all, so if we add it here, the behavior would still be inconsistent in that regard :/ But oh well, could still be added on top later if we can get that feature in upstream. But should also be documented, that it doesn't apply for live resize. > --- > src/PVE/Storage/Plugin.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm > index 6a6a804..d0ce3ae 100644 > --- a/src/PVE/Storage/Plugin.pm > +++ b/src/PVE/Storage/Plugin.pm > @@ -1166,7 +1166,9 @@ sub volume_resize { > > my $format = ($class->parse_volname($volname))[6]; > > - my $cmd = ['/usr/bin/qemu-img', 'resize', '-f', $format, $path , $size]; > + my $prealloc_opt = preallocation_cmd_option($scfg, $format); > + > + my $cmd = ['/usr/bin/qemu-img', 'resize', "--$prealloc_opt", '-f', $format, $path , $size]; > > run_command($cmd, timeout => 10); > > -- > 2.39.5 > > _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel