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.zhanghaili...@huawei.com> > Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> > Signed-off-by: Zhang Chen <zhangchen.f...@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. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature