bac3f6bcbd
virt-manager virtinst-vol-default-nocow.patch - bsc#960724 - virt-manager fails to create Virtual machines on a CentOS7 host virtinst-set-qemu-emulator.patch - Upstream bug fix 89c3638b-fix-detection-that-libvirtd-is-stopped.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=290
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
Reference: fate#315125:
|
|
Set NOCOW flag to newly created volume by default, to solve performance
|
|
issue on btrfs.
|
|
|
|
Signed-off-by: Chunyan Liu <cyliu@suse.com>
|
|
|
|
Index: virt-manager-1.3.2/virtinst/storage.py
|
|
===================================================================
|
|
--- virt-manager-1.3.2.orig/virtinst/storage.py
|
|
+++ virt-manager-1.3.2/virtinst/storage.py
|
|
@@ -716,6 +716,12 @@ class StorageVolume(_StorageObject):
|
|
lazy_refcounts = XMLProperty("./target/features/lazy_refcounts",
|
|
is_bool=True, default_cb=_lazy_refcounts_default_cb)
|
|
|
|
+ def _nocow_default_cb(self):
|
|
+ return self.conn.check_support(
|
|
+ self.conn.SUPPORT_CONN_NOCOW)
|
|
+ nocow = XMLProperty("./target/nocow",
|
|
+ is_bool=True, default_cb=_nocow_default_cb)
|
|
+
|
|
|
|
######################
|
|
# Public API helpers #
|
|
Index: virt-manager-1.3.2/virtinst/support.py
|
|
===================================================================
|
|
--- virt-manager-1.3.2.orig/virtinst/support.py
|
|
+++ virt-manager-1.3.2/virtinst/support.py
|
|
@@ -314,6 +314,8 @@ SUPPORT_CONN_VCPU_PLACEMENT = _make(
|
|
SUPPORT_CONN_MEM_STATS_PERIOD = _make(
|
|
function="virDomain.setMemoryStatsPeriod",
|
|
version="1.1.1", hv_version={"qemu": 0})
|
|
+SUPPORT_CONN_NOCOW = _make(
|
|
+ version="1.2.18", hv_version={"qemu": "2.2.0", "test": 0})
|
|
|
|
# This is for disk <driver name=qemu>. xen supports this, but it's
|
|
# limited to arbitrary new enough xen, since I know libxl can handle it
|