]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/pve/0018-block-rbd-disable-rbd_cache_writethrough_until_flush.patch
Makefile: drop -j option from dpkg-buildpackage
[pve-qemu.git] / debian / patches / pve / 0018-block-rbd-disable-rbd_cache_writethrough_until_flush.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Alexandre Derumier <aderumier@odiso.com>
3 Date: Tue, 26 Jul 2016 16:51:00 +0200
4 Subject: [PATCH] block: rbd: disable rbd_cache_writethrough_until_flush with
5 cache=unsafe
6
7 Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
8 ---
9 block/rbd.c | 4 ++++
10 1 file changed, 4 insertions(+)
11
12 diff --git a/block/rbd.c b/block/rbd.c
13 index a76a5e8755..a33738a254 100644
14 --- a/block/rbd.c
15 +++ b/block/rbd.c
16 @@ -642,6 +642,10 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags,
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 --
28 2.11.0
29