From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj4Av-0003sJ-K1 for qemu-devel@nongnu.org; Tue, 28 Oct 2014 06:38:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xj4Am-0007Mz-L0 for qemu-devel@nongnu.org; Tue, 28 Oct 2014 06:38:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj4Ak-0007Mk-RR for qemu-devel@nongnu.org; Tue, 28 Oct 2014 06:38:43 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9SAcfiS022975 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 28 Oct 2014 06:38:41 -0400 Date: Tue, 28 Oct 2014 11:38:39 +0100 From: Kevin Wolf Message-ID: <20141028103839.GA4828@noname.str.redhat.com> References: <1414159063-25977-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1414159063-25977-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v14 00/14] qemu-img: Implement commit like QMP 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.2014 um 15:57 hat Max Reitz geschrieben: > qemu-img should use QMP commands whenever possible in order to ensure > feature completeness of both online and offline image operations. For > the "commit" command, this is relatively easy, so implement it first > (in the hope that indeed others will follow). > > As qemu-img does not have access to QMP (due to QMP being intertwined > with basically everything in qemu), we cannot directly use QMP, but at > least use the functions the corresponding QMP commands are using (which > would be "block-commit", in this case). > > > v14: > - Patch 3: > - Pull the optimized code out into an own function [Kevin] > - Only run the optimized code if the image header, the reftable, a > single refblock and the L1 table can be described by that single > refblock [Kevin] > - Zero out the L1 table before modifying anything else [Kevin] > - Always set bs->drv to NULL if an error occured which broke the > in-memory refcount information and thus rendered the BDS unusable > (because all of the qcow2 code assumes that the in-memory > information is correct, obviously) [Kevin] > - Do truncation last, because while it is the eventual goal, it is > also the structurally least invasive and therefore least important > operation (we don't want it to fail and leave the BDS unusable) > [Kevin] Reviewed-by: Kevin Wolf