From nobody Tue May 7 23:11:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1652793420; cv=none; d=zohomail.com; s=zohoarc; b=JGfPbYPGXAUfBB0uDzFfg4brhgiVwNQVCIWADXq8+6obYaixyknhfsMD5nolj7XWC0Um6PS0MNMIBN2YhMNMSDpz/zBQLtvXwZuOViUHwDm3KWU3u3euylA0MTAH2wckUxmefokkL28ixZlKvkb7aGDgLEWe52hqGIeaU19yKRw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652793420; 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; bh=UlOnxvgmGD3gtkv0T8UurghkrmzM5GFAQK14ur7hN8k=; b=RZku7sIgOgtgL6WuRkGUxfDSUXVVACPtSRw1NXPFWQ5S4rNKTkp6gFpr7rQic8XJR4lqMNslkhfmHlslgeWnZbEI0aDZeTwSjMyzx27fjQYXacomgafqSWL12hhVp335sCUPssUYbsa64gvS+38tXnlvRPMZVOUHupnJG0rBoYA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1652793420438747.8955529704238; Tue, 17 May 2022 06:17:00 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-171-w-f6FAWaPVmPmEDYcQa27Q-1; Tue, 17 May 2022 09:16:52 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 444CC80419B; Tue, 17 May 2022 13:16:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30D4DC27E83; Tue, 17 May 2022 13:16:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7ABB9194707E; Tue, 17 May 2022 13:16:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B83EA1947056 for ; Tue, 17 May 2022 13:16:48 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A861542D4E7; Tue, 17 May 2022 13:16:48 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 305DE42D4DB for ; Tue, 17 May 2022 13:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793419; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=UlOnxvgmGD3gtkv0T8UurghkrmzM5GFAQK14ur7hN8k=; b=h2s2LOS8S0M3NsApOXLWdTON50cF2daDILotzmJe7gfoOjL4NPxVFJ5M7JlePs0bEHcm8j lwBilVwT8jqXR1aMqX/A81kCwn22IRqctsXxkyvss9YPlSkWDj1IiUChY2OiSrB8VJGkgN shAaD23we0Jd6j3E2WdgWgr6hb8m96g= X-MC-Unique: w-f6FAWaPVmPmEDYcQa27Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 01/10] virclosecallbacks.h: Reformat header to contemporary style Date: Tue, 17 May 2022 15:16:36 +0200 Message-Id: <3374499a560884c6e269d6bcfb09c904a76d8c12.1652790229.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652793420760100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/hypervisor/virclosecallbacks.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/hypervisor/virclosecallbacks.h b/src/hypervisor/vircloseca= llbacks.h index 97be25b781..138e0eb689 100644 --- a/src/hypervisor/virclosecallbacks.h +++ b/src/hypervisor/virclosecallbacks.h @@ -27,14 +27,20 @@ typedef struct _virCloseCallbacks virCloseCallbacks; typedef void (*virCloseCallback)(virDomainObj *vm, virConnectPtr conn, void *opaque); -virCloseCallbacks *virCloseCallbacksNew(void); -int virCloseCallbacksSet(virCloseCallbacks *closeCallbacks, - virDomainObj *vm, - virConnectPtr conn, - virCloseCallback cb); -int virCloseCallbacksUnset(virCloseCallbacks *closeCallbacks, - virDomainObj *vm, - virCloseCallback cb); + +virCloseCallbacks * +virCloseCallbacksNew(void); + +int +virCloseCallbacksSet(virCloseCallbacks *closeCallbacks, + virDomainObj *vm, + virConnectPtr conn, + virCloseCallback cb); +int +virCloseCallbacksUnset(virCloseCallbacks *closeCallbacks, + virDomainObj *vm, + virCloseCallback cb); + virCloseCallback virCloseCallbacksGet(virCloseCallbacks *closeCallbacks, virDomainObj *vm, @@ -42,6 +48,7 @@ virCloseCallbacksGet(virCloseCallbacks *closeCallbacks, virConnectPtr virCloseCallbacksGetConn(virCloseCallbacks *closeCallbacks, virDomainObj *vm); + void virCloseCallbacksRun(virCloseCallbacks *closeCallbacks, virConnectPtr conn, --=20 2.35.3 From nobody Tue May 7 23:11:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1652793429; cv=none; d=zohomail.com; s=zohoarc; b=g6DZSXXyBIuk7NtS8H8LReX82BfVuUuB3UIXXTVBx1nZZfhA2lCqJlCx4feXRrtYmQizTOfCPRtoICE73U1uBpRuf2LWzWHws4p//+nR/KqvQckVdQl61jpQobi76yjdXGduYVJ3/4KIMVdnA40wtMb7yIaEb1IVDzeNqAq2Z/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652793429; 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; bh=qGiRhc3hj46GCH0aMfdZYf+J2UcpWaW5Qm7hYgsxXmQ=; b=O02tpKXcmbHQE6pNF8mCpqiohrkkGsZ5Ae4KCX4tVNnbuUfpLP9N5HlQDb19k/S3k5ngGgpj892xm4emX/yhdpaYQsW3bN2LpVm3y4meFlY3sY/P9FkPf1N2lQf5aPKHMApbcFnAEQu08WTT7SGpQxLPyvH6ksBD6pMWjEa7Kso= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1652793428999614.8867003502235; Tue, 17 May 2022 06:17:08 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-416-0zug4WvbPjSynoHg4zJ_cQ-1; Tue, 17 May 2022 09:17:02 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4CAD4100BAC3; Tue, 17 May 2022 13:16:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 358B0403151; Tue, 17 May 2022 13:16:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E70FE194705F; Tue, 17 May 2022 13:16:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C9C261947B81 for ; Tue, 17 May 2022 13:16:49 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B03BF42D4E7; Tue, 17 May 2022 13:16:49 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01B8D42D4DB for ; Tue, 17 May 2022 13:16:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793427; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qGiRhc3hj46GCH0aMfdZYf+J2UcpWaW5Qm7hYgsxXmQ=; b=RbzgpYhaE4WctgeoUhygH9rRgumnYXFc990cIvkjPtplPTkfbDrXisbJN/xbgH6I44ow/H unwZWznYwCkm425MEpmh32DCWG2SglnjtpJdaf+XKwJ+S/asuu/j5ilqmUuzeOVVYa1dth oFf+tPlhs+ABwnhwxRUBdMYOIqzzMrs= X-MC-Unique: 0zug4WvbPjSynoHg4zJ_cQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 02/10] virObjectLockGuard: Require that returned value is used Date: Tue, 17 May 2022 15:16:37 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652793430823100001 Content-Type: text/plain; charset="utf-8" The returned value is used to unlock the object, so all callers must necessarily make use of the returned value. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/util/virobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virobject.h b/src/util/virobject.h index a1e16aee77..4b941ac215 100644 --- a/src/util/virobject.h +++ b/src/util/virobject.h @@ -120,7 +120,7 @@ virObjectRWLockableNew(virClass *klass) virLockGuard virObjectLockGuard(void *lockableobj) - ATTRIBUTE_NONNULL(1); + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; void virObjectLock(void *lockableobj) --=20 2.35.3 From nobody Tue May 7 23:11:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1652793432; cv=none; d=zohomail.com; s=zohoarc; b=OOY55VZ5zp+ldReVb1AKauAY+dPCSuhBxA+TIu6iSXhd2ah94bP8cCCKgbs6hbBnSR6pk4g52APhMWRWpTUtTvKUM+6dR0jqA6kXYhVwV421i4Ym5LzIuw0lLvEsNiz88PwKRJ2S00GXmbZGFoBk7jU9UIlJdNX6KDcccFbIOCU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652793432; 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; bh=XOFmiB8kZCe7y6FhqOlDqg5/3OVJReA/4En8WMsDwBM=; b=oCV72H5bOMF7EZWDp5phxqFmNdU1h/A+8MotXbIEggRKBEG+OSh9xMVlDqjAjSfVmNCorIQCERwAjteGkMjAGosE29ioBxUDnSpivDV7D22RjpAfb7BmxJI78W7Dw6M+2HXhOtw5JGX4rkameqSTXbYhBjv4Favcu6Fh03aLEfQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1652793432201464.6772313555957; Tue, 17 May 2022 06:17:12 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-557-LfX_7DTCOtGAVv49Qg1FhA-1; Tue, 17 May 2022 09:17:06 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EA244803CB8; Tue, 17 May 2022 13:16:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5D59403151; Tue, 17 May 2022 13:16:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8B4611947072; Tue, 17 May 2022 13:16:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AC4C81947056 for ; Tue, 17 May 2022 13:16:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9758E42D4F2; Tue, 17 May 2022 13:16:50 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1725542D4DB for ; Tue, 17 May 2022 13:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793431; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=XOFmiB8kZCe7y6FhqOlDqg5/3OVJReA/4En8WMsDwBM=; b=Bijk8WqIkJNZa2xdD6lHx70BKNr+Ul+ynaENlwLsTJ4a8OL1stkgc2VAVotyAWh7mcuYCt aaLyDXw7o08jNOXWp9r3P+XAPk65kzfcirL05qNOALvu71Hwe3xscMdZ8XyM9MmHXCQUwl D5amBqC6VxxirnRx4VGKK6vAl5I1/iU= X-MC-Unique: LfX_7DTCOtGAVv49Qg1FhA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 03/10] qemuMigrationSrcBegin: Automatically free 'xml' variable on error Date: Tue, 17 May 2022 15:16:38 +0200 Message-Id: <686c6c68f77b97adcbeac62881b37f777e6a4865.1652790229.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652793432796100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_migration.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 25af291dc6..6b3815ac58 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2487,7 +2487,7 @@ qemuMigrationSrcBegin(virConnectPtr conn, { virQEMUDriver *driver =3D conn->privateData; g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); - char *xml =3D NULL; + g_autofree char *xml =3D NULL; virDomainAsyncJob asyncJob; if (cfg->migrateTLSForce && @@ -2532,10 +2532,8 @@ qemuMigrationSrcBegin(virConnectPtr conn, * place. */ if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn, - qemuMigrationSrcCleanup) < 0) { - VIR_FREE(xml); + qemuMigrationSrcCleanup) < 0) goto endjob; - } qemuMigrationJobContinue(vm); } else { goto endjob; @@ -2543,7 +2541,7 @@ qemuMigrationSrcBegin(virConnectPtr conn, cleanup: virDomainObjEndAPI(&vm); - return xml; + return g_steal_pointer(&xml); endjob: if (flags & VIR_MIGRATE_CHANGE_PROTECTION) --=20 2.35.3 From nobody Tue May 7 23:11:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1652793490; cv=none; d=zohomail.com; s=zohoarc; b=fwk3VynW+gTIZkVT3Jf88E5bpytJ0zgOdGZt5pwTiEpvSTvHME2fvwbWvxncZ39SyDkRHOxvRrPJ2PwZDL5h3NpGZJRyAQNRbFoCo69+b9U1Ris+pYH/FMaqlUaJFyeYk5VzjNAaKcUlq1T8YmtPvxDbW+j3lSVtdXh8TbZAhQ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652793490; 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; bh=dxxlD/g/0ry9G9YIvLEzqHsXatLlHntRiqNwPdEpQ7U=; b=SQo5WjZq+940htjqqmttKTHumFLkL/1xrHc+vccXIp44DxU1JmxUJxTy93PBF6pds8/HSB3vp3kTG/TFc6UyfEwfSHngEKjzXYhgY/X5yAwE/6Lrh0fAmeZRBnijTrBNk5z4jxPpJDXFnF02G7P/94eCuuovWcVPvIvgi71WCEQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1652793490850242.96621247565974; Tue, 17 May 2022 06:18:10 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-223-AhW4adUxNb-XUUD-iSgcNw-1; Tue, 17 May 2022 09:17:09 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A9477100BAAF; Tue, 17 May 2022 13:16:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93B6E42D4EF; Tue, 17 May 2022 13:16:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 57CE3194705F; Tue, 17 May 2022 13:16:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9DC561947056 for ; Tue, 17 May 2022 13:16:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7D84242D4E7; Tue, 17 May 2022 13:16:51 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA83E40F691 for ; Tue, 17 May 2022 13:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793488; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=dxxlD/g/0ry9G9YIvLEzqHsXatLlHntRiqNwPdEpQ7U=; b=ZR+rPbmcpvWghItE4r7+ROdRpekDLwo9V/l4nUcmvxIEsjTIKyFh0j2glNLsf/kZP0goz9 cbn2vLCjfHkP0Gh8Ww+aHtyKeo331wiYUdnjMSpoDWIAcHwSQKsFfNKBqKPL3zorw5IWDD RoUd6nHtf8Di/fs9avj8WmANN4TBvYk= X-MC-Unique: AhW4adUxNb-XUUD-iSgcNw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 04/10] bhyve: Store 'driver' in VM private data Date: Tue, 17 May 2022 15:16:39 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652793491154100001 Content-Type: text/plain; charset="utf-8" Similarly to the qemu driver if we store the immutable driver pointer in the VM private data struct we don't have to questionably pass it through opaque pointers to callbacks. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/bhyve/bhyve_domain.c | 8 ++++++-- src/bhyve/bhyve_domain.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index b526235a4e..69555a3efc 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -34,9 +34,13 @@ VIR_LOG_INIT("bhyve.bhyve_domain"); static void * -bhyveDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED) +bhyveDomainObjPrivateAlloc(void *opaque) { - return g_new0(bhyveDomainObjPrivate, 1); + bhyveDomainObjPrivate *priv =3D g_new0(bhyveDomainObjPrivate, 1); + + priv->driver =3D opaque; + + return priv; } static void diff --git a/src/bhyve/bhyve_domain.h b/src/bhyve/bhyve_domain.h index 89a4a3c7cb..5a539bc4c0 100644 --- a/src/bhyve/bhyve_domain.h +++ b/src/bhyve/bhyve_domain.h @@ -27,6 +27,8 @@ typedef struct _bhyveDomainObjPrivate bhyveDomainObjPrivate; struct _bhyveDomainObjPrivate { + struct _bhyveConn *driver; + virDomainPCIAddressSet *pciaddrs; bool persistentAddrs; --=20 2.35.3 From nobody Tue May 7 23:11:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1652793493; cv=none; d=zohomail.com; s=zohoarc; b=I/SdpDL4inEYCusY0JSkpzIJoWOchX1kZGN0YGe5dJL2lenR8FqBTMPNvZnPJcEXDN0mRL4xxydKIBuxQi0eb7552foURKZD2hlPe5BU5dpG+ygl01sNz5Rh8tdjZdU+hHMFPxeXB2P7NZ+YMHsEGnPxfwFGv4xN2PzRaJrxros= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652793493; 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; bh=cqztw9jPnY0Bshp5eSZdzXnmH2a3gaqlFmpu+tXwVJk=; b=CJJrqafBd3KqC4DHneqMV2he4y+2S5tQlxRAeMV/3ja5kJrGqiwdeL6gQ/erRkzFfKEyL9PiPwkSFS+xra1uJXzj0C5XNGCX1HFrFxGH9nKEapIIQ0Eg2E2fbU1aGJ80SebzympMWcsk422o8wl9GwY/a2MQ3btc52sBqoEH130= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 16527934930450.4724664392165323; Tue, 17 May 2022 06:18:13 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-80-XVdO_idlPjOgkI-PQs2zOw-1; Tue, 17 May 2022 09:17:11 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 49A4A3C138CA; Tue, 17 May 2022 13:16:54 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31B9C403171; Tue, 17 May 2022 13:16:54 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 033871947074; Tue, 17 May 2022 13:16:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8220F194705F for ; Tue, 17 May 2022 13:16:52 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5A2D042D4EA; Tue, 17 May 2022 13:16:52 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB9BE42D4E7 for ; Tue, 17 May 2022 13:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793491; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=cqztw9jPnY0Bshp5eSZdzXnmH2a3gaqlFmpu+tXwVJk=; b=ZTDUT6caE4W6A1A11/bRNpzAeqCf8tM9KRdnYyk1gVTUUUlu4CkW10dgQ710ICK3AZB1BM waZIpqYsvrEPbKiiI1T02UWL18wxIdUcQNLGKlIEV17B3+1e2wSMXPKnX4yl8fL52JakQ6 KZaaGDJxq4e1cKjXC9D53SU5yr3K/WU= X-MC-Unique: XVdO_idlPjOgkI-PQs2zOw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/10] lxc: Store 'driver' in VM private data Date: Tue, 17 May 2022 15:16:40 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652793495215100001 Content-Type: text/plain; charset="utf-8" Similarly to the qemu driver if we store the immutable driver pointer in the VM private data struct we don't have to questionably pass it through opaque pointers to callbacks. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/lxc/lxc_domain.c | 4 +++- src/lxc/lxc_domain.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c index fae56b35fb..5064f942b9 100644 --- a/src/lxc/lxc_domain.c +++ b/src/lxc/lxc_domain.c @@ -143,7 +143,7 @@ virLXCDomainObjEndJob(virLXCDriver *driver G_GNUC_UNUSE= D, static void * -virLXCDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED) +virLXCDomainObjPrivateAlloc(void *opaque) { virLXCDomainObjPrivate *priv =3D g_new0(virLXCDomainObjPrivate, 1); @@ -152,6 +152,8 @@ virLXCDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED) return NULL; } + priv->driver =3D opaque; + return priv; } diff --git a/src/lxc/lxc_domain.h b/src/lxc/lxc_domain.h index 1c4cb8c14a..d91dcca04b 100644 --- a/src/lxc/lxc_domain.h +++ b/src/lxc/lxc_domain.h @@ -63,6 +63,7 @@ struct virLXCDomainJobObj { typedef struct _virLXCDomainObjPrivate virLXCDomainObjPrivate; struct _virLXCDomainObjPrivate { + virLXCDriver *driver; virLXCMonitor *monitor; bool doneStopEvent; int stopReason; --=20 2.35.3 From nobody Tue May 7 23:11:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1652793434; cv=none; d=zohomail.com; s=zohoarc; b=SOirUe7m+OvmX7V+TNFa4r1JSYeLwqoZSHztJ14OaHldf9W5G8udQM4j499GzckBABgodRiuOSclIklBkruBy0kttrC9+qmUpIU8tI1P6xyZl6/mbVdza6YJ0E+v3KRpWWkVsLJvgXOtQri8R/JvtiZa1JHsHR6tLWKQANEaEoU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652793434; 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; bh=bDGPT9AMPECKJy6FpKeNXyiUCQ+jKNLjjBDq91yrcPw=; b=MQKDiPvgcHEiwnoKcqkzwx35vqttXW/kEH+jy6eifms/G1HhIdY1FLkwwhqAq0mBlLKYUUB3+YLKkmcyEYBdzSPO4tQtwbISRVWzMEoR9drHdecdKImMUOyR+H5OB+E2PRTkv5YaKT5kbjN8JEYEtgsoMmdpUS0Ah49AkZRTigg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1652793434546525.8528213636678; Tue, 17 May 2022 06:17:14 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-661-xDKZMf2eNXyTOMHtrkppBg-1; Tue, 17 May 2022 09:17:07 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1CD4A18A658E; Tue, 17 May 2022 13:16:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 019C240316B; Tue, 17 May 2022 13:16:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BBC4A194705F; Tue, 17 May 2022 13:16:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 77278194707B for ; Tue, 17 May 2022 13:16:53 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4C3A542D4EA; Tue, 17 May 2022 13:16:53 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id BE29042D4E7 for ; Tue, 17 May 2022 13:16:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793433; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=bDGPT9AMPECKJy6FpKeNXyiUCQ+jKNLjjBDq91yrcPw=; b=R+lDEuy0/AM9EGBHSeqqyWo2Dh4TWVLbkZ4E+U+mtaTIZXTSsGv3EidImhwEpWO8kc0EXq y6JUwdLeUtsg7SkZhrYqfOHozIFOY4ai8y1T1Exgag6GdED5IoAQNKqnCd6adgt+TbXzqi AxOSh6dwvGdKNVqMgHraK0NgkhEFlNw= X-MC-Unique: xDKZMf2eNXyTOMHtrkppBg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/10] qemuMigrationSrcCleanup: Use 'driver' from VM private data Date: Tue, 17 May 2022 15:16:41 +0200 Message-Id: <6d440cbaff61ed3900d29e1d413382958a64bdf6.1652790229.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652793434824100005 Content-Type: text/plain; charset="utf-8" Access the 'driver' struct from the private data rather than the passed opaque pointer in preparation to remove the opaque pointer. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 6b3815ac58..7de0929a36 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2164,10 +2164,10 @@ qemuMigrationDstRun(virQEMUDriver *driver, static void qemuMigrationSrcCleanup(virDomainObj *vm, virConnectPtr conn, - void *opaque) + void *opaque G_GNUC_UNUSED) { - virQEMUDriver *driver =3D opaque; qemuDomainObjPrivate *priv =3D vm->privateData; + virQEMUDriver *driver =3D priv->driver; qemuDomainJobPrivate *jobPriv =3D priv->job.privateData; VIR_DEBUG("vm=3D%s, conn=3D%p, asyncJob=3D%s, phase=3D%s", --=20 2.35.3 From nobody Tue May 7 23:11:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1652793435; cv=none; d=zohomail.com; s=zohoarc; b=VWhD6jk5f415k6ya+NAQjQJX+ZFA31PSJunGYaexBlytXuGtNB1YIxEbg9vx0SEf6kzhyJcqCLwUHeu1R8DHU7vs4U1AFFfcAwtUqRw4D+26MqL3KyxiK6Ytnv6wmxUAuWhr4+UTyJ9QaP7xXEFD9NaetydS8CpUS3xQlxPYOiA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652793435; 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; bh=X9gARuDd66wsYDA2XUT7Rxm4dzJrEFA3S2keG3FJNDY=; b=DT2VkDtMP7PyIlpt0iYrivF0gg+FziS1q/4TfTxQFL6CZrm3QwxkMwBaD4dvhFzZHWcRtQXm7gCt2p/kFAoaUSoAky7fB5VFDyhWgE+hCouQtg75GpuPsc5tQmG6b1WNtjQ/OmI3gWSkNjmU2UNawPM5dUKJPrUa+ZORlF3rbS4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1652793435467670.9478728246645; Tue, 17 May 2022 06:17:15 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-452-Oj3-cbeBMimyKsneOXwQMQ-1; Tue, 17 May 2022 09:17:08 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A04EC3C14CFC; Tue, 17 May 2022 13:16:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BD6940D1B98; Tue, 17 May 2022 13:16:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5CC10194705F; Tue, 17 May 2022 13:16:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 42F9819452D2 for ; Tue, 17 May 2022 13:16:54 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 24D1642D4EF; Tue, 17 May 2022 13:16:54 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1C2442D4F4 for ; Tue, 17 May 2022 13:16:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793434; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=X9gARuDd66wsYDA2XUT7Rxm4dzJrEFA3S2keG3FJNDY=; b=Luw8AbYy517ICyGLiEaHHKzlakbPXq0qEqWbZ3yRRDPR0l3yEMRvTPegOymXAyH4M6SEPG ry2Vh+TzSy7EjvRHYzTdyLxeNjHCNNY4UmdfxXggx3q9UohKCtue/UyWedaehc4SFOoiKg ml7Md2TNPKPsNC8/DmZ0bMARbF5OwtQ= X-MC-Unique: Oj3-cbeBMimyKsneOXwQMQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 07/10] qemuProcessAutoDestroy: Use 'driver' from VM private data Date: Tue, 17 May 2022 15:16:42 +0200 Message-Id: <6caf5e8999701fbab8ff98fa774779d962ed282d.1652790229.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652793436826100009 Content-Type: text/plain; charset="utf-8" Access the 'driver' struct from the private data rather than the passed opaque pointer in preparation to remove the opaque pointer. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 07e467d01e..a66ca9aa60 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8387,10 +8387,10 @@ void qemuProcessStop(virQEMUDriver *driver, static void qemuProcessAutoDestroy(virDomainObj *dom, virConnectPtr conn, - void *opaque) + void *opaque G_GNUC_UNUSED) { - virQEMUDriver *driver =3D opaque; qemuDomainObjPrivate *priv =3D dom->privateData; + virQEMUDriver *driver =3D priv->driver; virObjectEvent *event =3D NULL; unsigned int stopFlags =3D 0; --=20 2.35.3 From nobody Tue May 7 23:11:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1652793435; cv=none; d=zohomail.com; s=zohoarc; b=eUa/oY9TqCOLXb2CWZfZOPbGJCM34Urvsd/e9RfO64MBEXqGIDqulL0YF/lollsdhZVcZAk30a0f2JbYn1anwTevm92GjyVnUBRmHFKqPH3+XCyqSLrcr85lCE9wjgN8JV9K5+GaxGR7FtJBW2Xp8fG21KW6QcLpM832/OEFzuQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652793435; 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; bh=kmLwlWT7enYMfwePU8tEzP3i3Mgj8Z2A7gcSy4pmMVo=; b=nWFWPgVZZa824OadRopOFnydh7FcB4fMpovKGeHPLIzDxOd7sU6XEfLPPE0XrwoxDTcfhunVKZBew0FOH3lHLRm2fXZ0WD/KoFoovSMJMyH4J4XputTlIADBa8enTKYWbWF7hn2dX0oflkE044pZCz4wES7yP6DqIfKCLMtpL5E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1652793435405407.70048295659103; Tue, 17 May 2022 06:17:15 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-675-eZ53z4WGP9WgoiGLrv0HAA-1; Tue, 17 May 2022 09:17:12 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7AD293C16199; Tue, 17 May 2022 13:16:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 644B140336A; Tue, 17 May 2022 13:16:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 27BC4194705F; Tue, 17 May 2022 13:16:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2354A194705F for ; Tue, 17 May 2022 13:16:55 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 041A842D4F2; Tue, 17 May 2022 13:16:55 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C68042D4EB for ; Tue, 17 May 2022 13:16:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793434; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=kmLwlWT7enYMfwePU8tEzP3i3Mgj8Z2A7gcSy4pmMVo=; b=aSzsPjvRA2/5IXUG/bq1TCTVN4GGZe9ZPaP8AnT7RSRlNES7uaoXfHTaXASxMSq8wKcF5A BVy+O5Z8BVkFs70xT+nO5eE7qdvI9DX/oLrRzwH80XZvEjOCuAeiiB9Gd7wZSB6nPs++mN vZAB6BCms6EloqeDlg1ktqT4bWAq6J0= X-MC-Unique: eZ53z4WGP9WgoiGLrv0HAA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/10] lxcProcessAutoDestroy: Use 'driver' from VM private data Date: Tue, 17 May 2022 15:16:43 +0200 Message-Id: <93b988840988257d9cd6a50ba303798b7e01aced.1652790229.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652793436812100008 Content-Type: text/plain; charset="utf-8" Access the 'driver' struct from the private data rather than the passed opaque pointer in preparation to remove the opaque pointer. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/lxc/lxc_process.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 0222e8a9b3..368adaea7e 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -63,15 +63,14 @@ VIR_LOG_INIT("lxc.lxc_process"); static void lxcProcessAutoDestroy(virDomainObj *dom, virConnectPtr conn, - void *opaque) + void *opaque G_GNUC_UNUSED) { - virLXCDriver *driver =3D opaque; virObjectEvent *event =3D NULL; - virLXCDomainObjPrivate *priv; + virLXCDomainObjPrivate *priv =3D dom->privateData; + virLXCDriver *driver =3D priv->driver; VIR_DEBUG("driver=3D%p dom=3D%s conn=3D%p", driver, dom->def->name, co= nn); - priv =3D dom->privateData; VIR_DEBUG("Killing domain"); virLXCProcessStop(driver, dom, VIR_DOMAIN_SHUTOFF_DESTROYED); virDomainAuditStop(dom, "destroyed"); --=20 2.35.3 From nobody Tue May 7 23:11:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1652793435; cv=none; d=zohomail.com; s=zohoarc; b=mAlkqB3QDjSY8JeF26CkPIMbsaQOyDCDYmP1dtOspSgv97tUkzVLKsZBHl6Q/vb98Ur505nX2VE7kB/XYS8sz4AR8FnRG1kPeQBMbWNi06+QrrQpL4tjNiZCeFrjCQfTl46Q7fpcAbygrZB57oeCO5+Wmehdi7ciDCxzU7kG/i0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652793435; 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; bh=weARNGJP1Zge4M2x6ebin1a6GakO5jKLY62TnYeaAsU=; b=PsKGHHc+68b20+y/zLUA6WCLH0Z6T0vzoBO5ECon9npMgrTIm/HwKjJeOp0r+bpLI23FWZZJBUF0xbwUXXlb0nBYyAvxWz6zLuOwacr3mAKFEqW5YjViuP9lXVuvjWtfeG9R7RAA3IdsfvP0tMNKcpfjqRsjJz2TKVxrrQOs7Iw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1652793435899119.27187121693726; Tue, 17 May 2022 06:17:15 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-659-M5hvZ91dNoO6zOXD3aXavQ-1; Tue, 17 May 2022 09:17:11 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0B8773831C53; Tue, 17 May 2022 13:16:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E653C40D1B98; Tue, 17 May 2022 13:16:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AD04F1947072; Tue, 17 May 2022 13:16:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 06F25194705F for ; Tue, 17 May 2022 13:16:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DE8E142D4F0; Tue, 17 May 2022 13:16:55 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6D7F542D4F2 for ; Tue, 17 May 2022 13:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793434; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=weARNGJP1Zge4M2x6ebin1a6GakO5jKLY62TnYeaAsU=; b=DgD/j4p87MvHbLbokykbAzm5WY6QAX1M24hUab/cijDhAYhuooBmsn0Ib6iT8b/6MR1Qfj p/T7T8r2ykI9+TRWz3a0oKJSF59Wpmd087awSqawfonXF/HLPbZQk0xzGebvNvCn9HggbM SLqEwqOFpdztapGsl5EaM1Ng3g+VBEI= X-MC-Unique: M5hvZ91dNoO6zOXD3aXavQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 09/10] bhyveProcessAutoDestroy: Use 'driver' from VM private data Date: Tue, 17 May 2022 15:16:44 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652793436811100007 Content-Type: text/plain; charset="utf-8" Access the 'driver' struct from the private data rather than the passed opaque pointer in preparation to remove the opaque pointer. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/bhyve/bhyve_process.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index ee692d2ba3..40c97cb6ca 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -57,9 +57,10 @@ VIR_LOG_INIT("bhyve.bhyve_process"); static void bhyveProcessAutoDestroy(virDomainObj *vm, virConnectPtr conn G_GNUC_UNUSED, - void *opaque) + void *opaque G_GNUC_UNUSED) { - struct _bhyveConn *driver =3D opaque; + bhyveDomainObjPrivate *priv =3D vm->privateData; + struct _bhyveConn *driver =3D priv->driver; virBhyveProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_DESTROYED); --=20 2.35.3 From nobody Tue May 7 23:11:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1652793495; cv=none; d=zohomail.com; s=zohoarc; b=BBff00Fp3PnIzFDFkvhHCIrFU4HGhbfOHzS12Bd1pT4A9wKdCrWGlI7+HJrtyV7r3xr202fRfmKq2oqV8sNtQrWhnI0QLSpjDmOnlKhQ0RjrjP+svuRr5rh1fvT+GR5A5VZuFFsUkeVsUm9PNRf+vPsdnfyUBplQHhWNsD40q30= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652793495; 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; bh=CU5z8xjjNNJLoeIjcRp4fi1nYShlCdWXK5wxqrv0yNY=; b=MkQ1rOCugRahaDTmWc0lDFM/d15q1YctKhz78zTc0fLnSx1oSfT4etlq7yV1qcFhFH2vFHbJC6GSQj2CkzPTj1PbXzmkn3ggdYRlgi7qexvlpDcg0bDxv7xidS8FcEGC3ns036/t4E+ZFLuxGrDOwzVcc5z5q7vsI/gjJ2YrNfU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1652793495049537.7554859080212; Tue, 17 May 2022 06:18:15 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-648-XnqcT3sMMvmG_mmNopJ7cw-1; Tue, 17 May 2022 09:17:13 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A26DC18A65AC; Tue, 17 May 2022 13:16:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A50C403151; Tue, 17 May 2022 13:16:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2762A194707E; Tue, 17 May 2022 13:16:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CCF451947056 for ; Tue, 17 May 2022 13:16:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BFC2842D4EB; Tue, 17 May 2022 13:16:56 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40B9640F691 for ; Tue, 17 May 2022 13:16:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652793493; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=CU5z8xjjNNJLoeIjcRp4fi1nYShlCdWXK5wxqrv0yNY=; b=HGF9GfUa9p4IN8P4f7k0neSfbvOFQAsx2xXgch5R3IMnYR5gWnrXVj4l4YUjuVzQgyQXPJ SD1Cdu25EgsrCfqWo89cgMKXZMBIyZcHbMMk4t9jt3JzlBNpYTAWKXYP5JECIdZX5+9bHS BycP7ZOQturMtw281PojjhLtxJ20U9s= X-MC-Unique: XnqcT3sMMvmG_mmNopJ7cw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/10] virclosecallbacks: Don't pass opqaue pointer to callback invocation Date: Tue, 17 May 2022 15:16:45 +0200 Message-Id: <78eb50d4187a0f9256863770c258328976be84ae.1652790229.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652793497232100003 Content-Type: text/plain; charset="utf-8" Remove the argument from the function prototypes and the callback handler. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/bhyve/bhyve_driver.c | 2 +- src/bhyve/bhyve_process.c | 3 +-- src/hypervisor/virclosecallbacks.c | 5 ++--- src/hypervisor/virclosecallbacks.h | 6 ++---- src/lxc/lxc_driver.c | 2 +- src/lxc/lxc_process.c | 3 +-- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_migration.c | 3 +-- src/qemu/qemu_process.c | 3 +-- 9 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 51973ae670..09ba52483a 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -207,7 +207,7 @@ bhyveConnectClose(virConnectPtr conn) { struct _bhyveConn *privconn =3D conn->privateData; - virCloseCallbacksRun(privconn->closeCallbacks, conn, privconn->domains= , privconn); + virCloseCallbacksRun(privconn->closeCallbacks, conn, privconn->domains= ); conn->privateData =3D NULL; return 0; diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index 40c97cb6ca..18002b559b 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -56,8 +56,7 @@ VIR_LOG_INIT("bhyve.bhyve_process"); static void bhyveProcessAutoDestroy(virDomainObj *vm, - virConnectPtr conn G_GNUC_UNUSED, - void *opaque G_GNUC_UNUSED) + virConnectPtr conn G_GNUC_UNUSED) { bhyveDomainObjPrivate *priv =3D vm->privateData; struct _bhyveConn *driver =3D priv->driver; diff --git a/src/hypervisor/virclosecallbacks.c b/src/hypervisor/vircloseca= llbacks.c index 84a61b002a..c533e695f1 100644 --- a/src/hypervisor/virclosecallbacks.c +++ b/src/hypervisor/virclosecallbacks.c @@ -284,8 +284,7 @@ virCloseCallbacksGetForConn(virCloseCallbacks *closeCal= lbacks, void virCloseCallbacksRun(virCloseCallbacks *closeCallbacks, virConnectPtr conn, - virDomainObjList *domains, - void *opaque) + virDomainObjList *domains) { virCloseCallbacksList *list; size_t i; @@ -329,7 +328,7 @@ virCloseCallbacksRun(virCloseCallbacks *closeCallbacks, * * Call the callback function and end the API usage. */ virObjectUnref(vm); - list->entries[i].callback(vm, conn, opaque); + list->entries[i].callback(vm, conn); virDomainObjEndAPI(&vm); } VIR_FREE(list->entries); diff --git a/src/hypervisor/virclosecallbacks.h b/src/hypervisor/vircloseca= llbacks.h index 138e0eb689..5a56dea292 100644 --- a/src/hypervisor/virclosecallbacks.h +++ b/src/hypervisor/virclosecallbacks.h @@ -25,8 +25,7 @@ typedef struct _virCloseCallbacks virCloseCallbacks; typedef void (*virCloseCallback)(virDomainObj *vm, - virConnectPtr conn, - void *opaque); + virConnectPtr conn); virCloseCallbacks * virCloseCallbacksNew(void); @@ -52,5 +51,4 @@ virCloseCallbacksGetConn(virCloseCallbacks *closeCallback= s, void virCloseCallbacksRun(virCloseCallbacks *closeCallbacks, virConnectPtr conn, - virDomainObjList *domains, - void *opaque); + virDomainObjList *domains); diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index a42299eeea..31de677b88 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -169,7 +169,7 @@ static int lxcConnectClose(virConnectPtr conn) { virLXCDriver *driver =3D conn->privateData; - virCloseCallbacksRun(driver->closeCallbacks, conn, driver->domains, dr= iver); + virCloseCallbacksRun(driver->closeCallbacks, conn, driver->domains); conn->privateData =3D NULL; return 0; } diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 368adaea7e..9722d8e1de 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -62,8 +62,7 @@ VIR_LOG_INIT("lxc.lxc_process"); static void lxcProcessAutoDestroy(virDomainObj *dom, - virConnectPtr conn, - void *opaque G_GNUC_UNUSED) + virConnectPtr conn) { virObjectEvent *event =3D NULL; virLXCDomainObjPrivate *priv =3D dom->privateData; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 702fd0239c..1d39af1891 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1161,7 +1161,7 @@ static int qemuConnectClose(virConnectPtr conn) virQEMUDriver *driver =3D conn->privateData; /* Get rid of callbacks registered for this conn */ - virCloseCallbacksRun(driver->closeCallbacks, conn, driver->domains, dr= iver); + virCloseCallbacksRun(driver->closeCallbacks, conn, driver->domains); conn->privateData =3D NULL; diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 7de0929a36..438f2bc999 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2163,8 +2163,7 @@ qemuMigrationDstRun(virQEMUDriver *driver, */ static void qemuMigrationSrcCleanup(virDomainObj *vm, - virConnectPtr conn, - void *opaque G_GNUC_UNUSED) + virConnectPtr conn) { qemuDomainObjPrivate *priv =3D vm->privateData; virQEMUDriver *driver =3D priv->driver; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index a66ca9aa60..da7f2ccaa0 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8386,8 +8386,7 @@ void qemuProcessStop(virQEMUDriver *driver, static void qemuProcessAutoDestroy(virDomainObj *dom, - virConnectPtr conn, - void *opaque G_GNUC_UNUSED) + virConnectPtr conn) { qemuDomainObjPrivate *priv =3D dom->privateData; virQEMUDriver *driver =3D priv->driver; --=20 2.35.3