From nobody Sun Feb 8 13:16:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1576848358; cv=none; d=zohomail.com; s=zohoarc; b=SM0aw7K7RuhCFyyE83s0t2HyPirc3zNcHwXHnYLFX0qfiMYygKFTAbPc10cykV9+gYMYciY/soZwc5SCTLgx25k2XCi++o5TbdtoMSnOxrm6xiFEHTJT41gE2GoF1QpLYVjs26/iqqpb8cWWeRFlYIMuZ8V/HIDLjzdXeNU7zis= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576848358; 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=M4qKQwNMSShJIiaJps/WM+FouZySNhGzC7+OQU1QlXI=; b=jbfHogpMLqcZTt7teXsZWI/fcVhMGb+nNhTCSfg+4XNxblyHYLLtPBqVQtL4+uYMF1elgHUMuVWV/CUu5RUqMbeQBtGvECrR17HF2y512Mzdb9/hl2bCWOEBBMuDlLcLQkvOeQGh0CrRtP+S/lYW/UiXDBz4fciBPMbngl4qbHI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1576848358950561.0407775809053; Fri, 20 Dec 2019 05:25:58 -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-201-yIKulnLzPp-zVfFXRajNaw-1; Fri, 20 Dec 2019 08:25:56 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3503D64A8D; Fri, 20 Dec 2019 13:25:50 +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 05B1363BAC; Fri, 20 Dec 2019 13:25:50 +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 B93B5182B012; Fri, 20 Dec 2019 13:25:49 +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 xBKDPfN3028883 for ; Fri, 20 Dec 2019 08:25:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id C3CD41CE; Fri, 20 Dec 2019 13:25:41 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BD295C7DD for ; Fri, 20 Dec 2019 13:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576848357; 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=M4qKQwNMSShJIiaJps/WM+FouZySNhGzC7+OQU1QlXI=; b=IX7z6WUl/HfLdOXnei7PREiXnDbAhYlArTppkdVw9VblhS7emaVLkS60A8jxfv+/HBtIq4 liok0Kul4CNGe9F3d93MZ1A4JUR/9+YV15RxOsIwBd0KFIczZMzwQdwckeIPxEUwm+D9tQ ml2J+l2667+IWUAU8hr3uI3mgVfRE3E= From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 20 Dec 2019 14:25:25 +0100 Message-Id: <0df40bded9c7a898a21eb32ebd19e8d536a63e9f.1576847165.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/11] qemu: process: Terminate backup job on VM destroy 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.79 on 10.5.11.11 X-MC-Unique: yIKulnLzPp-zVfFXRajNaw-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" Commit d75f865fb989b3e6330c78c28e1c3bf7fa28e6a5 caused a job-deadlock if a VM is running the backup job and being destroyed as it removed the cleanup of the async job type and there was nothing to clean up the backup job. Add an explicit cleanup of the backup job when destroying a VM. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_backup.c | 2 +- src/qemu/qemu_backup.h | 3 +++ src/qemu/qemu_process.c | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index 1381505d9f..3bac6b353c 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -604,7 +604,7 @@ qemuBackupBeginCollectIncrementalCheckpoints(virDomainO= bjPtr vm, } -static void +void qemuBackupJobTerminate(virDomainObjPtr vm, qemuDomainJobStatus jobstatus) diff --git a/src/qemu/qemu_backup.h b/src/qemu/qemu_backup.h index 1b8a03612c..3321ba0b6f 100644 --- a/src/qemu/qemu_backup.h +++ b/src/qemu/qemu_backup.h @@ -42,6 +42,9 @@ qemuBackupNotifyBlockjobEnd(virDomainObjPtr vm, unsigned long long end, int asyncJob); +void +qemuBackupJobTerminate(virDomainObjPtr vm, + qemuDomainJobStatus jobstatus); int qemuBackupGetJobInfoStats(virQEMUDriverPtr driver, diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e6c6c0bee2..3b036ac4bc 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -57,6 +57,7 @@ #include "qemu_security.h" #include "qemu_extdevice.h" #include "qemu_firmware.h" +#include "qemu_backup.h" #include "cpu/cpu.h" #include "cpu/cpu_x86.h" @@ -7609,6 +7610,10 @@ void qemuProcessStop(virQEMUDriverPtr driver, virResctrlAllocRemove(vm->def->resctrls[i]->alloc); } + /* clean up a possible backup job */ + if (priv->backup) + qemuBackupJobTerminate(vm, QEMU_DOMAIN_JOB_STATUS_CANCELED); + qemuProcessRemoveDomainStatus(driver, vm); /* Remove VNC and Spice ports from port reservation bitmap, but only if --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list