From nobody Sun Feb 8 18:43:10 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=1652196188; cv=none; d=zohomail.com; s=zohoarc; b=XcB2XSnfXDbcqI1MZ7a8r/xTf6obkWpc9JEdVo1PxD6Cf/dxpxcJ6QxWqaNNP0kGsUpbdf+S47cGkIhV9ohiKX2cboQ96UtRA+A2D00tmjZV0UtPDdvaQ+UnMtb5fMnviapW5gepU3112QvBrHPPHuqUhVaVC/mQkuNDMnIAwD4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652196188; 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=hfVYsMme6XxTaxaYcQZ8wswpTF76qm56fE9XcdCucnU=; b=C6p8yvqi7G2lox8q1Z/sDIId6JGsEXv2hGYPewr3RwRrVkiqmeu06t4cZlFbcvT4j0feMIQJv3/AfccQgKbgZ3iG/ckYkDxdR6H+SubhR9imGfmJGjX8X+6xUv9eXqIzERFdBJYgOVucl8bmRWODP+bD03Zz0St7UPltNek2ets= 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 165219618898368.93563641918115; Tue, 10 May 2022 08:23:08 -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-127-SmxtWy90NSGkw06HHhucng-1; Tue, 10 May 2022 11:22:48 -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 0F2C61E02E26; Tue, 10 May 2022 15:22:07 +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 ECF9D54B070; Tue, 10 May 2022 15:22:06 +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 C886F194E11B; Tue, 10 May 2022 15:21:58 +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 BBAD2194706E for ; Tue, 10 May 2022 15:21:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9A4F054B09D; Tue, 10 May 2022 15:21:50 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4EBA554B072 for ; Tue, 10 May 2022 15:21:50 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id C4CFD24462C; Tue, 10 May 2022 17:21:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652196188; 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=hfVYsMme6XxTaxaYcQZ8wswpTF76qm56fE9XcdCucnU=; b=fhWzPstqmi+StlE6plCQeaOLS05S3BgnX0WH/9yMDnRnk/YxMxu61mVfeI2Td9X2XxoMQL ierN1hczFbdctc/yvtpSZxED1xgG3hVb2JK0GRXQ0u46fQEhoSglxR9mMPuEVpZjahq553 tmam5P1n7F93b1P06RuizRj2hYi4eqY= X-MC-Unique: SmxtWy90NSGkw06HHhucng-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 64/80] qemu: Rename qemuMigrationSrcCleanup Date: Tue, 10 May 2022 17:21:25 +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.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: 1652196190786100016 Content-Type: text/plain; charset="utf-8" The function is now called qemuMigrationAnyConnectionClosed to make it clear it is supposed to handle broken connection during migration. It will soon be used on both sides of migration so the "Src" part was changed to "Any" to avoid renaming the function twice in a row. The original *Cleanup name could easily be confused with cleanup callbacks called when a domain is destroyed. Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- src/qemu/qemu_migration.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 07b8c99343..d44d5c6ec4 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2336,9 +2336,9 @@ qemuMigrationDstRun(virQEMUDriver *driver, * qemuDomainMigratePerform3 and qemuDomainMigrateConfirm3. */ static void -qemuMigrationSrcCleanup(virDomainObj *vm, - virConnectPtr conn, - void *opaque) +qemuMigrationAnyConnectionClosed(virDomainObj *vm, + virConnectPtr conn, + void *opaque) { virQEMUDriver *driver =3D opaque; qemuDomainObjPrivate *priv =3D vm->privateData; @@ -2836,13 +2836,13 @@ qemuMigrationSrcBeginResumePhase(virConnectPtr conn, return NULL; =20 virCloseCallbacksUnset(driver->closeCallbacks, vm, - qemuMigrationSrcCleanup); + qemuMigrationAnyConnectionClosed); qemuDomainCleanupRemove(vm, qemuProcessCleanupMigrationJob); =20 xml =3D qemuMigrationSrcBeginResume(driver, vm, xmlin, cookieout, cook= ieoutlen, flags); =20 if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn, - qemuMigrationSrcCleanup) < 0) + qemuMigrationAnyConnectionClosed) < 0) g_clear_pointer(&xml, g_free); =20 if (!xml) @@ -2921,7 +2921,7 @@ qemuMigrationSrcBegin(virConnectPtr conn, * place. */ if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn, - qemuMigrationSrcCleanup) < 0) { + qemuMigrationAnyConnectionClosed) < 0) { VIR_FREE(xml); goto endjob; } @@ -4001,7 +4001,7 @@ qemuMigrationSrcConfirm(virQEMUDriver *driver, goto cleanup; =20 virCloseCallbacksUnset(driver->closeCallbacks, vm, - qemuMigrationSrcCleanup); + qemuMigrationAnyConnectionClosed); qemuDomainCleanupRemove(vm, qemuProcessCleanupMigrationJob); =20 ret =3D qemuMigrationSrcConfirmPhase(driver, vm, @@ -5977,7 +5977,7 @@ qemuMigrationSrcPerformResume(virQEMUDriver *driver, return -1; =20 virCloseCallbacksUnset(driver->closeCallbacks, vm, - qemuMigrationSrcCleanup); + qemuMigrationAnyConnectionClosed); qemuDomainCleanupRemove(vm, qemuProcessCleanupMigrationJob); =20 ret =3D qemuMigrationSrcPerformNative(driver, vm, NULL, uri, @@ -5986,7 +5986,7 @@ qemuMigrationSrcPerformResume(virQEMUDriver *driver, 0, NULL, NULL, 0, NULL, NULL, NULL= ); =20 if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn, - qemuMigrationSrcCleanup) < 0) + qemuMigrationAnyConnectionClosed) < 0) ret =3D -1; =20 if (ret < 0) @@ -6042,7 +6042,7 @@ qemuMigrationSrcPerformPhase(virQEMUDriver *driver, goto cleanup; =20 virCloseCallbacksUnset(driver->closeCallbacks, vm, - qemuMigrationSrcCleanup); + qemuMigrationAnyConnectionClosed); =20 if (qemuMigrationSrcPerformNative(driver, vm, persist_xml, uri, cookie= in, cookieinlen, cookieout, cookieoutlen, @@ -6051,7 +6051,7 @@ qemuMigrationSrcPerformPhase(virQEMUDriver *driver, goto cleanup; =20 if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn, - qemuMigrationSrcCleanup) < 0) + qemuMigrationAnyConnectionClosed) < 0) goto cleanup; =20 ignore_value(qemuMigrationJobSetPhase(vm, QEMU_MIGRATION_PHASE_PERFORM= 3_DONE)); --=20 2.35.1