qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v25 11/31] change block layer to support both Qe


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v25 11/31] change block layer to support both QemuOpts and QEMUOptionParamter
Date: Fri, 25 Apr 2014 15:36:52 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Apr 21, 2014 at 05:17:50PM -0600, Eric Blake wrote:
> On 04/10/2014 11:54 AM, Chunyan Liu wrote:
> > Change block layer to support both QemuOpts and QEMUOptionParameter.
> > After this patch, it will change backend drivers one by one. At the end,
> > QEMUOptionParameter will be removed and only QemuOpts is kept.
> > 
> > Signed-off-by: Dong Xu Wang <address@hidden>
> > Signed-off-by: Chunyan Liu <address@hidden>
> > ---
> 
> > @@ -419,8 +420,27 @@ static void coroutine_fn bdrv_create_co_entry(void 
> > *opaque)
> >  
> >      CreateCo *cco = opaque;
> 
> > +    if (cco->drv->bdrv_create2) {
> > +        QemuOptsList *opts_list = NULL;
> > +        QemuOpts *opts = NULL;
> > +        if (!cco->opts) {
> 
> Isn't your conversion pair-wise per driver, in that you always pair
> bdrv_create2 with options, and bdrv_create with opts?  That is, won't
> cco->opts always be false if cco->drv->bdrv_create2 is non-NULL, since
> we already guaranteed that there is at most one of the two creation
> function callbacks defined?  Maybe you have a missing assertion at the
> point where the callbacks are registered? [1]

I think you're right but not sure it's worth changing since this is
temporary code that gets removed later in the patch series anyway.

Stefan



reply via email to

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