From nobody Mon Feb 9 02:15:38 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 1532534322994848.9686413668601; Wed, 25 Jul 2018 08:58:42 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C3FA307D866; Wed, 25 Jul 2018 15:58:41 +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 45B273001A6E; Wed, 25 Jul 2018 15:58:41 +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 E738D18037F1; Wed, 25 Jul 2018 15:58:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6PFwQUo025676 for ; Wed, 25 Jul 2018 11:58:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id E05117C56; Wed, 25 Jul 2018 15:58:26 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id D735E7C4B; Wed, 25 Jul 2018 15:58:23 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 25 Jul 2018 17:57:42 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH RFC 11/39] 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.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 25 Jul 2018 15:58:42 +0000 (UTC) X-ZohoMail: 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 Reviewed-by: J=EF=BF=BDn Tomko --- 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 8dd25e2736..1d6cd72727 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; @@ -7711,7 +7715,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