From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGqd3-0000EL-5g for qemu-devel@nongnu.org; Mon, 11 Aug 2014 10:31:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGqcw-0001Rh-Ia for qemu-devel@nongnu.org; Mon, 11 Aug 2014 10:31:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGqcw-0001RR-62 for qemu-devel@nongnu.org; Mon, 11 Aug 2014 10:31:10 -0400 From: "Dr. David Alan Gilbert (git)" Date: Mon, 11 Aug 2014 15:29:51 +0100 Message-Id: <1407767399-3030-36-git-send-email-dgilbert@redhat.com> In-Reply-To: <1407767399-3030-1-git-send-email-dgilbert@redhat.com> References: <1407767399-3030-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH v2 35/43] 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 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 c006d21..58eccc1 100644 --- a/arch_init.c +++ b/arch_init.c @@ -439,6 +439,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