qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3] block: Introduce "null" driver


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v3] block: Introduce "null" driver
Date: Thu, 28 Aug 2014 09:52:32 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

On 08/28/2014 09:22 AM, Benoît Canet wrote:
> The Thursday 28 Aug 2014 à 13:53:11 (+0800), Fam Zheng wrote :
>> This is an analogue to Linux null_blk. It can be used for testing block
>> device emulation and general block layer functionalities such as
>> coroutines and throttling, where disk IO is not necessary or wanted.
>>
>> Use null:// for AIO version, and null-co:// for coroutine version.
>>

>> +++ b/qapi/block-core.json
>> @@ -1150,7 +1150,8 @@
>>    'data': [ 'archipelago', 'file', 'host_device', 'host_cdrom', 
>> 'host_floppy',
>>              'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'blkdebug',
>>              'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels', 
>> 'qcow',
>> -            'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum' ] 
>> }
>> +            'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum',
>> +            'null' ] }
> 
> Why not also adding null-co to QMP ?

Or have just one driver 'null', but...

> 
>>  
>>  ##
>>  # @BlockdevOptionsBase
>> @@ -1203,6 +1204,19 @@
>>    'data': { 'filename': 'str' } }
>>  
>>  ##
>> +# @BlockdevOptionsNull
>> +#
>> +# Driver specific block device options for the null backend.
>> +#
>> +# @size:    size of the device in bytes.
>> +#
>> +# Since: 2.2
>> +##
>> +{ 'type': 'BlockdevOptionsNull',
>> +  'base': 'BlockdevOptionsFile',
>> +  'data': { '*size': 'int' } }

have a '*coroutine':'bool' flag here that chooses between the null: and
the null-co: protocol.  (I suspect we would do the same when finaly
adding gluster to BlockdevOptions: rather than having 'gluster+tcp' and
'gluster+udp', it would be a single 'gluster' element that can then
select transport of tcp vs. udp as an option).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]