From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Eric Blake <eblake@redhat.com>, Alberto Garcia <berto@igalia.com>,
Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v3 7/7] block: Deprecate "backing": ""
Date: Sat, 24 Feb 2018 16:40:33 +0100 [thread overview]
Message-ID: <20180224154033.29559-8-mreitz@redhat.com> (raw)
In-Reply-To: <20180224154033.29559-1-mreitz@redhat.com>
We have a clear replacement, so let's deprecate it.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
---
qapi/block-core.json | 4 ++--
block.c | 4 ++++
qemu-doc.texi | 7 +++++++
qemu-options.hx | 4 ++--
4 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 5c5921bfb7..6cf695dfc5 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1090,7 +1090,7 @@
# @overlay: reference to the existing block device that will become
# the overlay of @node, as part of creating the snapshot.
# It must not have a current backing file (this can be
-# achieved by passing "backing": "" to blockdev-add).
+# achieved by passing "backing": null to blockdev-add).
#
# Since: 2.5
##
@@ -1238,7 +1238,7 @@
# "node-name": "node1534",
# "file": { "driver": "file",
# "filename": "hd1.qcow2" },
-# "backing": "" } }
+# "backing": null } }
#
# <- { "return": {} }
#
diff --git a/block.c b/block.c
index b86614d8ad..797706199d 100644
--- a/block.c
+++ b/block.c
@@ -2603,6 +2603,10 @@ static BlockDriverState *bdrv_open_inherit(const char *filename,
if (qobject_to(qdict_get(options, "backing"), QNull) != NULL ||
(backing && *backing == '\0'))
{
+ if (backing) {
+ warn_report("Use of \"backing\": \"\" is deprecated; "
+ "use \"backing\": null instead");
+ }
flags |= BDRV_O_NO_BACKING;
qdict_del(options, "backing");
}
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 8e3556976b..1b537f3e00 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -2792,6 +2792,13 @@ support page sizes < 4096 any longer.
The ``xlnx-ep108'' machine has been replaced by the ``xlnx-zcu102'' machine.
The ``xlnx-zcu102'' machine has the same features and capabilites in QEMU.
+@section Block device options
+
+@subsection "backing": "" (since 2.12.0)
+
+In order to prevent QEMU from automatically opening an image's backing
+chain, use ``"backing": null'' instead.
+
@node License
@appendix License
diff --git a/qemu-options.hx b/qemu-options.hx
index 8ccd5dcaa6..ff84563206 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -743,8 +743,8 @@ Reference to or definition of the data source block driver node
@item backing
Reference to or definition of the backing file block device (default is taken
-from the image file). It is allowed to pass an empty string here in order to
-disable the default backing file.
+from the image file). It is allowed to pass @code{null} here in order to disable
+the default backing file.
@item lazy-refcounts
Whether to enable the lazy refcounts feature (on/off; default is taken from the
--
2.14.3
next prev parent reply other threads:[~2018-02-24 15:41 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-24 15:40 [Qemu-devel] [PATCH v3 0/7] block: Handle null backing link Max Reitz
2018-02-24 15:40 ` [Qemu-devel] [PATCH v3 1/7] compiler: Add QEMU_BUILD_BUG_MSG() macro Max Reitz
2018-02-24 20:08 ` Eric Blake
2018-02-27 13:33 ` Alberto Garcia
2018-02-24 15:40 ` [Qemu-devel] [PATCH v3 2/7] qapi: Add qobject_to() Max Reitz
2018-02-24 20:57 ` Eric Blake
2018-02-26 11:58 ` Max Reitz
2018-03-19 19:36 ` Eric Blake
2018-03-19 19:38 ` Max Reitz
2018-02-27 13:45 ` Alberto Garcia
2018-02-24 15:40 ` [Qemu-devel] [PATCH v3 3/7] qapi: Replace qobject_to_X(o) by qobject_to(o, X) Max Reitz
2018-02-24 21:04 ` Eric Blake
2018-02-26 12:01 ` Max Reitz
2018-02-27 14:47 ` Eric Blake
2018-02-28 18:08 ` Max Reitz
2018-03-10 21:48 ` Eric Blake
2018-02-24 15:40 ` [Qemu-devel] [PATCH v3 4/7] qapi: Remove qobject_to_X() functions Max Reitz
2018-02-24 21:05 ` Eric Blake
2018-02-24 15:40 ` [Qemu-devel] [PATCH v3 5/7] qapi: Make more of qobject_to() Max Reitz
2018-02-24 21:07 ` Eric Blake
2018-02-24 15:40 ` [Qemu-devel] [PATCH v3 6/7] block: Handle null backing link Max Reitz
2018-02-24 21:09 ` Eric Blake
2018-02-24 15:40 ` Max Reitz [this message]
2018-02-24 18:02 ` [Qemu-devel] [PATCH v3 0/7] " no-reply
2018-02-26 11:50 ` Max Reitz
2018-02-24 19:51 ` no-reply
2018-02-24 20:19 ` no-reply
2018-02-24 20:30 ` no-reply
2018-02-25 23:38 ` no-reply
2018-02-26 6:11 ` no-reply
2018-03-09 20:11 ` Eric Blake
2018-03-10 22:34 ` Eric Blake
2018-03-12 12:22 ` Max Reitz
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=20180224154033.29559-8-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=berto@igalia.com \
--cc=eblake@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).