qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
To: Fam Zheng <famz@redhat.com>
Cc: qemu devel <qemu-devel@nongnu.org>,
	qemu block <qemu-block@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1 2/2] block/replication: Clarify 'top-id' parameter usage
Date: Tue, 11 Oct 2016 18:38:30 +0800	[thread overview]
Message-ID: <57FCC126.5060205@cn.fujitsu.com> (raw)
In-Reply-To: <20161011063043.GA5814@lemon>

On 10/11/2016 02:30 PM, Fam Zheng wrote:
> On Tue, 10/11 13:39, Changlong Xie wrote:
>> Replication driver only support 'top-id' parameter in secondary side,
>> and it must not be supplied in primary side
>>
>> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
>> ---
>>   block/replication.c  | 5 +++++
>>   qapi/block-core.json | 3 ++-
>>   2 files changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/block/replication.c b/block/replication.c
>> index 5b432d9..1e8284b 100644
>> --- a/block/replication.c
>> +++ b/block/replication.c
>> @@ -101,6 +101,11 @@ static int replication_open(BlockDriverState *bs, QDict *options,
>>
>>       if (!strcmp(mode, "primary")) {
>>           s->mode = REPLICATION_MODE_PRIMARY;
>> +        top_id = qemu_opt_get(opts, REPLICATION_TOP_ID);
>> +        if (top_id) {
>> +            error_setg(&local_err, "The primary side do not support option top-id");
>
> s/do not/does not/

Yes, thanks.

>
>> +            goto fail;
>> +        }
>>       } else if (!strcmp(mode, "secondary")) {
>>           s->mode = REPLICATION_MODE_SECONDARY;
>>           top_id = qemu_opt_get(opts, REPLICATION_TOP_ID);
>> diff --git a/qapi/block-core.json b/qapi/block-core.json
>> index 4badb97..ec92df4 100644
>> --- a/qapi/block-core.json
>> +++ b/qapi/block-core.json
>> @@ -2197,7 +2197,8 @@
>>   # @mode: the replication mode
>>   #
>>   # @top-id: #optional In secondary mode, node name or device ID of the root
>> -#          node who owns the replication node chain. Ignored in primary mode.
>> +#          node who owns the replication node chain. Must not be given in
>> +#          primary mode.
>>   #
>>   # Since: 2.8
>>   ##
>> --
>> 1.9.3
>>
>>
>>
>>
>
>
> .
>

      reply	other threads:[~2016-10-11 10:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-11  5:38 [Qemu-devel] [PATCH v1 0/2] block/replication fixes Changlong Xie
2016-10-11  5:39 ` [Qemu-devel] [PATCH v1 1/2] block/replication: prefect the logic to acquire 'top_id' Changlong Xie
2016-10-11  5:39 ` [Qemu-devel] [PATCH v1 2/2] block/replication: Clarify 'top-id' parameter usage Changlong Xie
2016-10-11  6:30   ` Fam Zheng
2016-10-11 10:38     ` Changlong Xie [this message]

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=57FCC126.5060205@cn.fujitsu.com \
    --to=xiecl.fnst@cn.fujitsu.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).