all lists on 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
  2025-02-03 14:39 ` Fiona Ebner
  0 siblings, 1 reply; 4+ messages 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] 4+ messages in thread

end of thread, other threads:[~2025-02-04  9:21 UTC | newest]

Thread overview: 4+ messages (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
2025-02-03 14:39 ` Fiona Ebner
2025-02-03 16:11   ` DERUMIER, Alexandre via pve-devel
     [not found]   ` <9b0bfadfca34c384ec139a8a08b7edcdb414da7e.camel@groupe-cyllene.com>
2025-02-04  9:21     ` Fiona Ebner

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