From nobody Mon Feb 9 04:03:20 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 ARC-Seal: i=1; a=rsa-sha256; t=1565280063; cv=none; d=zoho.com; s=zohoarc; b=S4ahEfuQ6mK9/+8TagiT4fmQbElLzWzNYXEZx+fBX2Vnw+Av1+hBlhKNzy91kkkzbsAsxnAIEHv10DH76nRS2ZZJaY2Uoi7LtuBgMY2wy8W1pACDyP25ft8u5nyMCjHO6dmZ1fMVBlcAdq2hf3ru7XktwIIgHp9FULd68OS8Kqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565280063; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=K1F+miJqsVjq2X6bxLdnfl3Aj7yT2u+ERruKJsSyvu8=; b=gXPktqj+5hTrpoxPWmMvKMngmz3/O4OIfWbh3VaA2jglzlwHkdr5XCs5BrMC5kVwvTl6ItmorV7c59B3MQ7fS/bQ6ctSTO3ReZnuGh1NTr8JN/+4eeyqqqqzCLlz00tzQUWHZ/+Xu4/HbN+0Qew0qvqLEm6JTtrh+1ukKlLmTlk= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565280063967980.8855370281964; Thu, 8 Aug 2019 09:01:03 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87874309BF02; Thu, 8 Aug 2019 16:01:02 +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 2F923600CC; Thu, 8 Aug 2019 16:01:02 +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 920541806B01; Thu, 8 Aug 2019 16:01:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x78G0pg7005406 for ; Thu, 8 Aug 2019 12:00:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 44BC3166A7; Thu, 8 Aug 2019 16:00:51 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD100F6E6 for ; Thu, 8 Aug 2019 16:00:50 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 8 Aug 2019 18:00:36 +0200 Message-Id: <484eefa24b1a446c0f47ad1bd09714b6561c06f8.1565279921.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 06/12] qemu: blockjob: Remove qemuBlockJobDiskRegisterMirror 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 08 Aug 2019 16:01:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The utility of the function is extremely limited as for block copy we need to register the mirror chain earlier than when it's set with the disk. This means that it would be open-coded in that case. Avoid any weird usage and just open-code the only current usage, remove the function, and reword the docs. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_blockjob.c | 20 +------------------- src/qemu/qemu_blockjob.h | 4 ---- src/qemu/qemu_domain.c | 2 +- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index a5b558b9ab..8303567aed 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -129,7 +129,7 @@ qemuBlockJobDataNew(qemuBlockJobType type, * xml (if @savestatus is true). * * Note that if @job also references a separate chain e.g. for disk mirror= ing, - * then qemuBlockJobDiskRegisterMirror should be used separately. + * then job->mirrorchain needs to be set manually. */ int qemuBlockJobRegister(qemuBlockJobDataPtr job, @@ -274,24 +274,6 @@ qemuBlockJobDiskNewCommit(virDomainObjPtr vm, } -/** - * qemuBlockJobDiskRegisterMirror: - * @job: block job to register 'mirror' chain on - * - * In cases when the disk->mirror attribute references a separate storage = chain - * such as for block-copy, this function registers it with the job. Note - * that this function does not save the status XML and thus must be used b= efore - * qemuBlockJobRegister or qemuBlockJobStarted to properly track the chain - * in the status XML. - */ -void -qemuBlockJobDiskRegisterMirror(qemuBlockJobDataPtr job) -{ - if (job->disk) - job->mirrorChain =3D virObjectRef(job->disk->mirror); -} - - /** * qemuBlockJobDiskGetJob: * @disk: disk definition diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h index 8139a1a324..5b740db5a8 100644 --- a/src/qemu/qemu_blockjob.h +++ b/src/qemu/qemu_blockjob.h @@ -134,10 +134,6 @@ qemuBlockJobDiskNew(virDomainObjPtr vm, const char *jobname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4); -void -qemuBlockJobDiskRegisterMirror(qemuBlockJobDataPtr job) - ATTRIBUTE_NONNULL(1); - qemuBlockJobDataPtr qemuBlockJobDiskNewPull(virDomainObjPtr vm, virDomainDiskDefPtr disk, diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e1da0661e6..50dc4f3764 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2976,7 +2976,7 @@ qemuDomainObjPrivateXMLParseBlockjobData(virDomainObj= Ptr vm, job->disk =3D disk; if (mirror) - qemuBlockJobDiskRegisterMirror(job); + job->mirrorChain =3D virObjectRef(job->disk->mirror); qemuDomainObjPrivateXMLParseBlockjobDataSpecific(job, ctxt); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list