]> git.proxmox.com Git - pve-qemu-kvm.git/blame - debian/patches/pve/0040-enable-cache-unsafe-for-vma-extract_content-and-qmp_.patch
fix backup jobs for multiple disks
[pve-qemu-kvm.git] / debian / patches / pve / 0040-enable-cache-unsafe-for-vma-extract_content-and-qmp_.patch
CommitLineData
87ba737b 1From 5a587bc1cfc30faa8506b5c2925b767b4c3d7b56 Mon Sep 17 00:00:00 2001
6fb04df7
WB
2From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3Date: Mon, 1 Aug 2016 10:52:46 +0200
9c3bec39 4Subject: [PATCH 40/47] enable cache=unsafe for vma extract_content and
6fb04df7
WB
5 qmp_savevm_start
6
7We don't send any flush here, so we need to open with cache=unsafe.
8
9Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
6fb04df7
WB
10---
11 savevm-async.c | 2 +-
12 vma.c | 2 +-
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/savevm-async.c b/savevm-async.c
1a91ab45 16index 6ac03af..46c1be7 100644
6fb04df7
WB
17--- a/savevm-async.c
18+++ b/savevm-async.c
19@@ -253,7 +253,7 @@ void qmp_savevm_start(bool has_statefile, const char *statefile, Error **errp)
20 {
21 Error *local_err = NULL;
22
1a91ab45
WB
23- int bdrv_oflags = BDRV_O_RDWR | BDRV_O_RESIZE;
24+ int bdrv_oflags = BDRV_O_RDWR | BDRV_O_RESIZE | BDRV_O_NO_FLUSH;
6fb04df7
WB
25 int ret;
26
27 if (snap_state.state != SAVE_STATE_DONE) {
28diff --git a/vma.c b/vma.c
1a91ab45 29index aafdc2d..4f55799 100644
6fb04df7
WB
30--- a/vma.c
31+++ b/vma.c
1a91ab45 32@@ -281,7 +281,7 @@ static int extract_content(int argc, char **argv)
6fb04df7
WB
33 } else if (di) {
34 char *devfn = NULL;
35 const char *format = NULL;
36- int flags = BDRV_O_RDWR;
37+ int flags = BDRV_O_RDWR | BDRV_O_NO_FLUSH;
38 bool write_zero = true;
39
40 if (readmap) {
41--
422.1.4
43