All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Benoît Canet" <benoit.canet@irqsave.net>,
	"Fam Zheng" <famz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3] block: Introduce "null" driver
Date: Thu, 28 Aug 2014 16:15:57 -0600	[thread overview]
Message-ID: <53FFAA1D.8020505@redhat.com> (raw)
In-Reply-To: <53FF8621.3040201@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

  reply	other threads:[~2014-08-28 22:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28  5:53 [Qemu-devel] [PATCH v3] block: Introduce "null" driver Fam Zheng
2014-08-28 15:22 ` Benoît Canet
2014-08-28 15:52   ` Eric Blake
2014-08-28 19:42     ` Paolo Bonzini
2014-08-28 22:15       ` Eric Blake [this message]
2014-08-28 22:21         ` Eric Blake
2014-08-29  0:45   ` Fam Zheng
2014-08-28 22:23 ` Eric Blake
2014-08-29  0:55   ` Fam Zheng
2014-08-29  6:48     ` Markus Armbruster
2014-09-03 11:10     ` Kevin Wolf
2014-09-03 12:34       ` Eric Blake
2014-09-03 12:48         ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53FFAA1D.8020505@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=benoit.canet@irqsave.net \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.