From nobody Fri Apr 19 11:04:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1574781498; cv=none; d=zohomail.com; s=zohoarc; b=MRmgxRcXPh/bFMZHdpKs6Bsv2ersWfJ7rmq+UVt8+iPjmWcbSSxL+2EmJ1fSPSKlAcI+lNP7cj6ZCKWu3e5cwqmIYO61XRokfbFf8A/av1NU7w4NJzwgTKmmX1QpvATgJuHFXnxuOPzD7jnkJX1eoZrdJDkk9c4myV2H395dVQs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574781498; 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=ft4rRbFSmX0i6Zx11BUqmpVyLHmzYbaX/0lEtC0WVlQ=; b=HF5I61sp8cjTiRo5xGwJWNHXHIpM04ayl2bdTVR9zP7NP5YEDHT0jCtkLY/rGKWExVObqmXk6TC8XIt/mG68ZbUAu2pHkndE6D11TzQfzW5ckfwt7654M40mvhBoOyEMEoWxMJHqVGokAwEhqliBe+v5MO4emqAZXc2fc3NRpVo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 15747814981211018.8080247300236; Tue, 26 Nov 2019 07:18:18 -0800 (PST) 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-393-mrCpZpI8NxOOCpnddKst4w-1; Tue, 26 Nov 2019 10:18:10 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8642F1007286; Tue, 26 Nov 2019 15:18:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5A50B1000328; Tue, 26 Nov 2019 15:18:04 +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 150064E562; Tue, 26 Nov 2019 15:18:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAQFHfoc011805 for ; Tue, 26 Nov 2019 10:17:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id C683E60C80; Tue, 26 Nov 2019 15:17:41 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C00160BE2 for ; Tue, 26 Nov 2019 15:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574781496; 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=ft4rRbFSmX0i6Zx11BUqmpVyLHmzYbaX/0lEtC0WVlQ=; b=YSQKApyu6dlBTxUfAoBozDJjQXea98ml+3osSGMhLsleFzKw8lnfcYk8NeEhP1iw4MlTHw rmzp85ka7v4ErdUtPkIJ1vVHQhESFg5E76zzdNqifLc4fDzWtBethRKg+UcsACltITGZ8C lcE0sdqhQ8vNlVCSCxa93mR/x7DgG+c= From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 26 Nov 2019 16:17:26 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/10] qemu: blockjob: Properly propagate cancellation of blockjobs 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.22 X-MC-Unique: mrCpZpI8NxOOCpnddKst4w-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" qemu returns an error message in the job statistics even if the job was cancelled to emphasize it was not successful. Libvirt didn't properly transform it into QEMU_BLOCKJOB_STATE_CANCELLED though. Signed-off-by: Peter Krempa Reviewed-by: Cole Robinson --- src/qemu/qemu_blockjob.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 92e4d391c9..2283d49c61 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -1313,7 +1313,8 @@ qemuBlockJobEventProcessConcluded(qemuBlockJobDataPtr= job, if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0) goto cleanup; - if (job->newstate =3D=3D QEMU_BLOCKJOB_STATE_COMPLETED && + if ((job->newstate =3D=3D QEMU_BLOCKJOB_STATE_COMPLETED || + job->newstate =3D=3D QEMU_BLOCKJOB_STATE_FAILED) && job->state =3D=3D QEMU_BLOCKJOB_STATE_ABORTING) job->newstate =3D QEMU_BLOCKJOB_STATE_CANCELLED; --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list