All of lore.kernel.org
 help / color / mirror / Atom feed
From: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
To: Eric Blake <eblake@redhat.com>,
	qemu devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Fam Zheng <famz@redhat.com>, Max Reitz <mreitz@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>, Jeff Cody <jcody@redhat.com>
Cc: qemu block <qemu-block@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Dong Eddie <eddie.dong@intel.com>,
	Jiang Yunhong <yunhong.jiang@intel.com>,
	zhanghailiang <zhang.zhanghailiang@huawei.com>,
	Gonglei <arei.gonglei@huawei.com>,
	Wen Congyang <wency@cn.fujitsu.com>
Subject: Re: [Qemu-devel] [PATCH v20 07/10] Introduce new APIs to do replication operation
Date: Mon, 13 Jun 2016 10:07:58 +0800	[thread overview]
Message-ID: <575E157E.2080503@cn.fujitsu.com> (raw)
In-Reply-To: <57582070.6020508@redhat.com>

On 06/08/2016 09:41 PM, Eric Blake wrote:
> On 06/07/2016 07:11 PM, Changlong Xie wrote:
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
>> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
>
> No mention of the API names in the commit message?  Grepping 'git log'
> is easier if there is something useful to grep for.

I'll use a brief description, such as below:

This commit introduces six replication interfaces(for block, network 
etc). Firstly we can use replication_(new/remove) to create/destroy 
replication instances, then in migration we can use 
replication_(start/stop/do_checkpoint/get_error)_all to handle all 
replication operations. More detail please refer to replication.h

>
>> ---
>>   Makefile.objs        |   1 +
>>   qapi/block-core.json |  13 ++++
>>   replication.c        | 105 ++++++++++++++++++++++++++++++
>>   replication.h        | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++
>>   4 files changed, 295 insertions(+)
>>   create mode 100644 replication.c
>>   create mode 100644 replication.h
>>
>
>> +++ b/qapi/block-core.json
>> @@ -2032,6 +2032,19 @@
>>               '*read-pattern': 'QuorumReadPattern' } }
>>
>>   ##
>> +# @ReplicationMode
>> +#
>> +# An enumeration of replication modes.
>> +#
>> +# @primary: Primary mode, the vm's state will be sent to secondary QEMU.
>> +#
>> +# @secondary: Secondary mode, receive the vm's state from primary QEMU.
>> +#
>> +# Since: 2.7
>> +##
>> +{ 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] }
>> +
>
> This part is fine, from an interface point of view. However, I have not
> closely reviewed the rest of the patch or series.  That said, here's
> some quick things that caught my eye.

Appreciate.

>
>
>> +++ b/replication.c
>> @@ -0,0 +1,105 @@
>> +/*
>> + * Replication filter
>> + *
>> + * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
>> + * Copyright (c) 2016 Intel Corporation
>> + * Copyright (c) 2016 FUJITSU LIMITED
>> + *
>> + * Author:
>> + *   Changlong Xie <xiecl.fnst@cn.fujitsu.com>
>> + *
>> + * This work is licensed under the terms of the GNU GPL, version 2 or later.
>> + * See the COPYING file in the top-level directory.
>> + */
>> +
>> +#include "replication.h"
>
> All new .c files must include "qemu/osdep.h" first.
>
>
>> +++ b/replication.h
>> @@ -0,0 +1,176 @@
>> +/*
>> + * Replication filter
>> + *
>> + * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
>> + * Copyright (c) 2016 Intel Corporation
>> + * Copyright (c) 2016 FUJITSU LIMITED
>> + *
>> + * Author:
>> + *   Changlong Xie <xiecl.fnst@cn.fujitsu.com>
>> + *
>> + * This work is licensed under the terms of the GNU GPL, version 2 or later.
>> + * See the COPYING file in the top-level directory.
>> + */
>> +
>> +#ifndef REPLICATION_H
>> +#define REPLICATION_H
>> +
>> +#include "qemu/osdep.h"
>
> And .h files must NOT include osdep.h.
>
>> +#include "qapi/error.h"
>
> Do you really need the full error.h, or is typedefs.h enough to get the
> forward declaration of Error?

