[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/36] block: Deprecate "backing": ""
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PULL 11/36] block: Deprecate "backing": "" |
Date: |
Mon, 12 Mar 2018 13:36:02 -0500 |
From: Max Reitz <address@hidden>
We have a clear replacement, so let's deprecate it.
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
---
qemu-doc.texi | 7 +++++++
qapi/block-core.json | 4 ++--
block.c | 4 ++++
qemu-options.hx | 4 ++--
4 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 39e38c87ecf..f81fe40d61f 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -2779,6 +2779,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.
address@hidden Block device options
+
address@hidden "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/qapi/block-core.json b/qapi/block-core.json
index 524d51567a5..55dcc8bd85a 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 b673a004daf..e11f1355374 100644
--- a/block.c
+++ b/block.c
@@ -2649,6 +2649,10 @@ static BlockDriverState *bdrv_open_inherit(const char
*filename,
if (qobject_to(QNull, qdict_get(options, "backing")) != 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-options.hx b/qemu-options.hx
index 6585058c6cd..991ff4016db 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -740,8 +740,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
- [Qemu-devel] [PULL 00/36] QAPI patches for 2018-03-12, 2.12 softfreeze, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 02/36] qlit: use QType instead of int, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 05/36] compiler: Add QEMU_BUILD_BUG_MSG() macro, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 08/36] qapi: Remove qobject_to_X() functions, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 06/36] qapi: Add qobject_to(), Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 03/36] qlit: add qobject_from_qlit(), Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 09/36] qapi: Make more of qobject_to(), Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 04/36] qapi: generate a literal qobject for introspection, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 16/36] monitor: move skip_flush into monitor_data_init, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 18/36] monitor: unify global init, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 11/36] block: Deprecate "backing": "",
Eric Blake <=
- [Qemu-devel] [PULL 17/36] monitor: move the cur_mon hack deeper for QMP, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 10/36] block: Handle null backing link, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 13/36] qobject: introduce qstring_get_try_str(), Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 26/36] qmp: add new event "command-dropped", Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 19/36] monitor: let mon_list be tail queue, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 01/36] qapi2texi: minor python code simplification, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 12/36] docs: update QMP documents for OOB commands, Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 14/36] qobject: introduce qobject_get_try_str(), Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 22/36] monitor: introduce monitor_qmp_respond(), Eric Blake, 2018/03/12
- [Qemu-devel] [PULL 20/36] monitor: allow using IO thread for parsing, Eric Blake, 2018/03/12