[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
- Re: [Qemu-devel] [PATCH 10/17] block: define get_block_status return value, (continued)
[Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand, Paolo Bonzini, 2013/07/03
Re: [Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand, Stefan Hajnoczi, 2013/07/15
Re: [Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand, Eric Blake, 2013/07/18
[Qemu-devel] [PATCH 11/17] block: return get_block_status data and flags for formats, Paolo Bonzini, 2013/07/03
[Qemu-devel] [PATCH 14/17] raw-posix: return get_block_status data and flags, Paolo Bonzini, 2013/07/03
[Qemu-devel] [PATCH 13/17] block: use bdrv_has_zero_init to return BDRV_BLOCK_ZERO, Paolo Bonzini, 2013/07/03
[Qemu-devel] [PATCH 15/17] raw-posix: detect XFS unwritten extents, Paolo Bonzini, 2013/07/03
[Qemu-devel] [PATCH 16/17] block: add default get_block_status implementation for protocols, Paolo Bonzini, 2013/07/03