From nobody Fri May 3 11:23:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1616190187; cv=none; d=zohomail.com; s=zohoarc; b=mKZaF1468RsEVKG73h3Xy4tNkNrVCx+td3WhvKzTl1CxxX/DeAzWhLS8pCHi6MRyg+ny71JtLUU/L2Y9AoJ1FkYmLZCSWma1wZcjuOa5nvnXro1F3m6MNwoTFg/8RCjShpxCYCKZMp8XB8iKgWHJZArCb8cEJQRFfrVFPxlBkKY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616190187; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=NM46PImhbFWQs+NvLMnr7YVQnXX/M+7okFvdGBnCBu4=; b=iPCJKr3JvQ/78xc0dIaDXfuWJ4WzNEckBFGzfXibErRBbZDzPQnDyBJHBd81uotEW7E5eQoOfZOjA4DD0lKdGeV1WD+/U2vH0MH27XEI5xkEJAwObcE1IicpFU+YoFXhq7uv+DBvlhX7TpZwoEhoMCkmp5hT783ii0xk1T6LOD0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1616190187871418.33605066013445; Fri, 19 Mar 2021 14:43:07 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-471-S4sY29gpPrmOD7fFxrrABQ-1; Fri, 19 Mar 2021 17:43:04 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 54D6E83DD20; Fri, 19 Mar 2021 21:42:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7639819C79; Fri, 19 Mar 2021 21:42:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A90BC1809C83; Fri, 19 Mar 2021 21:42:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12JLgoXe016517 for ; Fri, 19 Mar 2021 17:42:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3B35F19CBC; Fri, 19 Mar 2021 21:42:50 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.194.173]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0EAA9189A5 for ; Fri, 19 Mar 2021 21:42:46 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 2BDBE24030D; Fri, 19 Mar 2021 22:42:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616190186; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NM46PImhbFWQs+NvLMnr7YVQnXX/M+7okFvdGBnCBu4=; b=H7eLOxRofiwrCJea4sNreyEiwIM7M79lBhgn6S2awXiZmG8rpO5zUnc2NMRv+3PcLZGX5Y cLkxhKR12k+1r8J84A2YDFEJ7AqYBAru9vYHDxImih5ZDwA5aJt0ob3s0fhIUMKxvIlhtN UTTUukI09PlQYmk9z2UdvQCwYmtJiko= X-MC-Unique: S4sY29gpPrmOD7fFxrrABQ-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: Update asyncOwnerAPI when entering async job phase Date: Fri, 19 Mar 2021 22:42:25 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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) Content-Type: text/plain; charset="utf-8" In case an async job spans multiple APIs (e.g., incoming migration) the API that started the job is recorded as the asyncOwnerAPI even though it is no longer running and the owner thread is updated properly to the one currently handling the job. Let's also update asyncOwnerAPI to make it more obvious which is the current (or the most recent) API involved in the job. Signed-off-by: Jiri Denemark Reviewed-by: Erik Skultety --- src/qemu/qemu_domainjob.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domainjob.c b/src/qemu/qemu_domainjob.c index b58d6837ad..50cfc45f5b 100644 --- a/src/qemu/qemu_domainjob.c +++ b/src/qemu/qemu_domainjob.c @@ -711,7 +711,9 @@ qemuDomainObjSetJobPhase(virQEMUDriverPtr driver, qemuDomainAsyncJobTypeToString(priv->job.asyncJob), qemuDomainAsyncJobPhaseToString(priv->job.asyncJob, phase)); =20 - if (priv->job.asyncOwner && me !=3D priv->job.asyncOwner) { + if (priv->job.asyncOwner =3D=3D 0) { + priv->job.asyncOwnerAPI =3D g_strdup(virThreadJobGet()); + } else if (me !=3D priv->job.asyncOwner) { VIR_WARN("'%s' async job is owned by thread %llu", qemuDomainAsyncJobTypeToString(priv->job.asyncJob), priv->job.asyncOwner); --=20 2.31.0