pve-qemu-qoup/debian/patches/pve/0018-block-rbd-disable-rbd_cache_writethrough_until_flush.patch
Wolfgang Bumiller 6838f03890 bump version to 2.11.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-02-22 12:40:28 +01:00

30 lines
882 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexandre Derumier <aderumier@odiso.com>
Date: Tue, 26 Jul 2016 16:51:00 +0200
Subject: [PATCH] block: 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 a76a5e8755..a33738a254 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -642,6 +642,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