From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zej1x-0000xv-U8 for qemu-devel@nongnu.org; Wed, 23 Sep 2015 08:20:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zej1u-00058F-PS for qemu-devel@nongnu.org; Wed, 23 Sep 2015 08:20:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zej1u-000575-Js for qemu-devel@nongnu.org; Wed, 23 Sep 2015 08:20:10 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 20FA891E95 for ; Wed, 23 Sep 2015 12:20:10 +0000 (UTC) Date: Wed, 23 Sep 2015 17:50:03 +0530 From: Amit Shah Message-ID: <20150923122003.GA25273@grmbl.mre> References: <1442427114-5075-1-git-send-email-dgilbert@redhat.com> <1442427114-5075-2-git-send-email-dgilbert@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442427114-5075-2-git-send-email-dgilbert@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] Move dirty page search state into separate structure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: qemu-devel@nongnu.org, quintela@redhat.com On (Wed) 16 Sep 2015 [19:11:53], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Pull the sarch state for one iteration of the dirty page typo in 'search' > search into a structure. > > Signed-off-by: Dr. David Alan Gilbert > @@ -923,26 +933,29 @@ static int ram_save_compressed_page(QEMUFile *f, RAMBlock *block, > static int ram_find_and_save_block(QEMUFile *f, bool last_stage, > uint64_t *bytes_transferred) > { > - RAMBlock *block = last_seen_block; > - ram_addr_t offset = last_offset; > - bool complete_round = false; > + PageSearchStatus pss; > int pages = 0; > > - if (!block) > - block = QLIST_FIRST_RCU(&ram_list.blocks); > + pss.block = last_seen_block; > + pss.offset = last_offset; > + pss.complete_round = false; > + > + if (!pss.block) > + pss.block = QLIST_FIRST_RCU(&ram_list.blocks); Missing {} around if With those fixed: Reviewed-by: Amit Shah Amit