From: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
To: Eric Blake <eblake@redhat.com>,
stefanha@redhat.com, qemu-devel@nongnu.org
Cc: xuquan8@huawei.com, kwolf@redhat.com, xiecl.fnst@cn.fujitsu.com,
zhangchen.fnst@cn.fujitsu.com,
Wen Congyang <wency@cn.fujitsu.com>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options
Date: Mon, 17 Apr 2017 14:31:53 +0800 [thread overview]
Message-ID: <58F46159.3060103@huawei.com> (raw)
In-Reply-To: <4125e702-1298-f7c6-5152-fbf3b5d06f57@redhat.com>
On 2017/4/12 22:28, Eric Blake wrote:
> On 04/12/2017 09:05 AM, zhanghailiang wrote:
>> We use these two options to identify which disk is
>> shared
>>
>> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>> Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
>> ---
>> v4:
>> - Add proper comment for primary_disk (Stefan)
>> v2:
>> - Move g_free(s->shared_disk_id) to the common fail process place (Stefan)
>> - Fix comments for these two options
>> ---
>> +++ b/qapi/block-core.json
>> @@ -2661,12 +2661,20 @@
>> # node who owns the replication node chain. Must not be given in
>> # primary mode.
>> #
>> +# @shared-disk-id: Id of shared disk while is replication mode, if @shared-disk
>> +# is true, this option is required (Since: 2.10)
>> +#
>> +# @shared-disk: To indicate whether or not a disk is shared by primary VM
>> +# and secondary VM. (The default is false) (Since: 2.10)
>> +#
>> # Since: 2.9
>> ##
>> { 'struct': 'BlockdevOptionsReplication',
>> 'base': 'BlockdevOptionsGenericFormat',
>> 'data': { 'mode': 'ReplicationMode',
>> - '*top-id': 'str' } }
>> + '*top-id': 'str',
>> + '*shared-disk-id': 'str',
>> + '*shared-disk': 'bool' } }
> Do we need a separate bool and string? Or is it sufficient to say that
> if shared-disk is omitted, we are not sharing, and that if a shared-disk
> string is present, then we are sharing and it names the id of the shared
> disk.
Er, Yes, We need both of them, the command line of secondary sides is like:
-drive if=virtio,id=active-disk0,driver=replication,mode=secondary,\
file.driver=qcow2,top-id=active-disk0,\
file.file.filename=/mnt/ramfs/active_disk.img,\
file.backing=hidden_disk0,shared-disk=on
We only need the bool shared-disk to indicate whether disk is sharing or not, but
for primary side, we need to the blockdev-add command to tell primary which disk is shared.
{ 'execute': 'blockdev-add',
'arguments': {
'driver': 'replication',
'node-name': 'rep',
'mode': 'primary',
'shared-disk-id': 'primary_disk0',
'shared-disk': true,
'file': {
'driver': 'nbd',
'export': 'hidden_disk0',
'server': {
'type': 'inet',
'data': {
'host': 'xxx.xxx.xxx.xxx',
'port': 'yyy'
}
}
}
}
}
next prev parent reply other threads:[~2017-04-17 6:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 14:05 [Qemu-devel] [PATCH v4 0/6] COLO block replication supports shared disk case zhanghailiang
2017-04-12 14:05 ` [Qemu-devel] [PATCH v4 1/6] docs/block-replication: Add description for shared-disk case zhanghailiang
2017-04-12 14:05 ` [Qemu-devel] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options zhanghailiang
2017-04-12 14:28 ` Eric Blake
2017-04-17 6:31 ` Hailiang Zhang [this message]
2017-04-18 5:59 ` Xie Changlong
2017-05-12 6:25 ` Hailiang Zhang
2017-05-11 19:08 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-05-12 6:28 ` Hailiang Zhang
2017-04-12 14:05 ` [Qemu-devel] [PATCH v4 3/6] replication: Split out backup_do_checkpoint() from secondary_do_checkpoint() zhanghailiang
2017-04-12 14:05 ` [Qemu-devel] [PATCH v4 4/6] replication: fix code logic with the new shared_disk option zhanghailiang
2017-04-12 14:05 ` [Qemu-devel] [PATCH v4 5/6] replication: Implement block replication for shared disk case zhanghailiang
2017-05-11 19:15 ` Stefan Hajnoczi
2017-05-12 7:03 ` Hailiang Zhang
2017-04-12 14:05 ` [Qemu-devel] [PATCH v4 6/6] nbd/replication: implement .bdrv_get_info() for nbd and replication driver zhanghailiang
2017-05-11 19:17 ` [Qemu-devel] [Qemu-block] [PATCH v4 0/6] COLO block replication supports shared disk case Stefan Hajnoczi
2017-05-12 7:26 ` Hailiang Zhang
2017-05-16 10:41 ` [Qemu-devel] " 吴志勇
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=58F46159.3060103@huawei.com \
--to=zhang.zhanghailiang@huawei.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=wency@cn.fujitsu.com \
--cc=xiecl.fnst@cn.fujitsu.com \
--cc=xuquan8@huawei.com \
--cc=zhangchen.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).