Blame SOURCES/virt-manager-virtinstall-Fix-the-allocating-disk-size-printed-by-the-progress-bar.patch

588c1d
From f68b3667591ab5f9edb9a40f9a7c0c798c923bc4 Mon Sep 17 00:00:00 2001
588c1d
From: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
588c1d
Date: Wed, 9 Nov 2022 18:33:56 +0900
588c1d
Subject: [PATCH] virtinstall: Fix the allocating disk size printed by the
588c1d
 progress bar
588c1d
588c1d
When a sparse file is created during a disk allocation,
588c1d
virt-install prints not the created disk size but a sparse file size.
588c1d
588c1d
Therefore, we fix to print the created disk size during disk allocation
588c1d
instead of the size of the sparse file by updating the meter with the
588c1d
self.capacity.
588c1d
588c1d
Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
588c1d
Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com>
588c1d
(cherry picked from commit 39c7a443146433766e4e71e48ab59145c74924b3)
588c1d
588c1d
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2156247
588c1d
588c1d
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
588c1d
---
588c1d
 virtinst/storage.py | 1 +
588c1d
 1 file changed, 1 insertion(+)
588c1d
588c1d
diff --git a/virtinst/storage.py b/virtinst/storage.py
588c1d
index 509f5cb06..617b05e0d 100644
588c1d
--- a/virtinst/storage.py
588c1d
+++ b/virtinst/storage.py
588c1d
@@ -697,6 +697,7 @@ class StorageVolume(_StorageObject):
588c1d
                 log.debug("Using vol create flags=%s", createflags)
588c1d
                 vol = self.pool.createXML(xml, createflags)
588c1d
 
588c1d
+            meter.update(self.capacity)
588c1d
             meter.end()
588c1d
             log.debug("Storage volume '%s' install complete.", self.name)
588c1d
             return vol
588c1d
-- 
588c1d
2.39.0
588c1d