qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand
Date: Fri, 19 Jul 2013 12:48:31 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jul 18, 2013 at 02:04:31PM -0600, Eric Blake wrote:
> On 07/03/2013 08:34 AM, Paolo Bonzini wrote:
> > This command dumps the metadata of an entire chain, in either tabular or 
> > JSON
> > format.
> > 
> > Signed-off-by: Paolo Bonzini <address@hidden>
> > ---
> >  qemu-img-cmds.hx |   6 ++
> >  qemu-img.c       | 186 
> > +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 192 insertions(+)
> > 
> 
> > +    case OFORMAT_JSON:
> > +        printf("%s{ 'depth': %d, 'start': %lld, 'length': %lld, "
> > +               "'zero': %s, 'data': %s",
> > +               (e->start == 0 ? "[" : ",\n"),
> > +               e->depth, (long long) e->start, (long long) e->length,
> > +               (e->flags & BDRV_BLOCK_ZERO) ? "true" : "false",
> > +               (e->flags & BDRV_BLOCK_DATA) ? "true" : "false");
> > +        if (e->flags & BDRV_BLOCK_OFFSET_VALID) {
> > +            printf(", 'offset': %lld", (long long) e->offset);
> > +        }
> > +   putchar('}');
> 
> Can we please get this format documented in qapi-schema.json, even if we
> aren't using qapi to generate it yet?

Paolo: Please send a follow-up patch documenting the json schema, I've
already merged this series.

I was although thinking about qemu-iotests for qemu-img map, but it's
tricky since the allocation is an internal detail of the image format.
Perhaps a test case using raw?

Stefan



reply via email to

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