[pve-devel] [PATCH] Set cache unsafe un vma extract for performance

elacunza at binovo.es elacunza at binovo.es
Wed Jul 27 09:45:48 CEST 2016


From: Eneko Lacunza <elacunza at binovo.es>

Signed-off-by: Eneko Lacunza <elacunza at binovo.es>
---
 debian/patches/pve/0055-vma-restore-set-cache-unsafe.patch | 14 ++++++++++++++
 debian/patches/series                                      |  1 +
 2 files changed, 15 insertions(+)
 create mode 100644 debian/patches/pve/0055-vma-restore-set-cache-unsafe.patch

diff --git a/debian/patches/pve/0055-vma-restore-set-cache-unsafe.patch b/debian/patches/pve/0055-vma-restore-set-cache-unsafe.patch
new file mode 100644
index 0000000..0b12441
--- /dev/null
+++ b/debian/patches/pve/0055-vma-restore-set-cache-unsafe.patch
@@ -0,0 +1,14 @@
+Set cache unsafe for performance on write device
+Index: b/vma.c
+===================================================================
+--- a/vma.c
++++ b/vma.c
+@@ -328,6 +328,8 @@ static int extract_content(int argc, cha
+ 	    }
+ 
+ 
++            /* Activate cache=unsafe for performance as done in qemu-img convert */
++            flags |= BDRV_O_NO_FLUSH;
+ 	    if (errp || !(blk = blk_new_open(devfn, NULL, options, flags, &errp))) {
+                 g_error("can't open file %s - %s", devfn,
+                         error_get_pretty(errp));
diff --git a/debian/patches/series b/debian/patches/series
index c77c5da..c75fb9b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -52,6 +52,7 @@ pve/0051-net-NET_CLIENT_OPTIONS_KIND_MAX-changed.patch
 pve/0052-vnc-refactor-to-QIOChannelSocket.patch
 pve/0053-vma-use-BlockBackend-on-extract.patch
 pve/0054-rbd-disable-rbd_cache_writethrough_until_flush-with-.patch
+pve/0055-vma-restore-set-cache-unsafe.patch
 #see https://bugs.launchpad.net/qemu/+bug/1488363?comments=all
 extra/0001-Revert-target-i386-disable-LINT0-after-reset.patch
 extra/0001-i386-kvmvapic-initialise-imm32-variable.patch
-- 
2.1.4




More information about the pve-devel mailing list