Message ID | 1469602913-20979-12-git-send-email-xiecl.fnst@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Am 27.07.2016 um 09:01 hat Changlong Xie geschrieben: > From: Wen Congyang <wency@cn.fujitsu.com> > > Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> > Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> > Signed-off-by: Wang WeiWei <wangww.fnst@cn.fujitsu.com> > Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> > Signed-off-by: Gonglei <arei.gonglei@huawei.com> > Reviewed-by: Eric Blake <eblake@redhat.com> > @@ -2078,6 +2079,23 @@ > { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] } > > ## > +# @BlockdevOptionsReplication > +# > +# Driver specific block device options for replication > +# > +# @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. Can we change this to "Must not be given in primary mode"? Not sure what the code currently does, but I think it should error out if top-id is given there. > +# > +# Since: 2.8 > +## > +{ 'struct': 'BlockdevOptionsReplication', > + 'base': 'BlockdevOptionsGenericFormat', > + 'data': { 'mode': 'ReplicationMode', > + '*top-id': 'str' } } Kevin
On 08/09/2016 05:08 PM, Kevin Wolf wrote: > Am 27.07.2016 um 09:01 hat Changlong Xie geschrieben: >> From: Wen Congyang <wency@cn.fujitsu.com> >> >> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> >> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> >> Signed-off-by: Wang WeiWei <wangww.fnst@cn.fujitsu.com> >> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> >> Signed-off-by: Gonglei <arei.gonglei@huawei.com> >> Reviewed-by: Eric Blake <eblake@redhat.com> > >> @@ -2078,6 +2079,23 @@ >> { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] } >> >> ## >> +# @BlockdevOptionsReplication >> +# >> +# Driver specific block device options for replication >> +# >> +# @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. > > Can we change this to "Must not be given in primary mode"? Not sure what > the code currently does, but I think it should error out if top-id is Replication driver will ignore "top-id" parameter in Primary mode. > given there. > >> +# >> +# Since: 2.8 >> +## >> +{ 'struct': 'BlockdevOptionsReplication', >> + 'base': 'BlockdevOptionsGenericFormat', >> + 'data': { 'mode': 'ReplicationMode', >> + '*top-id': 'str' } } > > Kevin > > > . >
Am 15.08.2016 um 03:49 hat Changlong Xie geschrieben: > On 08/09/2016 05:08 PM, Kevin Wolf wrote: > >Am 27.07.2016 um 09:01 hat Changlong Xie geschrieben: > >>From: Wen Congyang <wency@cn.fujitsu.com> > >> > >>Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> > >>Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> > >>Signed-off-by: Wang WeiWei <wangww.fnst@cn.fujitsu.com> > >>Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> > >>Signed-off-by: Gonglei <arei.gonglei@huawei.com> > >>Reviewed-by: Eric Blake <eblake@redhat.com> > > > >>@@ -2078,6 +2079,23 @@ > >> { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] } > >> > >> ## > >>+# @BlockdevOptionsReplication > >>+# > >>+# Driver specific block device options for replication > >>+# > >>+# @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. > > > >Can we change this to "Must not be given in primary mode"? Not sure what > >the code currently does, but I think it should error out if top-id is > > Replication driver will ignore "top-id" parameter in Primary mode. This is not good behaviour, which is why I requested a change. Kevin > >given there. > > > >>+# > >>+# Since: 2.8 > >>+## > >>+{ 'struct': 'BlockdevOptionsReplication', > >>+ 'base': 'BlockdevOptionsGenericFormat', > >>+ 'data': { 'mode': 'ReplicationMode', > >>+ '*top-id': 'str' } } > > > >Kevin
On 08/15/2016 04:37 PM, Kevin Wolf wrote: > Am 15.08.2016 um 03:49 hat Changlong Xie geschrieben: >> On 08/09/2016 05:08 PM, Kevin Wolf wrote: >>> Am 27.07.2016 um 09:01 hat Changlong Xie geschrieben: >>>> From: Wen Congyang <wency@cn.fujitsu.com> >>>> >>>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> >>>> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> >>>> Signed-off-by: Wang WeiWei <wangww.fnst@cn.fujitsu.com> >>>> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> >>>> Signed-off-by: Gonglei <arei.gonglei@huawei.com> >>>> Reviewed-by: Eric Blake <eblake@redhat.com> >>> >>>> @@ -2078,6 +2079,23 @@ >>>> { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] } >>>> >>>> ## >>>> +# @BlockdevOptionsReplication >>>> +# >>>> +# Driver specific block device options for replication >>>> +# >>>> +# @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. >>> >>> Can we change this to "Must not be given in primary mode"? Not sure what >>> the code currently does, but I think it should error out if top-id is >> >> Replication driver will ignore "top-id" parameter in Primary mode. > > This is not good behaviour, which is why I requested a change. > Hi stefan Would you like me send another [PATCH v25] based your block-next? Or a separate patch until your tree is merged. Thanks -Xie > Kevin > >>> given there. >>> >>>> +# >>>> +# Since: 2.8 >>>> +## >>>> +{ 'struct': 'BlockdevOptionsReplication', >>>> + 'base': 'BlockdevOptionsGenericFormat', >>>> + 'data': { 'mode': 'ReplicationMode', >>>> + '*top-id': 'str' } } >>> >>> Kevin > > > . >
On Mon, Aug 15, 2016 at 05:32:19PM +0800, Changlong Xie wrote: > On 08/15/2016 04:37 PM, Kevin Wolf wrote: > > Am 15.08.2016 um 03:49 hat Changlong Xie geschrieben: > > > On 08/09/2016 05:08 PM, Kevin Wolf wrote: > > > > Am 27.07.2016 um 09:01 hat Changlong Xie geschrieben: > > > > > From: Wen Congyang <wency@cn.fujitsu.com> > > > > > > > > > > Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> > > > > > Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> > > > > > Signed-off-by: Wang WeiWei <wangww.fnst@cn.fujitsu.com> > > > > > Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> > > > > > Signed-off-by: Gonglei <arei.gonglei@huawei.com> > > > > > Reviewed-by: Eric Blake <eblake@redhat.com> > > > > > > > > > @@ -2078,6 +2079,23 @@ > > > > > { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] } > > > > > > > > > > ## > > > > > +# @BlockdevOptionsReplication > > > > > +# > > > > > +# Driver specific block device options for replication > > > > > +# > > > > > +# @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. > > > > > > > > Can we change this to "Must not be given in primary mode"? Not sure what > > > > the code currently does, but I think it should error out if top-id is > > > > > > Replication driver will ignore "top-id" parameter in Primary mode. > > > > This is not good behaviour, which is why I requested a change. > > > > Hi stefan > > Would you like me send another [PATCH v25] based your block-next? Or a > separate patch until your tree is merged. Sorry for the slow response. Please send a new patch on top of my block-next tree. Stefan
在 2016年09月12日 22:01, Stefan Hajnoczi 写道: > On Mon, Aug 15, 2016 at 05:32:19PM +0800, Changlong Xie wrote: >> On 08/15/2016 04:37 PM, Kevin Wolf wrote: >>> Am 15.08.2016 um 03:49 hat Changlong Xie geschrieben: >>>> On 08/09/2016 05:08 PM, Kevin Wolf wrote: >>>>> Am 27.07.2016 um 09:01 hat Changlong Xie geschrieben: >>>>>> From: Wen Congyang <wency@cn.fujitsu.com> >>>>>> >>>>>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> >>>>>> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> >>>>>> Signed-off-by: Wang WeiWei <wangww.fnst@cn.fujitsu.com> >>>>>> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> >>>>>> Signed-off-by: Gonglei <arei.gonglei@huawei.com> >>>>>> Reviewed-by: Eric Blake <eblake@redhat.com> >>>>> >>>>>> @@ -2078,6 +2079,23 @@ >>>>>> { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] } >>>>>> >>>>>> ## >>>>>> +# @BlockdevOptionsReplication >>>>>> +# >>>>>> +# Driver specific block device options for replication >>>>>> +# >>>>>> +# @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. >>>>> >>>>> Can we change this to "Must not be given in primary mode"? Not sure what >>>>> the code currently does, but I think it should error out if top-id is >>>> >>>> Replication driver will ignore "top-id" parameter in Primary mode. >>> >>> This is not good behaviour, which is why I requested a change. >>> >> >> Hi stefan >> >> Would you like me send another [PATCH v25] based your block-next? Or a >> separate patch until your tree is merged. > > Sorry for the slow response. Please send a new patch on top of my > block-next tree. > > Stefan > ok, I will send a new patch on the top of block-next tree.
diff --git a/qapi/block-core.json b/qapi/block-core.json index 8c250ec..aadc75a 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -248,6 +248,7 @@ # 2.3: 'host_floppy' deprecated # 2.5: 'host_floppy' dropped # 2.6: 'luks' added +# 2.8: 'replication' added # # @backing_file: #optional the name of the backing file (for copy-on-write) # @@ -1671,8 +1672,8 @@ 'data': [ 'archipelago', 'blkdebug', 'blkverify', 'bochs', 'cloop', 'dmg', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device', 'http', 'https', 'luks', 'null-aio', 'null-co', 'parallels', - 'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'tftp', 'vdi', 'vhdx', - 'vmdk', 'vpc', 'vvfat' ] } + 'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'replication', 'tftp', + 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat' ] } ## # @BlockdevOptionsFile @@ -2078,6 +2079,23 @@ { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] } ## +# @BlockdevOptionsReplication +# +# Driver specific block device options for replication +# +# @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. +# +# Since: 2.8 +## +{ 'struct': 'BlockdevOptionsReplication', + 'base': 'BlockdevOptionsGenericFormat', + 'data': { 'mode': 'ReplicationMode', + '*top-id': 'str' } } + +## # @BlockdevOptions # # Options for creating a block device. Many options are available for all @@ -2142,6 +2160,7 @@ 'quorum': 'BlockdevOptionsQuorum', 'raw': 'BlockdevOptionsGenericFormat', # TODO rbd: Wait for structured options + 'replication':'BlockdevOptionsReplication', # TODO sheepdog: Wait for structured options # TODO ssh: Should take InetSocketAddress for 'host'? 'tftp': 'BlockdevOptionsFile',