Skip to content

RFC Expand 'qemu-img info' to show protocol details

Eric Blake qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3block: Expose protocol-specific data to 'qemu-img info'block/qapi.c qapi/block-core.json+12 -13 replies
2/3file: Expose some protocol-specific informationblock/file-posix.c qapi/block-core.json+44 -12 replies
3/3RFC: nbd: Expose protocol-specific informationblock/nbd-client.c block/nbd-client.h block/nbd.c +1 more+101 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RFC PATCH 0/3] Expand 'qemu-img info' to show protocol details

Posting this now to get feedback on the general idea; it would still need to be polished into a form I'd feel happy committing, including reworking 'qemu-nbd --list' to reuse the new NBD-specific QAPI type.

Based-on: <[email protected]> [0/19 nbd: add qemu-nbd --list]

Examples with this applied:

$ ./qemu-img info file
image: file
file format: qcow2
virtual size: 1.0M (1048576 bytes)
disk size: 672K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
Protocol specific information:
    write zero: true
    discard zero: true
    discard: true
    align: 1
$ qemu-nbd file &
$ ./qemu-img info nbd://localhost:10809
image: nbd://localhost:10809
file format: raw
virtual size: 1.0M (1048576 bytes)
disk size: unavailable
Protocol specific information:
    flags:
    active contexts:
        [0]:
            name: base:allocation
            id: 0
    unknown flags: 1260

Eric Blake (3):
block: Expose protocol-specific data to 'qemu-img info'
file: Expose some protocol-specific information
RFC: nbd: Expose protocol-specific information

 qapi/block-core.json | 87 +++++++++++++++++++++++++++++++++++++++++++-
 block/nbd-client.h   |  1 +
 block/file-posix.c   | 21 +++++++++++
 block/nbd-client.c   | 39 ++++++++++++++++++++
 block/nbd.c          |  3 ++
 block/qapi.c         |  7 ++++
 6 files changed, 156 insertions(+), 2 deletions(-)
Signature · 1 line
2.20.1