qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] sheepdog: implement direct write semantics


From: Liu Yuan
Subject: Re: [Qemu-devel] [PATCH] sheepdog: implement direct write semantics
Date: Wed, 09 Jan 2013 20:10:01 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 01/09/2013 08:07 PM, Liu Yuan wrote:
> $ qemu-system-x86_64 --enable-kvm -drive
> file=~/images/test1,if=virtio,cache=writeback -smp 2 -cpu host -m 1024
> -drive file=sheepdog:test,if=virtio,cache=writeback

To emulate old impl, I modified the sheepdog block driver as following:

diff --git a/block/sheepdog.c b/block/sheepdog.c
index e821746..321a426 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1118,6 +1118,7 @@ static int sd_open(BlockDriverState *bs, const
char *filename, int flags)
         goto out;
     }

+    if (0) {
     s->cache_enabled = true;
     s->flush_fd = connect_to_sdog(s->addr, s->port);
     if (s->flush_fd < 0) {
@@ -1125,6 +1126,7 @@ static int sd_open(BlockDriverState *bs, const
char *filename, int flags)
         ret = s->flush_fd;
         goto out;
     }
+    }

     if (snapid || tag[0] != '\0') {
         dprintf("%" PRIx32 " snapshot inode was open.\n", vid);




reply via email to

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