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 16:15:57 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

On 08/28/2014 01:42 PM, Paolo Bonzini wrote:
> Il 28/08/2014 17:52, Eric Blake ha scritto:
>> 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).
> 
> I'm not sure it's possible in the case of null, since the two
> BlockDriver structs have different function pointers.  Instead, gluster
> has the same function pointers and just multiple names to trigger the
> parsing of all the URI schemes.

But why can't you write a single driver, where each function in the
driver then bases a decision between one of the two original functions
based on the configuration?  Is it a case where the set of callback
functions differs with one driver having a NULL callback where the other
does not, and where the presence or absence of the NULL callback
actually matters to the point of requiring two drivers?

-- 
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]