From nobody Mon Feb 9 09:28:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151948712034844.781789193353234; Sat, 24 Feb 2018 07:45:20 -0800 (PST) Received: from localhost ([::1]:50539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1epc0k-0003qQ-9x for importer@patchew.org; Sat, 24 Feb 2018 10:45:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1epbwb-0000oL-8L for qemu-devel@nongnu.org; Sat, 24 Feb 2018 10:41:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1epbwa-0005BZ-6o for qemu-devel@nongnu.org; Sat, 24 Feb 2018 10:41:01 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44072 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1epbwW-00057Y-PE; Sat, 24 Feb 2018 10:40:56 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E2AB818535B; Sat, 24 Feb 2018 15:40:56 +0000 (UTC) Received: from localhost (ovpn-204-47.brq.redhat.com [10.40.204.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D691610B0F27; Sat, 24 Feb 2018 15:40:55 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Sat, 24 Feb 2018 16:40:33 +0100 Message-Id: <20180224154033.29559-8-mreitz@redhat.com> In-Reply-To: <20180224154033.29559-1-mreitz@redhat.com> References: <20180224154033.29559-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Sat, 24 Feb 2018 15:40:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Sat, 24 Feb 2018 15:40:56 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mreitz@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 7/7] block: Deprecate "backing": "" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alberto Garcia , qemu-devel@nongnu.org, Michael Roth , Markus Armbruster , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We have a clear replacement, so let's deprecate it. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- 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 cha= r *filename, if (qobject_to(qdict_get(options, "backing"), QNull) !=3D NULL || (backing && *backing =3D=3D '\0')) { + if (backing) { + warn_report("Use of \"backing\": \"\" is deprecated; " + "use \"backing\": null instead"); + } flags |=3D 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'' machin= e. The ``xlnx-zcu102'' machine has the same features and capabilites in QEMU. =20 +@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 =20 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 dri= ver node =20 @item backing Reference to or definition of the backing file block device (default is ta= ken -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 d= isable +the default backing file. =20 @item lazy-refcounts Whether to enable the lazy refcounts feature (on/off; default is taken fro= m the --=20 2.14.3