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