Received: from eggs.gnu.org ([2001:4830:134:3::10]:38489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZdUu-0000Bp-78 for qemu-devel@nongnu.org; Fri, 25 Oct 2013 05:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZdUo-00018L-3j for qemu-devel@nongnu.org; Fri, 25 Oct 2013 05:16:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZdUn-00018F-Sj for qemu-devel@nongnu.org; Fri, 25 Oct 2013 05:15:54 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9P9FqZp022573 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 25 Oct 2013 05:15:53 -0400 Date: Fri, 25 Oct 2013 11:15:50 +0200 From: Kevin Wolf Message-ID: <20131025091550.GB4603@dhcp-200-207.str.redhat.com> References: <1382639706-7404-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1382639706-7404-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] qcow2: Flush image after creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Am 24.10.2013 um 20:35 hat Max Reitz geschrieben: > Opening the qcow2 image with BDRV_O_NO_FLUSH prevents any flushes during > the image creation. This means that the image has not yet been flushed > to disk when qemu-img create exits. This flush is delayed until the next > operation on the image involving opening it without BDRV_O_NO_FLUSH and > closing (or directly flushing) it. For large images and/or images with a > small cluster size and preallocated metadata, this flush may take a > significant amount of time and may occur unexpectedly. > > Reopening the image without BDRV_O_NO_FLUSH right before the end of > qcow2_create2() results in hoisting the potentially costly flush into > the image creation, which is expected to take some time (whereas > successive image operations may be not). > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake Thanks, applied to the block branch. Kevin