Merge ~paelzer/ubuntu/+source/virt-manager:lp-1847105-fix-slow-alloc-FOCAL into ubuntu/+source/virt-manager:ubuntu/focal-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: f6eb483e31c43fe3a8ea2dee8e7555b33ad797b6
Merged at revision: f6eb483e31c43fe3a8ea2dee8e7555b33ad797b6
Proposed branch: ~paelzer/ubuntu/+source/virt-manager:lp-1847105-fix-slow-alloc-FOCAL
Merge into: ubuntu/+source/virt-manager:ubuntu/focal-devel
Diff against target: 85 lines (+63/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch (+55/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Robie Basak sru Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+391188@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Robie Basak (racb) :
review: Approve (sru)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/virt-manager
 * [new tag] upload/1%2.2.1-3ubuntu2.1 -> upload/1%2.2.1-3ubuntu2.1

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading virt-manager_2.2.1-3ubuntu2.1.dsc: done.
  Uploading virt-manager_2.2.1-3ubuntu2.1.debian.tar.xz: done.
  Uploading virt-manager_2.2.1-3ubuntu2.1_source.buildinfo: done.
  Uploading virt-manager_2.2.1-3ubuntu2.1_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index ac7ac09..7c7e88c 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+virt-manager (1:2.2.1-3ubuntu2.1) focal; urgency=medium
7+
8+ * d/p/lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch:
9+ fix slow disk allocation when using the defaults to to falloc (LP: #1847105)
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 23 Sep 2020 07:19:04 +0200
12+
13 virt-manager (1:2.2.1-3ubuntu2) focal; urgency=medium
14
15 * Fix legacy-images path for focal. LP: #1872941
16diff --git a/debian/patches/lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch b/debian/patches/lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch
17new file mode 100644
18index 0000000..6e0a85b
19--- /dev/null
20+++ b/debian/patches/lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch
21@@ -0,0 +1,55 @@
22+From ba08f84b3408744e9aa9763d100e8aa217c1f5ff Mon Sep 17 00:00:00 2001
23+From: Cole Robinson <crobinso@redhat.com>
24+Date: Sat, 19 Sep 2020 18:06:45 -0400
25+Subject: [PATCH] addstorage: Return to using qcow2 sparse by default
26+
27+https://bugzilla.redhat.com/show_bug.cgi?id=1759454
28+
29+See 15a6a7e2105440df528f75c4df4d2471df28bd1e
30+
31+The idea behind virt-manager's sparse vs nonsparse default, is that if
32+the user selected 'raw' for as the default image format, assume they
33+want to maximize performance, so fully allocate the disk.
34+
35+qcow2 didn't support anything except sparse, so the sparse=True vs
36+sparse=False made no difference. So we always set sparse=False
37+
38+Then qcow2 grows non-sparse support, and virt-manager is suddenly
39+defaulting to it, which is not the intention.
40+
41+Default to sparse when requested format isn't raw
42+
43+Signed-off-by: Cole Robinson <crobinso@redhat.com>
44+
45+Backport-Note: upstream also changed some tests not existing in groovy
46+Origin: upstream, https://github.com/virt-manager/virt-manager/commit/ba08f84b34
47+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1847105
48+Last-Update: 2020-09-21
49+
50+---
51+ virtManager/device/addstorage.py | 8 ++++++--
52+ 3 files changed, 11 insertions(+), 11 deletions(-)
53+
54+--- a/virtManager/device/addstorage.py
55++++ b/virtManager/device/addstorage.py
56+@@ -176,14 +176,18 @@ class vmmAddStorage(vmmGObjectUI):
57+ if disk.wants_storage_creation():
58+ pool = disk.get_parent_pool()
59+ size = uiutil.spin_get_helper(self.widget("storage-size"))
60+- sparse = False
61++ fmt = self.conn.get_default_storage_format()
62++
63++ # If the user changed the default disk format to raw, assume
64++ # they want to maximize performance, so fully allocate the
65++ # disk image. Otherwise use sparse
66++ sparse = fmt != 'raw'
67+
68+ vol_install = virtinst.DeviceDisk.build_vol_install(
69+ disk.conn, os.path.basename(disk.path), pool,
70+ size, sparse)
71+ disk.set_vol_install(vol_install)
72+
73+- fmt = self.conn.get_default_storage_format()
74+ if disk.get_vol_install().supports_format():
75+ log.debug("Using default prefs format=%s for path=%s",
76+ fmt, disk.path)
77diff --git a/debian/patches/series b/debian/patches/series
78index 06e24c9..9bb79e9 100644
79--- a/debian/patches/series
80+++ b/debian/patches/series
81@@ -1,3 +1,4 @@
82 Use-usr-bin-python.patch
83 mark-libvirt-lxc.patch
84 legacy-images.patch
85+lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch

Subscribers

People subscribed via source and target branches