qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] rbd : disable rbd_cache_writethrough_until_flus


From: Josh Durgin
Subject: Re: [Qemu-devel] [PATCH] rbd : disable rbd_cache_writethrough_until_flush for cache=unsafe
Date: Wed, 21 Sep 2016 18:01:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 07/27/2016 05:26 AM, Alexandre Derumier wrote:
ceph force writethrough until a flush is detected.
With cache=unsafe, we never send flush.
So we need to tell to ceph
to set rbd_cache_writethrough_until_flush=false in this case.

This speedup a lot qemu-img convert which use cache=unsafe by default

Signed-off-by: Alexandre Derumier <address@hidden>

Sorry for the delay - this is correct and needed since this option
appeared by default in Ceph hammer.

Reviewed-by: Josh Durgin <address@hidden>

---
 block/rbd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/block/rbd.c b/block/rbd.c
index 0106fea..f3af6c8 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -552,6 +552,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");





reply via email to

[Prev in Thread] Current Thread [Next in Thread]