qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5] sheepdog: implement SD_OP_FLUSH_VDI operatio


From: Liu Yuan
Subject: Re: [Qemu-devel] [PATCH v5] sheepdog: implement SD_OP_FLUSH_VDI operation
Date: Wed, 04 Apr 2012 16:58:44 +0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20

Hi kevin,

On 04/04/2012 04:53 PM, Kevin Wolf wrote:

> I can update it in my queue, no problem there.
> 
> But I diffed this against v4 and it doesn't seem to have any changes,
> except in the context of two hunks. Are you sure that you didn't do the
> fixes in a separate commit or send the wrong patch or something like that?


V5 patch just reordered some of lines in sd_open() see below:

 static int sd_open(BlockDriverState *bs, const char *filename, int flags)
@@ -1026,6 +1093,15 @@ static int sd_open(BlockDriverState *bs, const
char *filename, int flags)
         goto out;
     }

+    if (flags & BDRV_O_CACHE_WB) {
+        s->cache_enabled = 1;
+        s->flush_fd = connect_to_sdog(s->addr, s->port);
+        if (s->flush_fd < 0) {
+            error_report("failed to connect");
+            goto out;
+        }
+    }
+
     if (snapid) {
         dprintf("%" PRIx32 " snapshot inode was open.\n", vid);
         s->is_snapshot = 1;

s->{addr,port} is initilized in find_vdi_name(), so flush_fd should be
initilized after it.

I checked the patch again, V5 patch is no problem.

Thanks,
Yuan



reply via email to

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