From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa6z9-0001iU-SN for qemu-devel@nongnu.org; Fri, 03 Oct 2014 13:49:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xa6z3-0001eP-Nh for qemu-devel@nongnu.org; Fri, 03 Oct 2014 13:49:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa6z3-0001e7-Gx for qemu-devel@nongnu.org; Fri, 03 Oct 2014 13:49:37 -0400 From: "Dr. David Alan Gilbert (git)" Date: Fri, 3 Oct 2014 18:47:44 +0100 Message-Id: <1412358473-31398-39-git-send-email-dgilbert@redhat.com> In-Reply-To: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> References: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH v4 38/47] Add assertion to check migration_dirty_pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, lilei@linux.vnet.ibm.com, quintela@redhat.com, cristian.klein@cs.umu.se, amit.shah@redhat.com, yanghy@cn.fujitsu.com From: "Dr. David Alan Gilbert" I've seen it go negative once during dev, it shouldn't happen. Signed-off-by: Dr. David Alan Gilbert --- arch_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch_init.c b/arch_init.c index a945990..2f4345a 100644 --- a/arch_init.c +++ b/arch_init.c @@ -442,6 +442,7 @@ ram_addr_t migration_bitmap_find_and_reset_dirty(MemoryRegion *mr, if (next < size) { clear_bit(next, migration_bitmap); + assert(migration_dirty_pages > 0); migration_dirty_pages--; } *bitoffset = next; -- 1.9.3