All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 00/11] qapi changes in preparation for blockdev-add
@ 2013-07-09  9:53 Kevin Wolf
  2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 01/11] qapi-types.py: Split off generate_struct_fields() Kevin Wolf
                   ` (11 more replies)
  0 siblings, 12 replies; 32+ messages in thread
From: Kevin Wolf @ 2013-07-09  9:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, armbru, stefanha, lcapitulino

The goal of this series is to make QAPI ready to handle mostly unions in a less
verbose way so that a future -blockdev command line option can be a
direct mapping of the structure used by a blockdev-add QMP command. This
series implements everything that I think is needed for this on the QAPI
side. The block layer side is still lacking, but good enough that I
could actually add a block device using the new command; the problem is
here mostly that many -drive options aren't supported yet.

To give you an idea of what the interface looks like in the end, this is
what you can pass now in theory (the block layer just won't like the
read-only option and error out...):

{ "execute": "blockdev-add",
  "arguments": {
      "options": {
        "driver": "qcow2",
        "read-only": true,
        "lazy-refcounts": true,
        "file": {
            "driver": "file",
            "read-only": false,
            "filename": "/home/kwolf/images/hd.img"
        }
      }
    }
  }

Kevin Wolf (11):
  qapi-types.py: Split off generate_struct_fields()
  qapi-types.py: Implement 'base' for unions
  qapi-visit.py: Split off generate_visit_struct_fields()
  qapi-visit.py: Implement 'base' for unions
  qapi: Add visitor for implicit structs
  qapi: Flat unions with arbitrary discriminator
  qapi: Add consume argument to qmp_input_get_object()
  qapi: Anonymous unions
  Implement qdict_flatten()
  block: Allow "driver" option on the top level
  [WIP] block: Implement 'blockdev-add' QMP command

 block.c                     |   7 ++
 blockdev.c                  |  52 ++++++++++---
 include/qapi/qmp/qdict.h    |   1 +
 include/qapi/qmp/qobject.h  |   1 +
 include/qapi/visitor-impl.h |   6 ++
 include/qapi/visitor.h      |   6 ++
 qapi-schema.json            |  29 +++++++
 qapi/qapi-visit-core.c      |  25 +++++++
 qapi/qmp-input-visitor.c    |  47 +++++++++---
 qmp-commands.hx             |   6 ++
 qobject/qdict.c             |  47 ++++++++++++
 qobject/qjson.c             |   2 +
 scripts/qapi-types.py       |  83 ++++++++++++++++++--
 scripts/qapi-visit.py       | 179 ++++++++++++++++++++++++++++++++++++--------
 scripts/qapi.py             |  28 +++++++
 15 files changed, 459 insertions(+), 60 deletions(-)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2013-07-16  8:59 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-09  9:53 [Qemu-devel] [RFC PATCH 00/11] qapi changes in preparation for blockdev-add Kevin Wolf
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 01/11] qapi-types.py: Split off generate_struct_fields() Kevin Wolf
2013-07-11 11:45   ` Eric Blake
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 02/11] qapi-types.py: Implement 'base' for unions Kevin Wolf
2013-07-11 11:57   ` Eric Blake
2013-07-11 12:46     ` Eric Blake
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 03/11] qapi-visit.py: Split off generate_visit_struct_fields() Kevin Wolf
2013-07-11 12:18   ` Eric Blake
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 04/11] qapi-visit.py: Implement 'base' for unions Kevin Wolf
2013-07-11 12:21   ` Eric Blake
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 05/11] qapi: Add visitor for implicit structs Kevin Wolf
2013-07-11 12:41   ` Eric Blake
2013-07-11 12:51     ` Eric Blake
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 06/11] qapi: Flat unions with arbitrary discriminator Kevin Wolf
2013-07-11 14:16   ` Eric Blake
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 07/11] qapi: Add consume argument to qmp_input_get_object() Kevin Wolf
2013-07-11 19:17   ` Eric Blake
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 08/11] qapi: Anonymous unions Kevin Wolf
2013-07-11 19:47   ` Eric Blake
2013-07-12  8:55     ` Kevin Wolf
2013-07-12 14:15       ` Eric Blake
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 09/11] Implement qdict_flatten() Kevin Wolf
2013-07-11 20:25   ` Eric Blake
2013-07-16  8:59     ` Kevin Wolf
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 10/11] block: Allow "driver" option on the top level Kevin Wolf
2013-07-11 22:30   ` Eric Blake
2013-07-09  9:53 ` [Qemu-devel] [RFC PATCH 11/11] [WIP] block: Implement 'blockdev-add' QMP command Kevin Wolf
2013-07-11 22:45   ` Eric Blake
2013-07-12  9:40     ` Kevin Wolf
2013-07-12 14:27       ` Eric Blake
2013-07-12  9:55 ` [Qemu-devel] [RFC PATCH 00/11] qapi changes in preparation for blockdev-add Laszlo Ersek
2013-07-12 10:53   ` Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.