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: 10370167 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 C663C6038F for ; Sat, 28 Apr 2018 08:12:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA63C28968 for ; Sat, 28 Apr 2018 08:12:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACD5129444; Sat, 28 Apr 2018 08:12:19 +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 238D828968 for ; Sat, 28 Apr 2018 08:12:18 +0000 (UTC) Received: from localhost ([::1]:51285 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCKxt-0003k8-L8 for patchwork-qemu-devel@patchwork.kernel.org; Sat, 28 Apr 2018 04:12:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCKxG-0003RV-31 for qemu-devel@nongnu.org; Sat, 28 Apr 2018 04:11:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCKxC-0002ZO-3o for qemu-devel@nongnu.org; Sat, 28 Apr 2018 04:11:38 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:40590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fCKxB-0002ZE-Tl for qemu-devel@nongnu.org; Sat, 28 Apr 2018 04:11:34 -0400 Received: by mail-pf0-x241.google.com with SMTP id f189so3152710pfa.7 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=V8ELV0cInMtWTBWzpdehgc6rJzfF1FgWLpseUsoYi28JU9KRL0Uyj1RvLJR5iekVO7 n0Ie8vMIrtcBDGui8XsNczrDKr/O4O2JHZi/K5Q7NWwqq4gYZypmC15R0d8TDLO7zChj NKNfm/h9rWWKHiw6ClnSquMSOci0UT+WoEDcpfiYebO/6stJS6V6Ji2KHkL3ClgUxp9T pMR5XBLWNFZvcIuu3jFokQtvmNUOMFb/FRUnoCtebaGgnz3eUDYQKRAO473jMpmvmqOj SiptvN/R97gufbjh6bC+V94IopcuWP9mHfjkvhC1gpOmp+KI8LmDHKc+mGYJgefkOp4i OFag== X-Gm-Message-State: ALQs6tDYqUPKcd80+dsSyfBbs+q8XUhZAbtO770ZCRMqoWIQ3q20lRj7 gg43y07gTaaXPdP2EvqJYAU= 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 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 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PATCH] migration: fix saving normal page even if it's been compressed 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: kvm@vger.kernel.org, Xiao Guangrong , qemu-devel@nongnu.org, peterx@redhat.com, dgilbert@redhat.com, wei.w.wang@intel.com, jiang.biao2@zte.com.cn Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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);