From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGsgU-0007um-8d for qemu-devel@nongnu.org; Wed, 26 Sep 2012 10:34:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGsgS-0001dl-Eg for qemu-devel@nongnu.org; Wed, 26 Sep 2012 10:33:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGsgS-0001dY-6G for qemu-devel@nongnu.org; Wed, 26 Sep 2012 10:33:52 -0400 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 q8QEXpV3024712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 26 Sep 2012 10:33:51 -0400 Message-ID: <5063124C.3000005@redhat.com> Date: Wed, 26 Sep 2012 16:33:48 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <75bbfc268498ae3733d7ffb896ab0852527d5b11.1348589526.git.jcody@redhat.com> <50630D94.9000605@redhat.com> <5063104A.7080604@redhat.com> In-Reply-To: <5063104A.7080604@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 5/7] QAPI: add command for live block commit, 'block-commit' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: jcody@redhat.com Cc: pbonzini@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org Am 26.09.2012 16:25, schrieb Jeff Cody: > On 09/26/2012 10:13 AM, Kevin Wolf wrote: >> Am 25.09.2012 18:29, schrieb Jeff Cody: >>> The command for live block commit is added, which has the following >>> arguments: >>> >>> device: the block device to perform the commit on (mandatory) >>> base: the base image to commit into; optional (if not specified, >>> it is the underlying original image) >>> top: the top image of the commit - all data from inside top down >>> to base will be committed into base. optional (if not specified, >>> it is one below the active image) - see note below >>> speed: maximum speed, in bytes/sec >>> >>> note: eventually this will support merging down the active layer, >>> but that code is not yet complete. If the active layer is passed >>> in currently as top, or top is left to the default, then an error >>> will be returned. >>> >>> The is done as a block job, so upon completion a BLOCK_JOB_COMPLETED will >>> be emitted. >>> >>> Signed-off-by: Jeff Cody >> >>> diff --git a/qapi-schema.json b/qapi-schema.json >>> index 14e4419..e614453 100644 >>> --- a/qapi-schema.json >>> +++ b/qapi-schema.json >>> @@ -1468,6 +1468,41 @@ >>> 'returns': 'str' } >>> >>> ## >>> +# @block-commit >>> +# >>> +# Live commit of data from overlay image nodes into backing nodes - i.e., >>> +# writes data between 'top' and 'base' into 'base'. >>> +# >>> +# @device: the name of the device >>> +# >>> +# @base: #optional The file name of the backing image to write data into. >>> +# If not specified, this is the deepest backing image >>> +# >>> +# @top: #optional The file name of the backing image within the image chain, >>> +# which contains the topmost data to be committed down. >>> +# If not specified, this is one layer below the active >>> +# layer (i.e. active->backing_hd). >> >> Why isn't active the default any more? I know, we don't support it yet, >> but long term this is what makes most sense as a default. >> > > Eric had a similar question, and asked if anyone had any preference - > this was my response: > > --- > > I guess I don't have a strong preference either - I originally had it > the other way, but then that meant the default in the current > implementation was actually an error. We can make it non-optional for now and use active as the default once we introduce support for committing the active layer. > Also, I assumed (danger!) that the most common use of commit would be a > snapshot, followed by a commit of active->backing_hd. With that > assumption, it seemed like a sane default. > > --- > > I can certainly revert back to having the active layer be the top, if > that is the preference. I think it is, if nothing else for consistency with the existing synchronous 'commit' command. Kevin