diff options
author | Jeff Cody <jcody@redhat.com> | 2014-01-24 09:02:37 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-01-24 16:12:49 +0100 |
commit | 37222900743962e146a82b7077a18c3f39859a19 (patch) | |
tree | bb0f5579a3ed79acf046886598c941788f29c6bd /qmp-commands.hx | |
parent | 4da83585961631bfc10831dd26c4afda2a8b23e8 (diff) | |
download | qemu-37222900743962e146a82b7077a18c3f39859a19.zip qemu-37222900743962e146a82b7077a18c3f39859a19.tar.gz qemu-37222900743962e146a82b7077a18c3f39859a19.tar.bz2 |
block: update block commit documentation regarding image truncation
This updates the documentation for commiting snapshot images.
Specifically, this highlights what happens when the base image
is either smaller or larger than the snapshot image being committed.
In the case of the base image being smaller, it is resized to the
larger size of the snapshot image. In the case of the base image
being larger, it is not resized automatically, but once the commit
has completed it is safe for the user to truncate the base image.
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index 4f28250..cce6b81 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -966,6 +966,45 @@ EQMP .mhandler.cmd_new = qmp_marshal_input_block_commit, }, +SQMP +block-commit +------------ + +Live commit of data from overlay image nodes into backing nodes - i.e., writes +data between 'top' and 'base' into 'base'. + +Arguments: + +- "device": The device's ID, must be unique (json-string) +- "base": The file name of the backing image to write data into. + If not specified, this is the deepest backing image + (json-string, optional) +- "top": The file name of the backing image within the image chain, + which contains the topmost data to be committed down. + + If top == base, that is an error. + If top == active, the job will not be completed by itself, + user needs to complete the job with the block-job-complete + command after getting the ready event. (Since 2.0) + + If the base image is smaller than top, then the base image + will be resized to be the same size as top. If top is + smaller than the base image, the base will not be + truncated. If you want the base image size to match the + size of the smaller top, you can safely truncate it + yourself once the commit operation successfully completes. + (json-string) +- "speed": the maximum speed, in bytes per second (json-int, optional) + + +Example: + +-> { "execute": "block-commit", "arguments": { "device": "virtio0", + "top": "/tmp/snap1.qcow2" } } +<- { "return": {} } + +EQMP + { .name = "drive-backup", .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?," |