From nobody Tue Feb 10 01:20:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1541067622406801.8506258189126; Thu, 1 Nov 2018 03:20:22 -0700 (PDT) Received: from localhost ([::1]:41027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIA5H-0000Br-GM for importer@patchew.org; Thu, 01 Nov 2018 06:20:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIA33-0007A6-Ck for qemu-devel@nongnu.org; Thu, 01 Nov 2018 06:17:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIA32-0007y1-HO for qemu-devel@nongnu.org; Thu, 01 Nov 2018 06:17:57 -0400 Received: from smtp.nue.novell.com ([195.135.221.5]:50095) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gIA32-0007xX-7r for qemu-devel@nongnu.org; Thu, 01 Nov 2018 06:17:56 -0400 Received: from localhost.localdomain ([45.122.156.254]) by smtp.nue.novell.com with ESMTP (NOT encrypted); Thu, 01 Nov 2018 11:17:52 +0100 From: Fei Li To: qemu-devel@nongnu.org Date: Thu, 1 Nov 2018 18:17:11 +0800 Message-Id: <20181101101715.9443-6-fli@suse.com> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20181101101715.9443-1-fli@suse.com> References: <20181101101715.9443-1-fli@suse.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.135.221.5 Subject: [Qemu-devel] [PATCH RFC v7 5/9] migration: fix the multifd code when sending less channels X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: quintela@redhat.com, famz@redhat.com, armbru@redhat.com, peterx@redhat.com, dgilbert@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Set the migration state to "failed" instead of "setup" when failing to send packet via some channel. Cc: Peter Xu Signed-off-by: Fei Li --- migration/ram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 4db3b3e8f4..c84d164fc8 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1072,6 +1072,7 @@ out: static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque) { MultiFDSendParams *p =3D opaque; + MigrationState *s =3D migrate_get_current(); QIOChannel *sioc =3D QIO_CHANNEL(qio_task_get_source(task)); Error *local_err =3D NULL; =20 @@ -1083,6 +1084,7 @@ static void multifd_new_send_channel_async(QIOTask *t= ask, gpointer opaque) if (multifd_save_cleanup(&local_err) !=3D 0) { migrate_set_error(migrate_get_current(), local_err); } + migrate_set_state(&s->state, s->state, MIGRATION_STATUS_FAILED); } else { p->c =3D QIO_CHANNEL(sioc); qio_channel_set_delay(p->c, false); --=20 2.13.7