From patchwork Tue Jul 24 12:16:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: 858585 jemmy X-Patchwork-Id: 10542005 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30F501822 for ; Tue, 24 Jul 2018 12:17:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99D68209CC for ; Tue, 24 Jul 2018 12:17:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D3FB21EEB; Tue, 24 Jul 2018 12:17:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4CEE0209CC for ; Tue, 24 Jul 2018 12:17:41 +0000 (UTC) Received: from localhost ([::1]:40121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwG3-0004DU-Lb for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 08:17:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwF5-0003cm-2R for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:16:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhwF1-0005ER-Um for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:16:39 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:42038) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhwF1-0005EE-NV for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:16:35 -0400 Received: by mail-pg1-x541.google.com with SMTP id y4-v6so2781287pgp.9 for ; Tue, 24 Jul 2018 05:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=RsxMq1+d/JFWlLt9RKJkfx0TPOXgx0XpaJc+2y+4/VY=; b=sXrM7Ipc+Yn/Im2hJjtlo0aOKeoJ3A+NJJD5Jrw+YOaRWboyPihuhwf86CYoTtVbe1 Str8EDumA7hVAaBiEVCEm6liXK8OdoCTdeoSxeb6NxkKEbA+HXc121iuRaaHYJUrnSEt IWncW9Skglk9p8nQozj3JxOMpH5jHzS2lxyXnAO5brTeT7zDserMBH8Sp8pQpl9ubpoe 8fGItysDpT9tlcswA4hbzgglyAFB4fxrae3TtK7j66ex1f/D2RDMLchNYRBzk0byFIOC 6vIzm4PbK5hr0eClqpwMaxosefnXW334ekXE2DW2hOLRgpMS3lDibp00saMJzulfLR8w xN7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RsxMq1+d/JFWlLt9RKJkfx0TPOXgx0XpaJc+2y+4/VY=; b=PjAt+FxeaFYT/rOWPoptJoq2f89kBpmINCiVeDw1rNvZN1L4b4nFNkan45+cBry4I4 IiJH9A4odxHJwPLWX0VBOr3EnsagAEky0yHbGfxKSb/JeHNWSWQze7yohCUdCZ/PLcvw dYxR+24EQ5NZrfNN94KqmmU7TVbH6BTr03ZPTlLm48IwA1Qq1tOgXDs6nyWDx60Rukpv +G1woDczgC5OwXLCylmQSbYap75q1IT+ZduhUS6d+Mg6qILH2ee3S2CIuNaFqaLMWceK WtOLpQP5JT20bBIT3h1d0JUewA+2YmfWndYAAFUVwIp2X4jqVVEkUIIHCeOQtIazplPt 4BNA== X-Gm-Message-State: AOUpUlE+bNTPlmT4APPMuO7wcDOqTk+s0WqPR2o8k8CNfoKpxidQT1Cv hRX3QjokkvnVBtslPFU7pAs= X-Google-Smtp-Source: AAOMgpeOFnRObgiuhWhbLbiS5ATlf4jvKq3g0DFf1M13epDL+jpIBsnc922uDdtqkWqSF4wZw4qIXw== X-Received: by 2002:a62:be03:: with SMTP id l3-v6mr17448669pff.138.1532434594593; Tue, 24 Jul 2018 05:16:34 -0700 (PDT) Received: from VM_120_46_centos.localdomain ([119.28.87.64]) by smtp.gmail.com with ESMTPSA id r28-v6sm19411373pfd.37.2018.07.24.05.16.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 05:16:34 -0700 (PDT) From: Lidong Chen X-Google-Original-From: Lidong Chen To: quintela@redhat.com, dgilbert@redhat.com Date: Tue, 24 Jul 2018 20:16:24 +0800 Message-Id: <1532434585-14732-1-git-send-email-lidongchen@tencent.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 Subject: [Qemu-devel] [PATCH 1/2] migration: fix the Unknown ending state error log 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: qemu-devel@nongnu.org, Lidong Chen Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP When cancelling migration, the state is MIGRATION_STATUS_CANCELLING. The state change to MIGRATION_STATUS_CANCELLED when cleanup_bh is scheduled. So when migration_iteration_finish is invoked, the state should be MIGRATION_STATUS_CANCELLING. Signed-off-by: Lidong Chen --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 8d56d56..ff05422 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2876,7 +2876,7 @@ static void migration_iteration_finish(MigrationState *s) s->vm_was_running = true; /* Fallthrough */ case MIGRATION_STATUS_FAILED: - case MIGRATION_STATUS_CANCELLED: + case MIGRATION_STATUS_CANCELLING: if (s->vm_was_running) { vm_start(); } else {