qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.12 0/3] block: Handle null backing link
@ 2017-11-10 22:13 Max Reitz
  2017-11-10 22:13 ` [Qemu-devel] [PATCH for-2.12 1/3] qapi: Add qdict_is_null() Max Reitz
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Max Reitz @ 2017-11-10 22:13 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Markus Armbruster, Kevin Wolf

Currently, we try to rewrite every occurrence of "backing": null into
"backing": "" in qmp_blockdev_add().  However, that breaks using the
same "backing": null construction in json:{} file names (which do not go
through qmp_blockdev_add()).  Currently, these then just behave as if
the option has not been specified.

Since there is actually only one place where we evaluate the @backing
option to find out whether not to use a backing file, we can instead
just check for null there.  It doesn't matter that this changes the
runtime state of the option from "" to null, because nobody really does
anything with that runtime state anyway (except put it into qemu again,
but qemu doesn't care whether it's "" or null).

And in the future, it's much better if we get it to be null in that
runtime state sooner than later -- see patch 3. :-)


Max Reitz (3):
  qapi: Add qdict_is_null()
  block: Handle null backing link
  block: Deprecate "backing": ""

 qapi/block-core.json       |  4 ++--
 include/qapi/qmp/qdict.h   |  1 +
 block.c                    |  6 +++++-
 blockdev.c                 | 14 --------------
 qobject/qdict.c            | 10 ++++++++++
 qemu-doc.texi              |  7 +++++++
 qemu-options.hx            |  4 ++--
 tests/qemu-iotests/089     | 20 ++++++++++++++++++++
 tests/qemu-iotests/089.out |  8 ++++++++
 9 files changed, 55 insertions(+), 19 deletions(-)

-- 
2.13.6

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

end of thread, other threads:[~2017-11-15  6:51 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-10 22:13 [Qemu-devel] [PATCH for-2.12 0/3] block: Handle null backing link Max Reitz
2017-11-10 22:13 ` [Qemu-devel] [PATCH for-2.12 1/3] qapi: Add qdict_is_null() Max Reitz
2017-11-10 22:19   ` Eric Blake
2017-11-14 14:07   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2017-11-14 14:15     ` Max Reitz
2017-11-14 14:57   ` [Qemu-devel] " Markus Armbruster
2017-11-14 14:59     ` Max Reitz
2017-11-15  6:51       ` Markus Armbruster
2017-11-10 22:13 ` [Qemu-devel] [PATCH for-2.12 2/3] block: Handle null backing link Max Reitz
2017-11-10 22:22   ` Eric Blake
2017-11-10 22:26     ` Max Reitz
2017-11-14 14:06   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2017-11-14 15:17   ` [Qemu-devel] " Markus Armbruster
2017-11-14 15:19     ` Max Reitz
2017-11-10 22:13 ` [Qemu-devel] [PATCH for-2.12 3/3] block: Deprecate "backing": "" Max Reitz
2017-11-10 22:21   ` Eric Blake
2017-11-13 10:25     ` Daniel P. Berrange
2017-11-14 15:19   ` Markus Armbruster

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).