From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFM3Y-0002NS-E3 for qemu-devel@nongnu.org; Wed, 04 Apr 2012 04:59:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFM3S-00040z-1c for qemu-devel@nongnu.org; Wed, 04 Apr 2012 04:59:07 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:35139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFM3R-00040i-Oe for qemu-devel@nongnu.org; Wed, 04 Apr 2012 04:59:01 -0400 Received: by dadz9 with SMTP id z9so46127dad.33 for ; Wed, 04 Apr 2012 01:58:59 -0700 (PDT) Message-ID: <4F7C0D44.4060808@gmail.com> Date: Wed, 04 Apr 2012 16:58:44 +0800 From: Liu Yuan MIME-Version: 1.0 References: <4F7AD149.5030006@redhat.com> <1333483438-8431-1-git-send-email-namei.unix@gmail.com> <4F7C0BF6.6050404@redhat.com> In-Reply-To: <4F7C0BF6.6050404@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5] sheepdog: implement SD_OP_FLUSH_VDI operation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, MORITA Kazutaka 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