From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejT6G-00027k-Sc for qemu-devel@nongnu.org; Wed, 07 Feb 2018 12:01:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejT6A-0004Ol-Lx for qemu-devel@nongnu.org; Wed, 07 Feb 2018 12:01:36 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60190 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ejT6A-0004OX-IX for qemu-devel@nongnu.org; Wed, 07 Feb 2018 12:01:30 -0500 From: John Snow Date: Wed, 7 Feb 2018 12:01:24 -0500 Message-Id: <20180207170124.26704-2-jsnow@redhat.com> In-Reply-To: <20180207170124.26704-1-jsnow@redhat.com> References: <20180207170124.26704-1-jsnow@redhat.com> Subject: [Qemu-devel] [PULL 1/1] hbitmap: fix missing restore count when finish deserialization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, jsnow@redhat.com, Liang Li , Vladimir Sementsov-Ogievskiy , Fam Zheng , Max Reitz , Weiping Zhang From: Liang Li The .count of HBitmap is forgot to set in function hbitmap_deserialize_finish, let's set it to the right value. Cc: Vladimir Sementsov-Ogievskiy Cc: Fam Zheng Cc: Max Reitz Cc: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Weiping Zhang Signed-off-by: Liang Li Reviewed-by: John Snow Message-id: 20180118131308.GA2181@liangdeMacBook-Pro.local Signed-off-by: John Snow --- util/hbitmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/hbitmap.c b/util/hbitmap.c index 289778a55c..58a2c93842 100644 --- a/util/hbitmap.c +++ b/util/hbitmap.c @@ -630,6 +630,7 @@ void hbitmap_deserialize_finish(HBitmap *bitmap) } bitmap->levels[0][0] |= 1UL << (BITS_PER_LONG - 1); + bitmap->count = hb_count_between(bitmap, 0, bitmap->size - 1); } void hbitmap_free(HBitmap *hb) -- 2.14.3