From: Jeff Cody <jcody@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: pbonzini@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 5/7] QAPI: add command for live block commit, 'block-commit'
Date: Wed, 26 Sep 2012 10:25:14 -0400 [thread overview]
Message-ID: <5063104A.7080604@redhat.com> (raw)
In-Reply-To: <50630D94.9000605@redhat.com>
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 <jcody@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.
>
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.
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.
>> +#
>> +# 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
>
next prev parent reply other threads:[~2012-09-26 14:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-25 16:29 [Qemu-devel] [PATCH v2 0/7] Live block commit Jeff Cody
2012-09-25 16:29 ` [Qemu-devel] [PATCH v2 1/7] block: add support functions for live commit, to find and delete images Jeff Cody
2012-09-26 13:53 ` Kevin Wolf
2012-09-25 16:29 ` [Qemu-devel] [PATCH v2 2/7] block: add live block commit functionality Jeff Cody
2012-09-25 18:12 ` Eric Blake
2012-09-25 18:58 ` Jeff Cody
2012-09-25 19:05 ` Eric Blake
2012-09-26 14:03 ` Kevin Wolf
2012-09-25 16:29 ` [Qemu-devel] [PATCH v2 3/7] blockdev: rename block_stream_cb to a generic block_job_cb Jeff Cody
2012-09-25 16:29 ` [Qemu-devel] [PATCH v2 4/7] block: helper function, to find the base image of a chain Jeff Cody
2012-09-25 19:13 ` Eric Blake
2012-09-25 19:45 ` Jeff Cody
2012-09-25 16:29 ` [Qemu-devel] [PATCH v2 5/7] QAPI: add command for live block commit, 'block-commit' Jeff Cody
2012-09-25 19:42 ` Eric Blake
2012-09-25 19:57 ` Jeff Cody
2012-09-26 14:13 ` Kevin Wolf
2012-09-26 14:25 ` Jeff Cody [this message]
2012-09-26 14:33 ` Kevin Wolf
2012-09-26 14:34 ` Eric Blake
2012-09-25 16:29 ` [Qemu-devel] [PATCH v2 6/7] qemu-iotests: add initial tests for live block commit Jeff Cody
2012-09-25 18:02 ` Eric Blake
2012-09-25 18:53 ` Jeff Cody
2012-09-25 16:29 ` [Qemu-devel] [PATCH v2 7/7] block: after creating a live snapshot, make old image read-only Jeff Cody
2012-09-26 14:20 ` Kevin Wolf
2012-09-26 14:21 ` Jeff Cody
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5063104A.7080604@redhat.com \
--to=jcody@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).