From nobody Mon Feb 9 02:07:31 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=1658238522; cv=none; d=zohomail.com; s=zohoarc; b=KGQpc6Y0PefU9/DiOIgFpltLnpUuxKCtTYIHwgKG5bzLmsx713WiCXoOfdtG8p2CSnKKEE/obMLArKd8lElH0ntn7gnOKL6XmR2lHZjfhYtrDQVLLVNhjDKbtk8OFL7p9yINeHRsve9Y7VvpII3t7rs2pk760ZoFyt/bFY+YMJE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658238522; 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=hRmDQhH0rb9Vh2hU3+7IkZgaHM/++H/5WrGogD4q1/Q=; b=WIZU4PCm1lEZ/jOOS7uMG24jhRiweBQs5UkfIb0QEH+8MGGB7KYyx883/Oa9eAg77OV78m/VrRDOmJuEkdk5Ii1hsqhhvI0ACLCTBUHpAt9CAUQgNL9vs27VcFqs5+UtUek0dj60J2rqhGn/YFlRkMlfWC2KkUOKqx1IFfhXNwE= 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 1658238522272848.8373987437166; Tue, 19 Jul 2022 06:48:42 -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-79-FUKwocLeMOGzlkEUgmFqGw-1; Tue, 19 Jul 2022 09:48:37 -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 50F80800DBC; Tue, 19 Jul 2022 13:48:34 +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 0387C40CF8E5; Tue, 19 Jul 2022 13:48:34 +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 BB9A41947070; Tue, 19 Jul 2022 13:48:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CC4F01923CB3 for ; Tue, 19 Jul 2022 13:48:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A76A840D282F; Tue, 19 Jul 2022 13:48:30 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52C6840C1288 for ; Tue, 19 Jul 2022 13:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658238521; 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=hRmDQhH0rb9Vh2hU3+7IkZgaHM/++H/5WrGogD4q1/Q=; b=KSTpBnrmuGCoKAhrnS1/jIUTHmP17VL5muTXIHLbnOeZUaVC3+odlCDxhmIvLR8LuaPxaw zdedH5tYyjDX3AOTEdQAQPTXq5EmBt2Eiwwl5F3esjzYcg2IyIzwk8klDnTqM+V0lW5h7v vePFsNcRfb3EH0XZYFUDId18Duol5C4= X-MC-Unique: FUKwocLeMOGzlkEUgmFqGw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH 5/5] CH: use virDomainJobObj Date: Tue, 19 Jul 2022 15:48:24 +0200 Message-Id: <29f9312fc3242eff98d618e6c709c4188f48371e.1658237781.git.khanicov@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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: 1658238523897100002 Content-Type: text/plain; charset="utf-8"; x-default="true" This patch replaces struct virCHDomainJobObj with generalized virDomainJobObj. Signed-off-by: Kristina Hanicova --- src/ch/ch_domain.c | 4 ++-- src/ch/ch_domain.h | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c index 62a6f7a9d6..2afb3582b1 100644 --- a/src/ch/ch_domain.c +++ b/src/ch/ch_domain.c @@ -46,7 +46,7 @@ virCHDomainObjInitJob(virCHDomainObjPrivate *priv) static void virCHDomainObjResetJob(virCHDomainObjPrivate *priv) { - struct virCHDomainJobObj *job =3D &priv->job; + virDomainJobObj *job =3D &priv->job; =20 job->active =3D VIR_JOB_NONE; job->owner =3D 0; @@ -83,7 +83,7 @@ virCHDomainObjBeginJob(virDomainObj *obj, virDomainJob jo= b) virDomainJobTypeToString(job)); if (virCondWaitUntil(&priv->job.cond, &obj->parent.lock, then) < 0= ) { VIR_WARN("Cannot start job (%s) for domain %s;" - " current job is (%s) owned by (%d)", + " current job is (%s) owned by (%llu)", virDomainJobTypeToString(job), obj->def->name, virDomainJobTypeToString(priv->job.active), diff --git a/src/ch/ch_domain.h b/src/ch/ch_domain.h index f75a08ec87..b3bebd6b9a 100644 --- a/src/ch/ch_domain.h +++ b/src/ch/ch_domain.h @@ -30,16 +30,9 @@ #define CH_JOB_WAIT_TIME (1000ull * 30) =20 =20 -struct virCHDomainJobObj { - virCond cond; /* Use to coordinate jobs */ - virDomainJob active; /* Currently running job */ - int owner; /* Thread which set current job */ -}; - - typedef struct _virCHDomainObjPrivate virCHDomainObjPrivate; struct _virCHDomainObjPrivate { - struct virCHDomainJobObj job; + virDomainJobObj job; =20 virChrdevs *chrdevs; virCHDriver *driver; --=20 2.35.3