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

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