From nobody Sun May 5 16:00:28 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=1658499964; cv=none; d=zohomail.com; s=zohoarc; b=dm/Z+uWc/amvYS2Otz794l0mpUy7aN/xlh5dSX+EGM2NbvbPfkAnKue/EB/Osk1K79hTSUle+8BwWYys3XfXlsc7swCl3in4rjYm0ZP4PNyL6/oJ8babOk+yzeOR7/4IfkW+9kXDd69f5n9/KUza4Xq1wYZp4Se1K+4Wx1QvlkA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658499964; 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=FXIh0V9YqffyEDGsPYrmM8MYy+v3hQ92DPKG/qy1RM0=; b=QtJeEZqyIbe061NQFZHezyrYvZZHx8yAx1P0SIkZvh8O03FdN8nV4a1JUE2kOegyj0I6a5hXT3GqKxwYraWsQM70Dafe2+w5wHt9AJ76PYnHjyY6LPwtWMrZRe401Ue3K/C0SAtXdUGKb+/6/eZVUyC/j2nvAeTvYsoaWntbgk0= 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 1658499964861962.608005884168; Fri, 22 Jul 2022 07:26:04 -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-332-c8O32FGlNfOnNnH_MN2k5w-1; Fri, 22 Jul 2022 10:25:52 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7BA4E8039A1; Fri, 22 Jul 2022 14:25:49 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 690F240CF8F0; Fri, 22 Jul 2022 14:25:49 +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 45864194704D; Fri, 22 Jul 2022 14:25: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 6312E1947049 for ; Fri, 22 Jul 2022 14:25:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5732D492CA6; Fri, 22 Jul 2022 14:25:45 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.34.244.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 004E8492CA5 for ; Fri, 22 Jul 2022 14:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658499963; 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=FXIh0V9YqffyEDGsPYrmM8MYy+v3hQ92DPKG/qy1RM0=; b=fFuxwzHrIPBvneieye5Ir3Enas3SlvFR5aB6FfEZrpy6jT5T6bYMzwqlm2lGFECL/oMHM2 bIKUVDrut/DIpqs+/67mE3WC3w/0F5MbjsmIlL+JWe5QT9U3aFy+XTyK7W/vWkjN/JBKu/ ojqBiZVyk+I9K7kh0wHl41Q49uPq4m4= X-MC-Unique: c8O32FGlNfOnNnH_MN2k5w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH 1/4] qemu & hypervisor: move qemuDomainObjResetJob() into hypervisor Date: Fri, 22 Jul 2022 16:25:31 +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.1 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: 1658499965289100007 Content-Type: text/plain; charset="utf-8"; x-default="true" This patch moves qemuDomainObjResetJob() as virDomainObjResetJob() into hypervisor in order to be used by other hypervisors as well. Signed-off-by: Kristina Hanicova Reviewed-by: Jonathon Jongsma --- src/hypervisor/domain_job.c | 9 +++++++++ src/hypervisor/domain_job.h | 2 ++ src/libvirt_private.syms | 1 + src/qemu/qemu_domainjob.c | 20 +++++--------------- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/hypervisor/domain_job.c b/src/hypervisor/domain_job.c index 1ee70ea11e..5b97624287 100644 --- a/src/hypervisor/domain_job.c +++ b/src/hypervisor/domain_job.c @@ -137,3 +137,12 @@ virDomainObjInitJob(virDomainJobObj *job, =20 return 0; } + +void +virDomainObjResetJob(virDomainJobObj *job) +{ + job->active =3D VIR_JOB_NONE; + job->owner =3D 0; + g_clear_pointer(&job->ownerAPI, g_free); + job->started =3D 0; +} diff --git a/src/hypervisor/domain_job.h b/src/hypervisor/domain_job.h index 7c65c4f8cd..4c32296117 100644 --- a/src/hypervisor/domain_job.h +++ b/src/hypervisor/domain_job.h @@ -208,3 +208,5 @@ struct _virDomainObjPrivateJobCallbacks { =20 int virDomainObjInitJob(virDomainJobObj *job, virDomainObjPrivateJobCallbacks *cb); + +void virDomainObjResetJob(virDomainJobObj *job); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 6a5c5600df..d5046604dd 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1591,6 +1591,7 @@ virDomainJobStatusToType; virDomainJobTypeFromString; virDomainJobTypeToString; virDomainObjInitJob; +virDomainObjResetJob; =20 =20 # hypervisor/virclosecallbacks.h diff --git a/src/qemu/qemu_domainjob.c b/src/qemu/qemu_domainjob.c index 74ea975e44..a45103256a 100644 --- a/src/qemu/qemu_domainjob.c +++ b/src/qemu/qemu_domainjob.c @@ -150,16 +150,6 @@ qemuDomainEventEmitJobCompleted(virQEMUDriver *driver, } =20 =20 -static void -qemuDomainObjResetJob(virDomainJobObj *job) -{ - job->active =3D VIR_JOB_NONE; - job->owner =3D 0; - g_clear_pointer(&job->ownerAPI, g_free); - job->started =3D 0; -} - - static void qemuDomainObjResetAgentJob(virDomainJobObj *job) { @@ -219,7 +209,7 @@ qemuDomainObjPreserveJob(virDomainObj *obj, return -1; job->cb =3D priv->job.cb; =20 - qemuDomainObjResetJob(&priv->job); + virDomainObjResetJob(&priv->job); qemuDomainObjResetAsyncJob(&priv->job); return 0; } @@ -263,7 +253,7 @@ qemuDomainObjRestoreAsyncJob(virDomainObj *vm, void qemuDomainObjClearJob(virDomainJobObj *job) { - qemuDomainObjResetJob(job); + virDomainObjResetJob(job); qemuDomainObjResetAsyncJob(job); g_clear_pointer(&job->current, virDomainJobDataFree); g_clear_pointer(&job->completed, virDomainJobDataFree); @@ -772,7 +762,7 @@ qemuDomainObjDiscardAsyncJob(virDomainObj *obj) qemuDomainObjPrivate *priv =3D obj->privateData; =20 if (priv->job.active =3D=3D VIR_JOB_ASYNC_NESTED) - qemuDomainObjResetJob(&priv->job); + virDomainObjResetJob(&priv->job); qemuDomainObjResetAsyncJob(&priv->job); qemuDomainSaveStatus(obj); } @@ -919,7 +909,7 @@ qemuDomainObjBeginJobInternal(virQEMUDriver *driver, ignore_value(virTimeMillisNow(&now)); =20 if (job) { - qemuDomainObjResetJob(&priv->job); + virDomainObjResetJob(&priv->job); =20 if (job !=3D VIR_JOB_ASYNC) { VIR_DEBUG("Started job: %s (async=3D%s vm=3D%p name=3D%s)", @@ -1180,7 +1170,7 @@ qemuDomainObjEndJob(virDomainObj *obj) virDomainAsyncJobTypeToString(priv->job.asyncJob), obj, obj->def->name); =20 - qemuDomainObjResetJob(&priv->job); + virDomainObjResetJob(&priv->job); if (qemuDomainTrackJob(job)) qemuDomainSaveStatus(obj); /* We indeed need to wake up ALL threads waiting because --=20 2.35.3 From nobody Sun May 5 16:00:28 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=1658499959; cv=none; d=zohomail.com; s=zohoarc; b=TT/sW1CfCjFr2cg+/0+B+jhUP3HdJFHsLHUsuc3laTluvmH5slT6XWwZiIlnF5zPkd9vqlBVgcpIeWv/q6ZDXwhy9CKaYhkBvqqkspRP8TazXAIN0wM/0+amgo66Yirsq7kr07IbgS3upZFcdaGqxtLedBKRWMO/F73Qpfg9Jzs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658499959; 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=xTVXlYcfuLJgOx9ADxmVLEypXIvc1sStTWzjtgtw1to=; b=cZKtlaCDBsAja9BOc9z2LZ01J2zKKpQV/H3EEtZFIxG33yFSwIjw3a47iKDaDGptoYbWzpv0g1LlUHEO/7fl13yaoFuB/nB7emyZFtHfXnt0deYq/GFXhEoZpYhVyVPWeb3IWelu8nBJP581C/avpT/ovsBdE05PEOqQ2h+FfXc= 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 1658499959797233.49753285628663; Fri, 22 Jul 2022 07:25:59 -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-116-1hH42AlOPI2XKkKTd0jN8A-1; Fri, 22 Jul 2022 10:25:50 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B440985A587; Fri, 22 Jul 2022 14:25:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2A3D141511F; Fri, 22 Jul 2022 14:25:47 +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 8E811194704D; Fri, 22 Jul 2022 14:25:47 +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 0F2901947049 for ; Fri, 22 Jul 2022 14:25:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E635E492C3B; Fri, 22 Jul 2022 14:25:45 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.34.244.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F54E492CA5 for ; Fri, 22 Jul 2022 14:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658499958; 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=xTVXlYcfuLJgOx9ADxmVLEypXIvc1sStTWzjtgtw1to=; b=IXCM5pyaslGLA9JqAETQAJMf/qvAcHyW65DtPXt6X80+SvtIOpx2gI2jQYT4XdmVM9sEYi CI/L3YeYmbHAuTfHPDWrDHtUdpop7mu7szcYFDJTsrPG1NsXqWcap/WJzurvjCNR+SmVZw RuNqW2SBOfB001WCTmAR7yIjT5Bh5FA= X-MC-Unique: 1hH42AlOPI2XKkKTd0jN8A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH 2/4] libxl: use virDomainObjResetJob() Date: Fri, 22 Jul 2022 16:25:32 +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.7 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: 1658499961230100002 Content-Type: text/plain; charset="utf-8"; x-default="true" This patch removes and replaces libxlDomainObjResetJob() with general virDomainObjResetJob(). Signed-off-by: Kristina Hanicova Reviewed-by: Jonathon Jongsma --- src/libxl/libxl_domain.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index e2e078bd50..467c1ee914 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -44,15 +44,6 @@ VIR_LOG_INIT("libxl.libxl_domain"); =20 =20 -static void -libxlDomainObjResetJob(libxlDomainObjPrivate *priv) -{ - virDomainJobObj *job =3D &priv->job; - - job->active =3D VIR_JOB_NONE; - job->owner =3D 0; -} - static void libxlDomainObjFreeJob(libxlDomainObjPrivate *priv) { @@ -92,7 +83,7 @@ libxlDomainObjBeginJob(libxlDriverPrivate *driver G_GNUC_= UNUSED, goto error; } =20 - libxlDomainObjResetJob(priv); + virDomainObjResetJob(&priv->job); =20 VIR_DEBUG("Starting job: %s", virDomainJobTypeToString(job)); priv->job.active =3D job; @@ -140,7 +131,7 @@ libxlDomainObjEndJob(libxlDriverPrivate *driver G_GNUC_= UNUSED, VIR_DEBUG("Stopping job: %s", virDomainJobTypeToString(job)); =20 - libxlDomainObjResetJob(priv); + virDomainObjResetJob(&priv->job); virCondSignal(&priv->job.cond); } =20 --=20 2.35.3 From nobody Sun May 5 16:00:28 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=1658499954; cv=none; d=zohomail.com; s=zohoarc; b=mANhCDVc6BWbdXhHPvuKi3H2z0XG9F9C2Sc5uZz6qwgeacU6uOKQDuFryH6AxudOCK73xVWyFcQ3s4AUH2mImFMnLNCbtl+b17w3JpU+geX1wlInlUUTAESm/kJJ5uMwfRXGy4xEjz5FtoFPpLt6aUJiicR9RKDUVruJs6kXvjg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658499954; 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=vIaJt/Yo3Vw46//0QkFGPeH9EahlwdC4ZSOQOiRysIA=; b=Z4ViVZhNO4AsRXX9oAgz2ZQLxIn+PFrZq7Ry+Kpv9dIC6C7Nn1Tls3WoI9jKZkSs8nyeueaRfAG3IIHCu9xZR6BbqCC9lIO6KSTyI1IHfEjY3opoGgjdHFNF9c3IIASEtGki8IG3N4aEAzL0St7jMREDBD+gxNffVyf6aqa9v0g= 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 1658499954345925.3930313191861; Fri, 22 Jul 2022 07:25:54 -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-154-AFNwaT09M5-FWJys-mTO-Q-1; Fri, 22 Jul 2022 10:25:51 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6B8CF85829E; Fri, 22 Jul 2022 14:25:48 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55D90141511A; Fri, 22 Jul 2022 14:25:48 +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 E097E1947BB1; Fri, 22 Jul 2022 14:25:47 +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 9ECB91947049 for ; Fri, 22 Jul 2022 14:25:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 81505492CA5; Fri, 22 Jul 2022 14:25:46 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.34.244.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BBC7492C3B for ; Fri, 22 Jul 2022 14:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658499953; 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=vIaJt/Yo3Vw46//0QkFGPeH9EahlwdC4ZSOQOiRysIA=; b=LpAdYKQn3AchcazQHv3hR1gV2/nCQNo1mCgob+tIkN42t2v21/d0/sdW/UaUs8XziVkami H8grVA8kLowWzEW8s4Ss+iVXEy4dT7YP4YAnCOE/jOslIiuE/nG7da8hRO9YhYyc02hnDW 3yqXxHlLL+P9VS+xCNhS1iGIdFtCbKE= X-MC-Unique: AFNwaT09M5-FWJys-mTO-Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH 3/4] LXC: use virDomainObjResetJob() Date: Fri, 22 Jul 2022 16:25:33 +0200 Message-Id: <1d251234b073a3aef92dd45b665b893880803a91.1658499859.git.khanicov@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.7 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: 1658499955213100001 Content-Type: text/plain; charset="utf-8"; x-default="true" This patch removes and replaces virLXCDomainObjResetJob() with general virDomainObjResetJob(). Signed-off-by: Kristina Hanicova Reviewed-by: Jonathon Jongsma --- src/lxc/lxc_domain.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c index fed4ae088a..6f048a128a 100644 --- a/src/lxc/lxc_domain.c +++ b/src/lxc/lxc_domain.c @@ -35,15 +35,6 @@ =20 VIR_LOG_INIT("lxc.lxc_domain"); =20 -static void -virLXCDomainObjResetJob(virLXCDomainObjPrivate *priv) -{ - virDomainJobObj *job =3D &priv->job; - - job->active =3D VIR_JOB_NONE; - job->owner =3D 0; -} - static void virLXCDomainObjFreeJob(virLXCDomainObjPrivate *priv) { @@ -82,7 +73,7 @@ virLXCDomainObjBeginJob(virLXCDriver *driver G_GNUC_UNUSE= D, goto error; } =20 - virLXCDomainObjResetJob(priv); + virDomainObjResetJob(&priv->job); =20 VIR_DEBUG("Starting job: %s", virDomainJobTypeToString(job)); priv->job.active =3D job; @@ -124,7 +115,7 @@ virLXCDomainObjEndJob(virLXCDriver *driver G_GNUC_UNUSE= D, VIR_DEBUG("Stopping job: %s", virDomainJobTypeToString(job)); =20 - virLXCDomainObjResetJob(priv); + virDomainObjResetJob(&priv->job); virCondSignal(&priv->job.cond); } =20 --=20 2.35.3 From nobody Sun May 5 16:00:28 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=1658499962; cv=none; d=zohomail.com; s=zohoarc; b=U2m3aAG93wPbYk3oXvKXG6rzwxGw++jGHAqEFcG9RYgTyT5cItMtVuEc1kUKgk9yl5oTT4Wd+MLOqQYF+To+ijxaw9X3J8l3lEBaVoatguDZz5Ro4SID3Pv36GIcH0sT2w4UPPMwxO3iXDVD992nD3/Mbou3hQXSYpIMJFoIzc4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658499962; 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=QXnDa3QlBWIrRYnkImFUt7HJ/imZad3XvxjQDQaoVNM=; b=VCmV1zpUfkaa7sNEG+BPw7MlVE5webCN37I6n3fBIbNZ4efMRXyTneQZ0PDOCAkXQVPyG3ZogBwjAu9ufkBe8tVvuGFkDecAllnxd3cTXjSI6eHHVbfPXr9Lbpj5C+3wtpBzCLt7DlEOpFGPYDLAAyhUDD1qobRQFgktdOJA+s0= 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 16584999623771010.0502908359565; Fri, 22 Jul 2022 07:26:02 -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-671-oC0YSh0PMtS3TEDv9yE-tw-1; Fri, 22 Jul 2022 10:25:54 -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 DA14029DD98D; Fri, 22 Jul 2022 14:25:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C781E492C3B; Fri, 22 Jul 2022 14:25: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 96413194704D; Fri, 22 Jul 2022 14:25:50 +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 284581947049 for ; Fri, 22 Jul 2022 14:25:47 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1B50F492CA5; Fri, 22 Jul 2022 14:25:47 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.34.244.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA2D7492C3B for ; Fri, 22 Jul 2022 14:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658499961; 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=QXnDa3QlBWIrRYnkImFUt7HJ/imZad3XvxjQDQaoVNM=; b=Q1DUyQx8JNe/tcakJm5YqqNcggPpYXUaCYhqVHb+lKfzIsFx+Z3/gOG/C32fQ/YEEiNzZt FEf5dOtkQ/oBxDVa1Uh4J6ye5q0bmXqRu8AbDPWdQCNNvrJ41rUU0Ijprt5kv/GiU6nm3k eB9oGlBYWyldkqYCWIH9CMp39SzDV3c= X-MC-Unique: oC0YSh0PMtS3TEDv9yE-tw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH 4/4] CH: use virDomainObjResetJob() Date: Fri, 22 Jul 2022 16:25:34 +0200 Message-Id: <9fb548c84826d249b951be89e16518e7ccb29f42.1658499859.git.khanicov@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.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: 1658499963259100005 Content-Type: text/plain; charset="utf-8"; x-default="true" This patch removes and replaces virCHDomainObjResetJob() with general virDomainObjResetJob(). Signed-off-by: Kristina Hanicova Reviewed-by: Jonathon Jongsma --- src/ch/ch_domain.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c index ae53c6fe05..499d31cf4a 100644 --- a/src/ch/ch_domain.c +++ b/src/ch/ch_domain.c @@ -32,15 +32,6 @@ =20 VIR_LOG_INIT("ch.ch_domain"); =20 -static void -virCHDomainObjResetJob(virCHDomainObjPrivate *priv) -{ - virDomainJobObj *job =3D &priv->job; - - job->active =3D VIR_JOB_NONE; - job->owner =3D 0; -} - static void virCHDomainObjFreeJob(virCHDomainObjPrivate *priv) { @@ -88,7 +79,7 @@ virCHDomainObjBeginJob(virDomainObj *obj, virDomainJob jo= b) } } =20 - virCHDomainObjResetJob(priv); + virDomainObjResetJob(&priv->job); =20 VIR_DEBUG("Starting job: %s", virDomainJobTypeToString(job)); priv->job.active =3D job; @@ -112,7 +103,7 @@ virCHDomainObjEndJob(virDomainObj *obj) VIR_DEBUG("Stopping job: %s", virDomainJobTypeToString(job)); =20 - virCHDomainObjResetJob(priv); + virDomainObjResetJob(&priv->job); virCondSignal(&priv->job.cond); } =20 --=20 2.35.3