From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSmOD-0007kw-TS for qemu-devel@nongnu.org; Tue, 22 Nov 2011 04:11:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSmO8-0004hm-BI for qemu-devel@nongnu.org; Tue, 22 Nov 2011 04:11:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSmO7-0004hg-SI for qemu-devel@nongnu.org; Tue, 22 Nov 2011 04:11:36 -0500 Message-ID: <4ECB6803.3070305@redhat.com> Date: Tue, 22 Nov 2011 10:14:43 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1321640945-9827-1-git-send-email-kwolf@redhat.com> <1321640945-9827-6-git-send-email-kwolf@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 5/9] qcow2: Rework qcow2_snapshot_create error handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org Am 21.11.2011 17:47, schrieb Stefan Hajnoczi: > On Fri, Nov 18, 2011 at 6:29 PM, Kevin Wolf wrote: >> + /* >> + * Increase the refcounts of all clusters and make sure everything is >> + * stable on disk before updating the snapshot table to contain a pointer >> + * to the new L1 table. >> + */ >> + ret = qcow2_update_snapshot_refcount(bs, s->l1_table_offset, s->l1_size, 1); >> + if (ret < 0) { >> + goto fail; >> + } >> + >> + ret = bdrv_flush(bs->file); > > Do we need to explicitly flush the qcow2 cache to ensure metadata > reaches the disk? Yes, I think this should be a bdrv_flush(bs). I'm not completely sure if it is really required, but I couldn't immediately tell why it's safe and this isn't a fast path anyway, so I'll replace this before merging the series (won't send out a v3 for this). Kevin