From patchwork Sat Apr 28 08:10:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 10370165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 71E68602DC for ; Sat, 28 Apr 2018 08:11:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65F7028968 for ; Sat, 28 Apr 2018 08:11:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59F4329444; Sat, 28 Apr 2018 08:11:55 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE27E28968 for ; Sat, 28 Apr 2018 08:11:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759658AbeD1ILw (ORCPT ); Sat, 28 Apr 2018 04:11:52 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:46389 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759552AbeD1ILd (ORCPT ); Sat, 28 Apr 2018 04:11:33 -0400 Received: by mail-pf0-f196.google.com with SMTP id p12so3144466pff.13 for ; Sat, 28 Apr 2018 01:11:33 -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=ksJnYHaeonpNziMPtmto8fBPBRceXam/eCIggfxIlnw=; b=ar+g3+jqOToZYuC8GkPRd8PGFZGuIk1x8unvl95QTfOBSKGJpNqIFpXdF/v/yoSceD gDrYDUUHrZY3ejDBGbEk1D9Rzs9S6Qp8Jodd0MbZrQEnJ+ck0pb0vrtkYZAHiGo6LlNq Czh16roh0n0F8RcTc5Ol/PeaASKKWKv9IkX/oxZHu0qLJDWS05+jzG0YyhURgQ0+yDTJ 0TwRDnkcHfjBt1BQVFl+iPNcR/mdbxOvlWCDSQNSIn3wQkQOb6GJMaI7rAfkdiGaqS6G /Iqvj2iJ4BptgK3wRvvhb19NYheB32apLW94JEt7/VQHuh+1RywcCrQ2160r5c+RCv/3 BOwA== 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=ksJnYHaeonpNziMPtmto8fBPBRceXam/eCIggfxIlnw=; b=fa8Th1uZd3pX0I7VNKr9k1Gx+k31Jka6aETSufnqYOna4InjL+bdcLHIjT+ci3ixlP jv24Vu3NQBqCwiHgn5RbPGQJQFrYMmCjHxs74/+KyuZUW50mOSFP2HijyiuUsO+vx8jt /McTX/LIpSj/lCh3ZJkSkurrv99PObUn2+pkxsxy5fUcziShIScJL8Ts9GDRxdajTK/p dosV+WD71QIB/dPBSowPjTUVtJENFkakCE3gOXeGen4KOdGBJqkzlPkFxLm+2D/Yp9Sa XgKNBMOYRqz3fpnkWYIy1u1ctqD6yr5gS06c27SIBOcoLqvewCmfrZvcmkXlJjxsKz72 6Pqg== X-Gm-Message-State: ALQs6tCd6upWO8K/xytjF/QPYzat5DDNNcTQFyxRxew0TI3xOynynwOO c+zQBL+9fsoe8ohNi6ar+FYbsQ== X-Google-Smtp-Source: AB8JxZqMGgYPHMXOhhz3LOJA/qxxRWtOhE2udLfkTBMy7xeWK5tT9TH5BmdtkjWbr0+WW+il2IoshQ== X-Received: by 10.98.16.142 with SMTP id 14mr4993121pfq.22.1524903093011; Sat, 28 Apr 2018 01:11:33 -0700 (PDT) Received: from localhost.localdomain ([203.205.141.37]) by smtp.gmail.com with ESMTPSA id a11-v6sm6908488pgn.64.2018.04.28.01.11.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Apr 2018 01:11:32 -0700 (PDT) From: guangrong.xiao@gmail.com X-Google-Original-From: xiaoguangrong@tencent.com To: pbonzini@redhat.com, mst@redhat.com, mtosatti@redhat.com Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, dgilbert@redhat.com, peterx@redhat.com, jiang.biao2@zte.com.cn, wei.w.wang@intel.com, Xiao Guangrong Subject: [PATCH] migration: fix saving normal page even if it's been compressed Date: Sat, 28 Apr 2018 16:10:45 +0800 Message-Id: <20180428081045.8878-1-xiaoguangrong@tencent.com> X-Mailer: git-send-email 2.14.3 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xiao Guangrong Fix the bug introduced by da3f56cb2e767016 (migration: remove ram_save_compressed_page()), It should be 'return' rather than 'res' Sorry for this stupid mistake :( Signed-off-by: Xiao Guangrong Reviewed-by: Peter Xu --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 01cc815410..699546cc43 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1490,7 +1490,7 @@ static int ram_save_target_page(RAMState *rs, PageSearchStatus *pss, * CPU resource. */ if (block == rs->last_sent_block && save_page_use_compression(rs)) { - res = compress_page_with_multi_thread(rs, block, offset); + return compress_page_with_multi_thread(rs, block, offset); } return ram_save_page(rs, pss, last_stage);