It's for error_propagate() in replication.c, and in summary to your 
comments on replication.h/replication.c, i'll
1) remove all uncorrelated *.h in replication.h
2) use following header files in replication.c

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/queue.h"
#include "replication.h"

Thanks
>

  reply	other threads:[~2016-06-13  2:03 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08  1:11 [Qemu-trivial] [PATCH v20 00/10] Block replication for continuous checkpoints Changlong Xie
2016-06-08  1:11 ` [Qemu-devel] " Changlong Xie
2016-06-08  1:11 ` [Qemu-trivial] [PATCH v20 01/10] unblock backup operations in backing file Changlong Xie
2016-06-08  1:11   ` [Qemu-devel] " Changlong Xie
2016-06-08  1:11 ` [Qemu-trivial] [PATCH v20 02/10] Backup: clear all bitmap when doing block checkpoint Changlong Xie
2016-06-08  1:11   ` [Qemu-devel] " Changlong Xie
2016-06-08  1:11 ` [Qemu-trivial] [PATCH v20 03/10] Backup: export interfaces for extra serialization Changlong Xie
2016-06-08  1:11   ` [Qemu-devel] " Changlong Xie
2016-06-08  1:11 ` [Qemu-trivial] [PATCH v20 04/10] Link backup into block core Changlong Xie
2016-06-08  1:11   ` [Qemu-devel] " Changlong Xie
2016-06-08  1:11 ` [Qemu-trivial] [PATCH v20 05/10] docs: block replication's description Changlong Xie
2016-06-08  1:11   ` [Qemu-devel] " Changlong Xie
2016-06-08  1:11 ` [Qemu-trivial] [PATCH v20 06/10] auto complete active commit Changlong Xie
2016-06-08  1:11   ` [Qemu-devel] " Changlong Xie
2016-06-08  1:11 ` [Qemu-trivial] [PATCH v20 07/10] Introduce new APIs to do replication operation Changlong Xie
2016-06-08  1:11   ` [Qemu-devel] " Changlong Xie
2016-06-08 13:41   ` [Qemu-trivial] " Eric Blake
2016-06-08 13:41     ` [Qemu-devel] " Eric Blake
2016-06-13  2:07     ` Changlong Xie [this message]
2016-06-08  1:11 ` [Qemu-trivial] [PATCH v20 08/10] Implement new driver for block replication Changlong Xie
2016-06-08  1:11   ` [Qemu-devel] " Changlong Xie
2016-06-08  1:11 ` [Qemu-trivial] [PATCH v20 09/10] tests: add unit test case for replication Changlong Xie
2016-06-08  1:11   ` [Qemu-devel] " Changlong Xie
2016-06-08  1:11 ` [Qemu-trivial] [PATCH v20 10/10] support replication driver in blockdev-add Changlong Xie
2016-06-08  1:11   ` [Qemu-devel] " Changlong Xie
2016-06-08 13:36 ` [Qemu-trivial] [PATCH v20 00/10] Block replication for continuous checkpoints Eric Blake
2016-06-08 13:36   ` [Qemu-devel] " Eric Blake
2016-06-13  2:13   ` Changlong Xie
2016-06-10 13:22 ` [Qemu-trivial] " Michael Tokarev
2016-06-10 13:22   ` [Qemu-devel] " Michael Tokarev
2016-06-13  1:01   ` Changlong Xie

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=575E157E.2080503@cn.fujitsu.com \
    --to=xiecl.fnst@cn.fujitsu.com \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wency@cn.fujitsu.com \
    --cc=yunhong.jiang@intel.com \
    --cc=zhang.zhanghailiang@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.