qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: eblake@redhat.com, berrange@redhat.com, kwolf@redhat.com,
	mreitz@redhat.com, qemu-block@nongnu.org, quintela@redhat.com,
	dgilbert@redhat.com
Subject: [Qemu-devel] [PATCH v2 00/10] Correct two minor QMP interface design flaws
Date: Thu, 20 Jul 2017 09:53:31 +0200	[thread overview]
Message-ID: <1500537221-20556-1-git-send-email-armbru@redhat.com> (raw)

blockdev-add and migrate-set-parameters overload empty strings to mean
something entirely different.  See my memo "qapi: Stop abusing
"special" values for something entirely different" for details.

    Message-ID: <87379zhrhn.fsf@dusky.pond.sub.org>
    https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg04526.html

This series deprecates these usages of "" in favour of JSON null.
Because we're so close to the 2.10 freeze, the implementation is
intentionally stupid: rewrite null to "" at first opportunity.  The
proper way to do it would be rewriting "" to null, but that requires
fixing up code to work with null.  There are TODO comments for that.
I'm willing to take care of them in the next development cycle.

v2, because my pull request clashed with Juan's:
* Rebased, non-trivial conflicts in migration/migration.c
* PATCH 02: Commit message typo [Eric]
  	    Fix ppc [patchew]
* PATCH 03: qapi-code-gen.txt update [Eric]
* PATCH 09: Conflict resolution, somewhat ugly
* PATCH 10: Doc improvement [Eric]
  	    Conflict resolution

Markus Armbruster (10):
  qapi: Separate type QNull from QObject
  qapi: Use QNull for a more regular visit_type_null()
  qapi: Introduce a first class 'null' type
  tests/test-qobject-input-visitor: Drop redundant test
  block: Use JSON null instead of "" to disable backing file
  hmp: Clean up and simplify hmp_migrate_set_parameter()
  migration: Clean up around tls_creds, tls_hostname
  migration: Add TODO comments on duplication of QAPI_CLONE()
  migration: Unshare MigrationParameters struct for now
  migration: Use JSON null instead of "" to reset parameter to default

 blockdev.c                              |  14 +++++
 docs/devel/qapi-code-gen.txt            |  10 +--
 hmp.c                                   |  88 ++++++++++++--------------
 hw/ppc/spapr_drc.c                      |   4 +-
 include/qapi/qmp/qobject.h              |  10 ++-
 include/qapi/visitor-impl.h             |   3 +-
 include/qapi/visitor.h                  |   8 +--
 include/qemu/typedefs.h                 |   1 +
 migration/migration.c                   |  96 +++++++++++++++++++++++++---
 qapi-schema.json                        | 108 ++++++++++++++++++++++++++++----
 qapi/block-core.json                    |  29 ++++++---
 qapi/qapi-clone-visitor.c               |   5 +-
 qapi/qapi-dealloc-visitor.c             |   6 +-
 qapi/qapi-visit-core.c                  |   7 ++-
 qapi/qobject-input-visitor.c            |   6 +-
 qapi/qobject-output-visitor.c           |   5 +-
 qapi/string-input-visitor.c             |   8 ++-
 qapi/string-output-visitor.c            |   3 +-
 qapi/trace-events                       |   2 +-
 qobject/json-parser.c                   |   2 +-
 qobject/qnull.c                         |   8 ++-
 scripts/qapi.py                         |   5 +-
 target/i386/cpu.c                       |   4 +-
 target/ppc/translate_init.c             |   5 +-
 tests/check-qjson.c                     |   6 +-
 tests/check-qnull.c                     |  27 ++++----
 tests/qapi-schema/qapi-schema-test.json |   3 +-
 tests/qapi-schema/qapi-schema-test.out  |   1 +
 tests/qemu-iotests/085                  |   2 +-
 tests/qemu-iotests/139                  |   2 +-
 tests/test-qobject-input-visitor.c      |  24 ++++---
 tests/test-qobject-output-visitor.c     |  13 +++-
 32 files changed, 378 insertions(+), 137 deletions(-)

-- 
2.7.5

             reply	other threads:[~2017-07-20  7:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20  7:53 Markus Armbruster [this message]
2017-07-20  7:53 ` [Qemu-devel] [PATCH v2 01/10] qapi: Separate type QNull from QObject Markus Armbruster
2017-07-20  7:53 ` [Qemu-devel] [PATCH v2 02/10] qapi: Use QNull for a more regular visit_type_null() Markus Armbruster
2017-07-20  7:53 ` [Qemu-devel] [PATCH v2 03/10] qapi: Introduce a first class 'null' type Markus Armbruster
2017-07-20  7:53 ` [Qemu-devel] [PATCH v2 04/10] tests/test-qobject-input-visitor: Drop redundant test Markus Armbruster
2017-07-20  7:53 ` [Qemu-devel] [PATCH v2 05/10] block: Use JSON null instead of "" to disable backing file Markus Armbruster
2017-07-20  7:53 ` [Qemu-devel] [PATCH v2 06/10] hmp: Clean up and simplify hmp_migrate_set_parameter() Markus Armbruster
2017-07-20  7:53 ` [Qemu-devel] [PATCH v2 07/10] migration: Clean up around tls_creds, tls_hostname Markus Armbruster
2017-07-20  7:53 ` [Qemu-devel] [PATCH v2 08/10] migration: Add TODO comments on duplication of QAPI_CLONE() Markus Armbruster
2017-07-20  7:53 ` [Qemu-devel] [PATCH v2 09/10] migration: Unshare MigrationParameters struct for now Markus Armbruster
2017-07-20  7:53 ` [Qemu-devel] [PATCH v2 10/10] migration: Use JSON null instead of "" to reset parameter to default Markus Armbruster
2017-08-16 21:34 ` [Qemu-devel] [Qemu-block] [PATCH v2 00/10] Correct two minor QMP interface design flaws John Snow
2017-08-16 21:41   ` Eric Blake
2017-08-16 21:42     ` John Snow
2017-08-17  4:53   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500537221-20556-1-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).