File virtinst-vol-default-nocow.patch of Package virt-manager
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.2.1/virtinst/storage.py
===================================================================
--- virt-manager-1.2.1.orig/virtinst/storage.py
+++ virt-manager-1.2.1/virtinst/storage.py
@@ -718,6 +718,11 @@ 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 True
+ nocow = XMLProperty("./target/nocow",
+ is_bool=True, default_cb=_nocow_default_cb)
+
######################
# Public API helpers #