2015-05-04 20:15:01 +00:00
|
|
|
Reference: fate#315125:
|
2014-04-04 01:55:04 +00: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-03-09 19:10:48 +00:00
|
|
|
Index: virt-manager-1.4.1/virtinst/storage.py
|
2014-04-04 01:55:04 +00:00
|
|
|
===================================================================
|
2017-03-09 19:10:48 +00:00
|
|
|
--- virt-manager-1.4.1.orig/virtinst/storage.py
|
|
|
|
+++ virt-manager-1.4.1/virtinst/storage.py
|
|
|
|
@@ -717,6 +717,12 @@ class StorageVolume(_StorageObject):
|
|
|
|
return self._pool_xml.get_disk_type()
|
2016-06-21 22:34:03 +00:00
|
|
|
file_type = property(_get_vol_type)
|
2014-04-04 01:55:04 +00:00
|
|
|
|
|
|
|
+ def _nocow_default_cb(self):
|
2016-01-12 20:36:29 +00:00
|
|
|
+ return self.conn.check_support(
|
|
|
|
+ self.conn.SUPPORT_CONN_NOCOW)
|
2014-04-04 01:55:04 +00:00
|
|
|
+ nocow = XMLProperty("./target/nocow",
|
|
|
|
+ is_bool=True, default_cb=_nocow_default_cb)
|
|
|
|
+
|
|
|
|
|
2016-06-21 22:34:03 +00:00
|
|
|
##################
|
|
|
|
# XML properties #
|
2017-03-09 19:10:48 +00:00
|
|
|
Index: virt-manager-1.4.1/virtinst/support.py
|
2016-01-12 20:36:29 +00:00
|
|
|
===================================================================
|
2017-03-09 19:10:48 +00:00
|
|
|
--- virt-manager-1.4.1.orig/virtinst/support.py
|
|
|
|
+++ virt-manager-1.4.1/virtinst/support.py
|
|
|
|
@@ -321,6 +321,8 @@ SUPPORT_CONN_VIDEO_VIRTIO_ACCEL3D = _mak
|
2017-01-27 15:42:58 +00:00
|
|
|
hv_version={"qemu": "2.5.0", "test": 0})
|
2016-06-21 22:34:03 +00:00
|
|
|
SUPPORT_CONN_GRAPHICS_LISTEN_NONE = _make(version="2.0.0")
|
2017-03-09 19:10:48 +00:00
|
|
|
SUPPORT_CONN_RNG_URANDOM = _make(version="1.3.4")
|
2016-01-12 20:36:29 +00:00
|
|
|
+SUPPORT_CONN_NOCOW = _make(
|
|
|
|
+ version="1.2.18", hv_version={"qemu": "2.2.0", "test": 0})
|
|
|
|
|
2016-06-21 22:34:03 +00:00
|
|
|
|
2016-01-12 20:36:29 +00:00
|
|
|
# This is for disk <driver name=qemu>. xen supports this, but it's
|