From nobody Mon May 6 23:45:28 2024 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1510237079016494.5721008257009; Thu, 9 Nov 2017 06:17:59 -0800 (PST) Received: from localhost ([::1]:37161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCneS-00052Q-0x for importer@patchew.org; Thu, 09 Nov 2017 09:17:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCndN-0004Sf-TM for qemu-devel@nongnu.org; Thu, 09 Nov 2017 09:16:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eCndN-0008QC-1i for qemu-devel@nongnu.org; Thu, 09 Nov 2017 09:16:45 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:18818 helo=relay.sw.ru) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eCndM-0008PY-MY for qemu-devel@nongnu.org; Thu, 09 Nov 2017 09:16:44 -0500 Received: from kvm.sw.ru (msk-vpn.virtuozzo.com [195.214.232.6]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id vA9EGVTV029377; Thu, 9 Nov 2017 17:16:32 +0300 (MSK) From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Thu, 9 Nov 2017 17:16:31 +0300 Message-Id: <20171109141631.25688-1-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.11.1 X-detected-operating-system: by eggs.gnu.org: OpenBSD 3.x [fuzzy] X-Received-From: 195.214.232.25 Subject: [Qemu-devel] [PATCH] blockdev-backup: enable non-root nodes for backup 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: kwolf@redhat.com, vsementsov@virtuozzo.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org 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" This is needed to implement image-fleecing scheme, when we create a temporary node, mark our active node to be backing for the temp, and start backup(sync=3Dnone) from active node to the temp node. Temp node then represents a kind of snapshot and may be used for external backup through NBD. Signed-off-by: Vladimir Sementsov-Ogievskiy --- What was the reason to abandon non-root nodes? blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 56a6b24a0b..d0a5a107f0 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3345,7 +3345,7 @@ BlockJob *do_blockdev_backup(BlockdevBackup *backup, = BlockJobTxn *txn, backup->compress =3D false; } =20 - bs =3D qmp_get_root_bs(backup->device, errp); + bs =3D bdrv_lookup_bs(backup->device, backup->device, errp); if (!bs) { return NULL; } --=20 2.11.1