From nobody Sun Feb 8 23:05:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1533652121122218.45419557650223; Tue, 7 Aug 2018 07:28:41 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F2BDC4B710; Tue, 7 Aug 2018 14:28:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BCCA694DE0; Tue, 7 Aug 2018 14:28:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6E90B18037F4; Tue, 7 Aug 2018 14:28:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w77EN1T4010201 for ; Tue, 7 Aug 2018 10:23:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id AE4DF2166BA2; Tue, 7 Aug 2018 14:23:01 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B48B2166BA0 for ; Tue, 7 Aug 2018 14:23:01 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 7 Aug 2018 16:22:09 +0200 Message-Id: <66ac751e9fce320ca4a6334e1b90aba828e42ed9.1533651617.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 18/55] qemu: domain: Don't redetect backing chain when using -blockdev X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 07 Aug 2018 14:28:39 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We need to load the backing chain from the XML when using -blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6b59dbc1c3..b01bb4fb5c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -6027,8 +6027,10 @@ qemuProcessPrepareHostStorage(virQEMUDriverPtr drive= r, virDomainObjPtr vm, unsigned int flags) { + qemuDomainObjPrivatePtr priv =3D vm->privateData; size_t i; bool cold_boot =3D flags & VIR_QEMU_PROCESS_START_COLD; + bool blockdev =3D virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV); for (i =3D vm->def->ndisks; i > 0; i--) { size_t idx =3D i - 1; @@ -6037,7 +6039,9 @@ qemuProcessPrepareHostStorage(virQEMUDriverPtr driver, if (virStorageSourceIsEmpty(disk->src)) continue; - virStorageSourceBackingStoreClear(disk->src); + /* backing chain needs to be redetected if we aren't using blockde= v */ + if (!blockdev) + virStorageSourceBackingStoreClear(disk->src); if (qemuDomainDetermineDiskChain(driver, vm, disk, true) >=3D 0) continue; @@ -7713,7 +7717,8 @@ qemuProcessReconnect(void *opaque) goto error; /* backing chains need to be refreshed only if they could change */ - if (priv->reconnectBlockjobs !=3D VIR_TRISTATE_BOOL_NO) { + if (priv->reconnectBlockjobs !=3D VIR_TRISTATE_BOOL_NO && + !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) { /* This should be the only place that calls * qemuDomainDetermineDiskChain with @report_broken =3D=3D fal= se * to guarantee best-effort domain reconnect */ --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list