From: Jeff Cody <jcody@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org,
supriyak@linux.vnet.ibm.com, stefanha@gmail.com
Subject: Re: [Qemu-devel] [RFC PATCH 2/4] block: add live block commit functionality
Date: Tue, 31 Jul 2012 13:55:34 -0400 [thread overview]
Message-ID: <50181C16.8010009@redhat.com> (raw)
In-Reply-To: <50181B34.4090007@redhat.com>
On 07/31/2012 01:51 PM, Eric Blake wrote:
> On 07/30/2012 11:16 PM, Jeff Cody wrote:
>> This adds the live commit coroutine. This iteration focuses on the
>> commit only below the active layer, and not the active layer itself.
>>
>> The behaviour is similar to block streaming; the sectors are walked
>> through, and anything that exists above 'base' is committed back down
>> into base. At the end, intermediate images are deleted, and the
>> chain stiched together. Images are restored to their original open
>
> s/stiched/stitched/
>
>> +
>> +enum {
>> + /*
>> + * Size of data buffer for populating the image file. This should be large
>> + * enough to process multiple clusters in a single call, so that populating
>> + * contiguous regions of the image is efficient.
>> + */
>> + COMMIT_BUFFER_SIZE = 512 * 1024, /* in bytes */
>> +};
>
> Paolo's latest round of patches got to the point of making this
> configurable for drive-mirror; is that something you should be copying here?
Yes
>
>> +++ b/block_int.h
>> @@ -342,4 +342,23 @@ void mirror_start(BlockDriverState *bs, BlockDriverState *target,
>> BlockDriverCompletionFunc *cb,
>> void *opaque, Error **errp);
>>
>> +/**
>> + * commit_start:
>> + * @bs: Top Block device
>> + * @base: Block device that will be written into, and become the new top
>> + * @speed: The maximum speed, in bytes per second, or 0 for unlimited.
>> + * @on_error: The action to take upon error.
>
> Do we need to distinguish between rerror and werror?
Good question - I don't think that would change the error handling, but
it may be useful information to get the user. If you prefer rerror and
werror distinction, I'll add that in.
>
>> + * @cb: Completion function for the job.
>> + * @opaque: Opaque pointer value passed to @cb.
>> + * @orig_base_flags: The original open flags for the base image
>> + * @orig_top_flags: The original open flags for the top image
>> + * @errp: Error object.
>> + *
>> + */
>> +void commit_start(BlockDriverState *bs, BlockDriverState *base,
>> + BlockDriverState *top, int64_t speed,
>> + BlockdevOnError on_error, BlockDriverCompletionFunc *cb,
>> + void *opaque, int orig_base_flags, int orig_top_flags,
>> + Error **errp);
>> +
>> #endif /* BLOCK_INT_H */
>
next prev parent reply other threads:[~2012-07-31 18:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 5:16 [Qemu-devel] [RFC PATCH 0/4] Live block commit Jeff Cody
2012-07-31 5:16 ` [Qemu-devel] [RFC PATCH 1/4] block: add support functions for live commit, to find and delete images Jeff Cody
2012-07-31 17:34 ` Eric Blake
2012-07-31 17:52 ` Jeff Cody
2012-07-31 5:16 ` [Qemu-devel] [RFC PATCH 2/4] block: add live block commit functionality Jeff Cody
2012-07-31 17:51 ` Eric Blake
2012-07-31 17:55 ` Jeff Cody [this message]
2012-08-01 6:32 ` Kevin Wolf
2012-08-01 7:07 ` Paolo Bonzini
2012-08-01 11:23 ` Jeff Cody
2012-07-31 5:16 ` [Qemu-devel] [RFC PATCH 3/4] qerror: new errors for live block commit, QERR_TOP_NOT_FOUND Jeff Cody
2012-07-31 18:35 ` Eric Blake
2012-07-31 5:16 ` [Qemu-devel] [RFC PATCH 4/4] QAPI: add command for live block commit, 'block-commit' Jeff Cody
2012-07-31 18:38 ` Eric Blake
2012-08-14 7:41 ` [Qemu-devel] [RFC PATCH 0/4] Live block commit Tiziano Müller
2012-08-29 13:40 ` 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=50181C16.8010009@redhat.com \
--to=jcody@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=supriyak@linux.vnet.ibm.com \
/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).