[pve-devel] [PATCH qemu-server] Set zero $size and continue if volume_resize() returns false

Dmitry Petuhov mityapetuhov at gmail.com
Mon Jan 16 08:45:10 CET 2017


Needed for some storages with backing block devices to do oonlinr resize.

Signed-off-by: Dmitry Petuhov <mityapetuhov at gmail.com>
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index bc26da2..07c0c05 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3980,7 +3980,7 @@ sub qemu_block_resize {
 
     my $running = check_running($vmid);
 
-    return if !PVE::Storage::volume_resize($storecfg, $volid, $size, $running);
+    $size = 0 if !PVE::Storage::volume_resize($storecfg, $volid, $size, $running);
 
     return if !$running;
 
-- 
2.1.4




More information about the pve-devel mailing list