diff mbox

[15/16] support replication driver in blockdev-add

Message ID 1441183880-26993-16-git-send-email-wency@cn.fujitsu.com
State New
Headers show

Commit Message

Wen Congyang Sept. 2, 2015, 8:51 a.m. UTC
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
 qapi/block-core.json | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

Comments

Eric Blake Sept. 2, 2015, 4:36 p.m. UTC | #1
On 09/02/2015 02:51 AM, Wen Congyang wrote:
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> ---
>  qapi/block-core.json | 18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 96f0530..86275e3 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -1383,7 +1383,7 @@
>              'dmg', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
>              'host_floppy', 'http', 'https', 'null-aio', 'null-co', 'parallels',
>              'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'tftp', 'vdi', 'vhdx',
> -            'vmdk', 'vpc', 'vvfat', 'nbd' ] }
> +            'vmdk', 'vpc', 'vvfat', 'nbd', 'replication' ] }

'nbd' is not in the current qemu.git; which means your patch series
depends on a prerequisite series.  Please mention that sort of
information in your cover letter.

Please keep this enum in alphabetical order.

Missing documentation under @drv of BlockDeviceInfo that this was
introduced in 2.5.

>  
>  ##
>  # @BlockdevOptionsBase
> @@ -1825,6 +1825,19 @@
>  { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] }
>  
>  ##
> +# @BlockdevOptionsReplication
> +#
> +# Driver specific block device options for replication
> +#
> +# @mode: the replication mode

Can the mode be 'unprotected', or must it be 'primary' or 'secondary'
when first creating a replication BDS?

> +#
> +# Since: 2.5
> +##
> +{ 'struct': 'BlockdevOptionsReplication',
> +  'base': 'BlockdevOptionsGenericFormat',
> +  'data': { 'mode': 'ReplicationMode'  } }
> +
> +##
>  # @BlockdevOptions
>  #
>  # Options for creating a block device.
> @@ -1869,7 +1882,8 @@
>        'vhdx':       'BlockdevOptionsGenericFormat',
>        'vmdk':       'BlockdevOptionsGenericCOWFormat',
>        'vpc':        'BlockdevOptionsGenericFormat',
> -      'vvfat':      'BlockdevOptionsVVFAT'
> +      'vvfat':      'BlockdevOptionsVVFAT',
> +      'replication':'BlockdevOptionsReplication'
>    } }

It helps to keep this alphabetical.
Wen Congyang Sept. 9, 2015, 8:27 a.m. UTC | #2
On 09/03/2015 12:36 AM, Eric Blake wrote:
> On 09/02/2015 02:51 AM, Wen Congyang wrote:
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>> ---
>>  qapi/block-core.json | 18 ++++++++++++++++--
>>  1 file changed, 16 insertions(+), 2 deletions(-)
>>
>> diff --git a/qapi/block-core.json b/qapi/block-core.json
>> index 96f0530..86275e3 100644
>> --- a/qapi/block-core.json
>> +++ b/qapi/block-core.json
>> @@ -1383,7 +1383,7 @@
>>              'dmg', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
>>              'host_floppy', 'http', 'https', 'null-aio', 'null-co', 'parallels',
>>              'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'tftp', 'vdi', 'vhdx',
>> -            'vmdk', 'vpc', 'vvfat', 'nbd' ] }
>> +            'vmdk', 'vpc', 'vvfat', 'nbd', 'replication' ] }
> 
> 'nbd' is not in the current qemu.git; which means your patch series
> depends on a prerequisite series.  Please mention that sort of
> information in your cover letter.
> 
> Please keep this enum in alphabetical order.
> 
> Missing documentation under @drv of BlockDeviceInfo that this was
> introduced in 2.5.

OK

> 
>>  
>>  ##
>>  # @BlockdevOptionsBase
>> @@ -1825,6 +1825,19 @@
>>  { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] }
>>  
>>  ##
>> +# @BlockdevOptionsReplication
>> +#
>> +# Driver specific block device options for replication
>> +#
>> +# @mode: the replication mode
> 
> Can the mode be 'unprotected', or must it be 'primary' or 'secondary'
> when first creating a replication BDS?

I will check it, and fix it in the next version.

> 
>> +#
>> +# Since: 2.5
>> +##
>> +{ 'struct': 'BlockdevOptionsReplication',
>> +  'base': 'BlockdevOptionsGenericFormat',
>> +  'data': { 'mode': 'ReplicationMode'  } }
>> +
>> +##
>>  # @BlockdevOptions
>>  #
>>  # Options for creating a block device.
>> @@ -1869,7 +1882,8 @@
>>        'vhdx':       'BlockdevOptionsGenericFormat',
>>        'vmdk':       'BlockdevOptionsGenericCOWFormat',
>>        'vpc':        'BlockdevOptionsGenericFormat',
>> -      'vvfat':      'BlockdevOptionsVVFAT'
>> +      'vvfat':      'BlockdevOptionsVVFAT',
>> +      'replication':'BlockdevOptionsReplication'
>>    } }
> 
> It helps to keep this alphabetical.
> 

OK

Thanks
Wen Congyang
diff mbox

Patch

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 96f0530..86275e3 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1383,7 +1383,7 @@ 
             'dmg', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
             'host_floppy', 'http', 'https', 'null-aio', 'null-co', 'parallels',
             'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'tftp', 'vdi', 'vhdx',
-            'vmdk', 'vpc', 'vvfat', 'nbd' ] }
+            'vmdk', 'vpc', 'vvfat', 'nbd', 'replication' ] }
 
 ##
 # @BlockdevOptionsBase
@@ -1825,6 +1825,19 @@ 
 { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ] }
 
 ##
+# @BlockdevOptionsReplication
+#
+# Driver specific block device options for replication
+#
+# @mode: the replication mode
+#
+# Since: 2.5
+##
+{ 'struct': 'BlockdevOptionsReplication',
+  'base': 'BlockdevOptionsGenericFormat',
+  'data': { 'mode': 'ReplicationMode'  } }
+
+##
 # @BlockdevOptions
 #
 # Options for creating a block device.
@@ -1869,7 +1882,8 @@ 
       'vhdx':       'BlockdevOptionsGenericFormat',
       'vmdk':       'BlockdevOptionsGenericCOWFormat',
       'vpc':        'BlockdevOptionsGenericFormat',
-      'vvfat':      'BlockdevOptionsVVFAT'
+      'vvfat':      'BlockdevOptionsVVFAT',
+      'replication':'BlockdevOptionsReplication'
   } }
 
 ##