pve-qemu-qoup/debian/patches/pve/0039-rbd-disable-rbd_cache_writethrough_until_flush-with-.patch
Wolfgang Bumiller f185a9695e update to 2.9.0
2017-04-21 11:08:44 +02:00

30 lines
881 B
Diff

From 26fafa2ddc6257bf3aa0ea0e19505e3f0108172d Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Tue, 26 Jul 2016 16:51:00 +0200
Subject: [PATCH 39/49] rbd: disable rbd_cache_writethrough_until_flush with
cache=unsafe
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
block/rbd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/block/rbd.c b/block/rbd.c
index 1ceeeb5a60..30fe179585 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -623,6 +623,10 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags,
rados_conf_set(s->cluster, "rbd_cache", "true");
}
+ if (flags & BDRV_O_NO_FLUSH) {
+ rados_conf_set(s->cluster, "rbd_cache_writethrough_until_flush", "false");
+ }
+
r = rados_connect(s->cluster);
if (r < 0) {
error_setg_errno(errp, -r, "error connecting");
--
2.11.0