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

Re: [Xen-devel] [PATCH v6 16/18] xen: automatically create XenBlockDevice-s



On Wed, Dec 19, 2018 at 12:43:24PM +0000, Paul Durrant wrote:
> > Kevin seems to say that this could be done without the _flat_confused
> > version. The flat_confused version seems to be useful just because
> > the key "cache.direct" is used earlier, and because everything in qdict
> > is a string.
> 
> It could be, but there's a good reason for wanting everything as a string, 
> and that is so that I can do a qdict_iter to generate my trace message. Also 
> I really don't want to get too elaborate here... this is supposed to be 
> mimicking what would normally come via a json blob, and that would start out 
> as strings.

Mimic JSON ? Not really. JSON has types. If the toolstack wanted
cache.direct or read-only option on a blockdev, it will need to use the
bool type as string type will be rejected.  The expected types when
issuing a QMP request can be found in "qapi/block-core.json", for the
command "blockdev-add".

Also, there is a comment on the qobject_input_visitor_new_flat_confused
function, it reads:
    The block subsystem uses this function to visit its flat QDict with
    possibly confused scalar types.  It should not be used for anything
    else, and it should go away once the block subsystem has been
    cleaned up.

We might as well avoid using it right now, as it's easy to do so.

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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