QAPI: add command for live block commit, 'block-commit'
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 (mandatory for now; see
note, below)
speed: maximum speed, in bytes/sec
Note: Eventually this command will support merging down the active layer,
but that code is not yet complete. If the active layer is passed
in as top, then an error will be returned. Once merging down the
active layer is supported, the 'top' argument may become optional,
and default to the active layer.
The is done as a block job, so upon completion a BLOCK_JOB_COMPLETED will
be emitted.
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
79fac5680d
commit
ed61fc10e8
4 changed files with 102 additions and 2 deletions
|
|
@ -1468,6 +1468,40 @@
|
|||
'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: The file name of the backing image within the image chain,
|
||||
# which contains the topmost data to be committed down.
|
||||
# Note, the active layer as 'top' is currently unsupported.
|
||||
#
|
||||
# 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 or @top is invalid, a generic error is returned
|
||||
# If @top is the active layer, or omitted, 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' } }
|
||||
|
||||
# @migrate_cancel
|
||||
#
|
||||
# Cancel the current executing migration process.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue