From: Fam Zheng <famz@redhat.com>
To: Changlong Xie <xiecl.fnst@cn.fujitsu.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 14:30:43 +0800 [thread overview]
Message-ID: <20161011063043.GA5814@lemon> (raw)
In-Reply-To: <1476164341-8636-3-git-send-email-xiecl.fnst@cn.fujitsu.com>
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/
> + 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
>
>
>
>
next prev parent reply other threads:[~2016-10-11 6:30 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 [this message]
2016-10-11 10:38 ` 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=20161011063043.GA5814@lemon \
--to=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 \
--cc=xiecl.fnst@cn.fujitsu.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).