From nobody Mon Feb 9 09:28:48 2026 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 --- 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