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 <jc...@redhat.com>
> 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. > +# > +# If top == base, that is an error. > +# > +# > +# @speed: #optional the maximum speed, in bytes per second > +# > +# Returns: Nothing on success > +# If commit or stream is already active on this device, DeviceInUse > +# If @device does not exist, DeviceNotFound > +# If image commit is not supported by this device, NotSupported > +# If @base does not exist, a generic error is returned > +# If @top does not exist, a generic error is returned > +# If @speed is invalid, InvalidParameter > +# > +# Since: 1.3 > +# > +## > +{ 'command': 'block-commit', > + 'data': { 'device': 'str', '*base': 'str', '*top': 'str', > + '*speed': 'int' } } Kevin