2015-05-04 22:15:01 +02:00
|
|
|
Reference: fate#315125:
|
2014-04-04 03:55:04 +02:00
|
|
|
Set NOCOW flag to newly created volume by default, to solve performance
|
|
|
|
issue on btrfs.
|
|
|
|
|
|
|
|
Signed-off-by: Chunyan Liu <cyliu@suse.com>
|
|
|
|
|
2017-08-09 21:02:00 +02:00
|
|
|
Index: virt-manager-1.4.2/virtinst/storage.py
|
2014-04-04 03:55:04 +02:00
|
|
|
===================================================================
|
2017-08-09 21:02:00 +02:00
|
|
|
--- virt-manager-1.4.2.orig/virtinst/storage.py
|
|
|
|
+++ virt-manager-1.4.2/virtinst/storage.py
|
|
|
|
@@ -708,6 +708,12 @@ class StorageVolume(_StorageObject):
|
2017-03-09 20:10:48 +01:00
|
|
|
return self._pool_xml.get_disk_type()
|
2016-06-22 00:34:03 +02:00
|
|
|
file_type = property(_get_vol_type)
|
2014-04-04 03:55:04 +02:00
|
|
|
|
|
|
|
+ def _nocow_default_cb(self):
|
2016-01-12 21:36:29 +01:00
|
|
|
+ return self.conn.check_support(
|
|
|
|
+ self.conn.SUPPORT_CONN_NOCOW)
|
2014-04-04 03:55:04 +02:00
|
|
|
+ nocow = XMLProperty("./target/nocow",
|
|
|
|
+ is_bool=True, default_cb=_nocow_default_cb)
|
|
|
|
+
|
|
|
|
|
2016-06-22 00:34:03 +02:00
|
|
|
##################
|
|
|
|
# XML properties #
|
2017-08-09 21:02:00 +02:00
|
|
|
Index: virt-manager-1.4.2/virtinst/support.py
|
2016-01-12 21:36:29 +01:00
|
|
|
===================================================================
|
2017-08-09 21:02:00 +02:00
|
|
|
--- virt-manager-1.4.2.orig/virtinst/support.py
|
|
|
|
+++ virt-manager-1.4.2/virtinst/support.py
|
|
|
|
@@ -324,6 +324,8 @@ SUPPORT_CONN_RNG_URANDOM = _make(version
|
|
|
|
SUPPORT_CONN_USB3_PORTS = _make(version="1.3.5")
|
|
|
|
SUPPORT_CONN_MACHVIRT_PCI_DEFAULT = _make(version="3.0.0")
|
|
|
|
SUPPORT_CONN_QEMU_XHCI = _make(version="3.3.0")
|
2016-01-12 21:36:29 +01:00
|
|
|
+SUPPORT_CONN_NOCOW = _make(
|
|
|
|
+ version="1.2.18", hv_version={"qemu": "2.2.0", "test": 0})
|
|
|
|
|
2016-06-22 00:34:03 +02:00
|
|
|
|
2016-01-12 21:36:29 +01:00
|
|
|
# This is for disk <driver name=qemu>. xen supports this, but it's
|