From: Eric Blake <eblake@redhat.com>
To: mahaocong <mahaocong_work@163.com>, qemu-block@nongnu.org
Cc: kwolf@redhat.com, jcody@redhat.com,
mahaocong <mahaocong@didichuxing.com>,
qemu-devel@nongnu.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v1] migration: add incremental mode on drive-mirror
Date: Wed, 19 Dec 2018 08:47:50 -0600 [thread overview]
Message-ID: <ea116c05-43c3-cb11-e492-b32a8f918bec@redhat.com> (raw)
In-Reply-To: <20181219065020.81256-2-mahaocong_work@163.com>
On 12/19/18 12:50 AM, mahaocong wrote:
> From: mahaocong <mahaocong@didichuxing.com>
>
> Signed-off-by: mahaocong <mahaocong@didichuxing.com>
The subject line tells "what", but you are missing a commit message body
that gives the "why". Details about the new feature, and how it is
useful, go a long way to making the code easier to review. How much of
your cover letter should be here as well?
At a first glance, I'm just going to focus on the interface:
> ---
> block/dirty-bitmap.c | 14 ++++++++++
> block/mirror.c | 63 +++++++++++++++++++++++++++++++++++---------
> blockdev.c | 36 +++++++++++++++++++++++--
> include/block/block_int.h | 3 ++-
> include/block/dirty-bitmap.h | 3 +++
> include/qemu/hbitmap.h | 2 ++
> qapi/block-core.json | 4 ++-
> util/hbitmap.c | 28 ++++++++++++++++++++
> 8 files changed, 136 insertions(+), 17 deletions(-)
>
> +++ b/qapi/block-core.json
> @@ -1727,6 +1727,8 @@
> # (all the disk, only the sectors allocated in the topmost image, or
> # only new I/O).
> #
> +# @bitmap-name: the bitmap to be used in incremental mode.
Missing a '(since 4.0)' tag. And doesn't really explain what
incremental mode in a mirroring operation actually means.
> +#
> # @granularity: granularity of the dirty bitmap, default is 64K
> # if the image format doesn't have clusters, 4K if the clusters
> # are smaller than that, else the cluster size. Must be a
> @@ -1768,7 +1770,7 @@
> { 'struct': 'DriveMirror',
> 'data': { '*job-id': 'str', 'device': 'str', 'target': 'str',
> '*format': 'str', '*node-name': 'str', '*replaces': 'str',
> - 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
> + 'sync': 'MirrorSyncMode', '*bitmap-name': 'str', '*mode': 'NewImageMode',
Can this be named just 'bitmap', instead of the longer 'bitmap-name'?
> '*speed': 'int', '*granularity': 'uint32',
> '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
> '*on-target-error': 'BlockdevOnError',
> diff --git a/util/hbitmap.c b/util/hbitmap.c
> index 8d402c5..7ae2fc2 100644
> --- a/util/hbitmap.c
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-12-19 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 6:50 [Qemu-devel] [PATCH v1] migration: add incremental mode on drive-mirror mahaocong
2018-12-19 6:50 ` mahaocong
2018-12-19 14:47 ` Eric Blake [this message]
2018-12-24 9:33 ` 马昊骢(滴滴云)
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=ea116c05-43c3-cb11-e492-b32a8f918bec@redhat.com \
--to=eblake@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=mahaocong@didichuxing.com \
--cc=mahaocong_work@163.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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).