public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-storage] qcow2: resize: add preallocation support
@ 2024-12-19 16:18 Alexandre Derumier via pve-devel
  0 siblings, 0 replies; only message in thread
From: Alexandre Derumier via pve-devel @ 2024-12-19 16:18 UTC (permalink / raw)
  To: pve-devel; +Cc: Alexandre Derumier

[-- Attachment #1: Type: message/rfc822, Size: 3911 bytes --]

From: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-storage] qcow2: resize: add preallocation support
Date: Thu, 19 Dec 2024 17:18:16 +0100
Message-ID: <20241219161816.952295-1-alexandre.derumier@groupe-cyllene.com>

Seem that we totally forgot to add it, it's available since 2017
https://www.mail-archive.com/qemu-devel@nongnu.org/msg436979.html
---
 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



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-19 16:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-19 16:18 [pve-devel] [PATCH pve-storage] qcow2: resize: add preallocation support Alexandre Derumier via pve-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal