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: 948445 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sXrM7Ipc"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Zcmn0rvhz9s3Z for ; Tue, 24 Jul 2018 22:17:12 +1000 (AEST) Received: from localhost ([::1]:40118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwFa-0003cw-CZ for incoming@patchwork.ozlabs.org; Tue, 24 Jul 2018 08:17:10 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 { From patchwork Tue Jul 24 12:16:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: 858585 jemmy X-Patchwork-Id: 948446 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="n20NEbdq"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Zcmp5Vk7z9s3Z for ; Tue, 24 Jul 2018 22:17:14 +1000 (AEST) Received: from localhost ([::1]:40119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwFc-0003eF-Ei for incoming@patchwork.ozlabs.org; Tue, 24 Jul 2018 08:17:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwF5-0003cn-2d for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:16:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhwF3-0005Ep-1B for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:16:39 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:42041) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhwF2-0005EX-R3 for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:16:36 -0400 Received: by mail-pg1-x544.google.com with SMTP id y4-v6so2781336pgp.9 for ; Tue, 24 Jul 2018 05:16:36 -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:in-reply-to:references; bh=+Ek8+ei/pgjPw3WkM2knf4wX3IoNGwNmZj/K8IqZ0zw=; b=n20NEbdqShJfuke3rkRjGqRlPO+qBCCp5VBIne+iDIFEhamTiS1HayzfqAjqT121iE YSpN/xbwz9ZHRKaTIIN/EFkmDu69i1MWlmJY3KoGTduS6RSse/S5YjDXer/JvLXAb5p7 n1Ri0vBWIDxbkgXSEO+8QWguOH2nOzyJ6Gb66Qi07hBkoimg74UfRUXRjeIGKbITjHmD fZiGG3FSLj7TdWat5T0YZxxESj1saYWHgAGD0cEAMqL347LBYY/9FzRwz5hqygzzt/2Z T7IVf24Zxhp5wzBzigStSNIyl9I0IkBOINR3C1Aic4CHVjkZVO3jJeUwCam3n7tnkXgO rgew== 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:in-reply-to :references; bh=+Ek8+ei/pgjPw3WkM2knf4wX3IoNGwNmZj/K8IqZ0zw=; b=mwtvo2dM/7EpAudzzE8FpSoAMMxhwFPehMar6sQt4rXazGzmO1NSOEsyEXYmePcPwg UFfmJS0JAoA0Fc4rLLP7H6+jZmz5fKtCZK86e9WfI06o8Iez7j0yzGXmQUmh37lZuNiE IbpgCvRssfrEBDMkgsSj240T0AIzGk3pW9TILrkwciGYZBqpFIf2m4jBHWm+shdMz9C6 AbHecueqB3HCxvywRXxcoYIRVYXMkTF5pJOZLTUC5ui+4GsjcUcM+Rpr2n0sl45ggSMj 5WqUOHMHFATYbpr0FE6brlkoNRyQuk4hNkiX9AWaNrd4/gsR/sLN1nop0xAmVS5ig5Pm dnwg== X-Gm-Message-State: AOUpUlGltAZzHoZ0oZ4vJY81NC5R/2Zgm7953+PJQXmCWWyzaCzA+KvU 1+Dh0W/x7BjX+vTVm7aYtfs= X-Google-Smtp-Source: AAOMgpcOwFJZxGYPBY0V/WaakaAbSv8lfye1y4y39u12IPU5nLK+56Ze0WkerZcEHeBYED1Ozahacw== X-Received: by 2002:a63:f206:: with SMTP id v6-v6mr16147310pgh.319.1532434596126; Tue, 24 Jul 2018 05:16:36 -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.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 05:16:35 -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:25 +0800 Message-Id: <1532434585-14732-2-git-send-email-lidongchen@tencent.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1532434585-14732-1-git-send-email-lidongchen@tencent.com> References: <1532434585-14732-1-git-send-email-lidongchen@tencent.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 Subject: [Qemu-devel] [PATCH 2/2] migration: fix duplicate initialization for expected_downtime and cleanup_bh 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" migrate_fd_connect duplicate initialize expected_downtime and cleanup_bh. Signed-off-by: Lidong Chen Reviewed-by: Peter Xu Reviewed-by: Juan Quintela --- migration/migration.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index ff05422..b8c4fec 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -3032,8 +3032,6 @@ void migrate_fd_connect(MigrationState *s, Error *error_in) } else { /* This is a fresh new migration */ rate_limit = s->parameters.max_bandwidth / XFER_LIMIT_RATIO; - s->expected_downtime = s->parameters.downtime_limit; - s->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, s); /* Notify before starting migration thread */ notifier_list_notify(&migration_state_notifiers, s);