]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/pve/0019-block-rbd-disable-rbd_cache_writethrough_until_flush.patch
bump version to 2.9.1-9
[pve-qemu.git] / debian / patches / pve / 0019-block-rbd-disable-rbd_cache_writethrough_until_flush.patch
CommitLineData
23102ed6 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
95259824
WB
2From: Alexandre Derumier <aderumier@odiso.com>
3Date: Tue, 26 Jul 2016 16:51:00 +0200
23102ed6
WB
4Subject: [PATCH] block: rbd: disable rbd_cache_writethrough_until_flush with
5 cache=unsafe
95259824
WB
6
7Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
8---
9 block/rbd.c | 4 ++++
10 1 file changed, 4 insertions(+)
11
12diff --git a/block/rbd.c b/block/rbd.c
ddbcf45e 13index 2354ffcc64..b7700648ff 100644
95259824
WB
14--- a/block/rbd.c
15+++ b/block/rbd.c
45169293 16@@ -623,6 +623,10 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags,
95259824
WB
17 rados_conf_set(s->cluster, "rbd_cache", "true");
18 }
19
20+ if (flags & BDRV_O_NO_FLUSH) {
21+ rados_conf_set(s->cluster, "rbd_cache_writethrough_until_flush", "false");
22+ }
23+
24 r = rados_connect(s->cluster);
25 if (r < 0) {
26 error_setg_errno(errp, -r, "error connecting");
27--
45169293 282.11.0
95259824 29