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

Re: [Xen-devel] [PATCH V3] libxl: write IO ABI for disk frontends



On Fri, 2013-04-26 at 11:11 +0100, Wei Liu wrote:
> On Fri, Apr 26, 2013 at 10:52:35AM +0100, Ian Campbell wrote:
> [...]
> > > > > +                flexarray_append(front, p);
> > > > 
> > > > GCSPRINTF would be the right way to do this, but actually you can pass
> > > > protocol directly to flexarray_append, that is fine since the flexarray
> > > > never frees the values which it contains so they either need to be gc'd,
> > > > string constants or managed manually.
> > > > 
> > > 
> > > Oh thanks for the hint. This saves serveral lines of code. The (void *)
> > > argument of flexarray_append misled me. ;-)
> > > 
> > > Below is updated version of the patch. Casting "protocol" to (void *) is
> > > necessary to have it compiled. Otherwise gcc complains we discard the
> > > const quilifier.
> > 
> > Oh, sorry, if this is the case the libxl__strdup(gc,protocol) is better
> > than the cast. Sorry for misleading :-(
> > 
> > Now you mention it I do seem to recall trying to correctly constify
> > flexarray's at one point and not quite being able to make it work.
> > 
> 
> Another version with libxl__strdup(). :-)

Thanks!

George, this is on your tracking list and is a bug fix and/or a
regression from Xend. Are you happy to give it a freeze exception?

> -------8<--------
> commit 60bfc42e4e4f5e0f7f025e4e67b32c61fef396d4
> Author: Wei Liu <wei.liu2@xxxxxxxxxx>
> Date:   Wed Apr 24 19:00:01 2013 +0100
> 
>     libxl: write IO ABI for disk frontends
>     
>     This is a patch to forward-port a Xend behaviour. Xend writes IO ABI used 
> for
>     all frontends. Blkfront before 2.6.26 relies on this behaviour otherwise 
> guest
>     cannot boot when running in 32-on-64 mode. Blkfront after 2.6.26 writes 
> that
>     node itself, in which case it's just an overwrite to an existing node 
> which
>     should be OK.
>     
>     In fact Xend writes the ABI for all frontends including console and vif. 
> But
>     nowadays only old disk frontends rely on that behaviour so that we only 
> write
>     the ABI for disk frontends in libxl, minimizing the impact.
>     
>     Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
>     Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.