Received: from eggs.gnu.org ([208.118.235.92]:40335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCVyf-0004Pk-3J for qemu-devel@nongnu.org; Mon, 04 Mar 2013 09:02:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCVyc-00067R-ES for qemu-devel@nongnu.org; Mon, 04 Mar 2013 09:02:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCVyc-00067M-7Y for qemu-devel@nongnu.org; Mon, 04 Mar 2013 09:02:50 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r24E2ndL003696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 4 Mar 2013 09:02:49 -0500 From: Stefan Hajnoczi Date: Mon, 4 Mar 2013 15:02:35 +0100 Message-Id: <1362405755-3308-7-git-send-email-stefanha@redhat.com> In-Reply-To: <1362405755-3308-1-git-send-email-stefanha@redhat.com> References: <1362405755-3308-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH v2 6/6] qcow2: drop unnecessary flush in qcow2_update_snapshot_refcount() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi We already flush when the function completes. There is no need to flush after every compressed cluster. Signed-off-by: Stefan Hajnoczi --- block/qcow2-refcount.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 92519ea..9bfb390 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -790,10 +790,6 @@ int qcow2_update_snapshot_refcount(BlockDriverState *bs, if (ret < 0) { goto fail; } - - /* TODO Flushing once for the whole function should - * be enough */ - bdrv_flush(bs->file); } /* compressed clusters are never modified */ refcount = 2; -- 1.8.1.4