virt-manager/virtinst-vol-default-nocow.patch
Charles Arnold 287c87ccd9 - bsc#1022173 - virt-manager: unknown input device type
'virtio1.0-input'
  1d2cd306-Fix-incorrect-usage-of-virtio-input.patch
- bsc#1005848 - KVM: guest can not be started on top of SLES12SP1
  KVM host ppc64
  5a11cf07-virt-manager-generates-invalid-guest-XML.patch
- Upstream bug fixes
  617b9271-dont-return-virtio1.0-net-as-valid-device-name.patch
  7962672c-fix-error-checking-extra_args.patch
  b4858842-fix-bad-version-check-regression.patch
  f07a3021-fix-wait-to-behave-like-noautoconsole.patch

- bsc#1005861 - virt-manager create new machine dialog box too
  small to display system type
  virtinst-expand-combobox.patch
- fate#314135: Support PVSCSI on XEN and VirtioSCSI on KVM -
- fate#313076: HBA passthrough for kvm

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=338
2017-01-27 15:42:58 +00:00

37 lines
1.3 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.4.0/virtinst/storage.py
===================================================================
--- virt-manager-1.4.0.orig/virtinst/storage.py
+++ virt-manager-1.4.0/virtinst/storage.py
@@ -707,6 +707,12 @@ class StorageVolume(_StorageObject):
return self.TYPE_FILE
file_type = property(_get_vol_type)
+ 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)
+
##################
# XML properties #
Index: virt-manager-1.4.0/virtinst/support.py
===================================================================
--- virt-manager-1.4.0.orig/virtinst/support.py
+++ virt-manager-1.4.0/virtinst/support.py
@@ -316,6 +316,8 @@ SUPPORT_CONN_SPICE_GL = _make(version="1
SUPPORT_CONN_VIDEO_VIRTIO_ACCEL3D = _make(version="1.3.0",
hv_version={"qemu": "2.5.0", "test": 0})
SUPPORT_CONN_GRAPHICS_LISTEN_NONE = _make(version="2.0.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