qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 0/6] Stable output of blockdev format specifi


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 0/6] Stable output of blockdev format specific info
Date: Tue, 13 Sep 2016 15:44:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

"Daniel P. Berrange" <address@hidden> writes:

> This is an update of the bits of this previous
> series which were not merged
>
>   https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg01723.html
>
> The problem addressed in this series is that the
> 'qemu-img info' command does not have a stable
> output format for the image specific info objects.
>
> The QAPI types are first converted to QDicts,
> and then printed with custom code to recurse over
> the QDicts. This causes information about the object
> field ordering to be thrown away, and fields are
> printed in whatever order they appear in the QDict
> hash buckets. This is not a big deal historically
> since none of the image formats had nested data
> structures, but with the LUKS blockdev this style
> of random ordering looks very unpleasant.

QDict could be changed to support iteration in insertion order.

> To address this, the patch series introduces a
> TextOutputVisitor class that is designed to be
> able to print out arbitrarily nested QAPI types
> directly,

What order does it use?

>           in a format that is identical to that
> currently used with 'qemu-img info'. Consult
> the patch in question to actually see the output
> format, and compare test-string-output-visitor.c
> with test-text-output-visitor.c to see how we
> really do have 2 completely distinct output formats
> that don't share any significant characteristics
> beyond both being "plain text".

I haven't done that, yet, but I take your word for it.  Begs the
question whether we really *need* two different output formats!  I guess
we better discuss that in the context of the patch, where we can
actually see the formats.



reply via email to

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