From: Eric Blake <eblake@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 4/7] mirror: Add commit_job_type to perform commit with mirror code
Date: Tue, 01 Oct 2013 11:13:59 -0600 [thread overview]
Message-ID: <524B02D7.1040304@redhat.com> (raw)
In-Reply-To: <1380542578-2387-5-git-send-email-famz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]
On 09/30/2013 06:02 AM, Fam Zheng wrote:
> Commit active layer will be implemented in block/mirror.c, prepare a new
> job type to let it have a right type name for the user.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> block/mirror.c | 12 +++++++++++-
> blockdev.c | 2 +-
> include/block/block_int.h | 2 ++
> 3 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/block/mirror.c b/block/mirror.c
> index af6851f..20dcfb6 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c
> @@ -532,10 +532,19 @@ static const BlockJobType mirror_job_type = {
> .complete = mirror_complete,
> };
>
> +static const BlockJobType commit_job_type = {
> + .instance_size = sizeof(MirrorBlockJob),
> + .job_type = "commit",
I still wonder if we should complete the conversion over to a QAPI enum
type for all valid job types prior to hard-coding open strings through
yet more of the code base. As long as we don't have introspection done
yet, we can still make the switch, and in the long run, having an enum
of valid job types seems like it will be better for maintenance, all
with no change to what is sent over the wire in QMP.
> @@ -390,6 +391,7 @@ void mirror_start(BlockDriverState *bs, BlockDriverState *target,
> int64_t speed, int64_t granularity, int64_t buf_size,
> MirrorSyncMode mode, BlockdevOnError on_source_error,
> BlockdevOnError on_target_error,
> + bool commit_job,
If we DO create a QAPI enum for job type, then this parameter would be
the enum type, rather than a bool.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-10-01 17:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 12:02 [Qemu-devel] [PATCH v4 0/7] block: allow commit active as top Fam Zheng
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 1/7] block: add bdrv_common_ancestor() Fam Zheng
2013-09-30 21:40 ` Eric Blake
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 2/7] qmp: add internal sync mode "common" to mirror_start Fam Zheng
2013-09-30 14:49 ` Eric Blake
2013-10-08 8:08 ` Fam Zheng
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 3/7] mirror: don't close target Fam Zheng
2013-10-01 17:11 ` Eric Blake
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 4/7] mirror: Add commit_job_type to perform commit with mirror code Fam Zheng
2013-10-01 17:13 ` Eric Blake [this message]
2013-10-08 8:37 ` Fam Zheng
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 5/7] commit: support commit active layer Fam Zheng
2013-09-30 12:16 ` Paolo Bonzini
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 6/7] commit: remove unused check Fam Zheng
2013-09-30 12:17 ` Paolo Bonzini
2013-10-08 9:32 ` Fam Zheng
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 7/7] qemu-iotests: update test cases for commit active Fam Zheng
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=524B02D7.1040304@redhat.com \
--to=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).