From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, jsnow@redhat.com,
Liang Li <liliangleo@didichuxing.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
Fam Zheng <famz@redhat.com>, Max Reitz <mreitz@redhat.com>,
Weiping Zhang <zhangweiping@didichuxing.com>
Subject: [Qemu-devel] [PULL 1/1] hbitmap: fix missing restore count when finish deserialization
Date: Wed, 7 Feb 2018 12:01:24 -0500 [thread overview]
Message-ID: <20180207170124.26704-2-jsnow@redhat.com> (raw)
In-Reply-To: <20180207170124.26704-1-jsnow@redhat.com>
From: Liang Li <liliangleo@didichuxing.com>
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 <vsementsov@virtuozzo.com>
Cc: Fam Zheng <famz@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Weiping Zhang <zhangweiping@didichuxing.com>
Signed-off-by: Liang Li <liliangleo@didichuxing.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 20180118131308.GA2181@liangdeMacBook-Pro.local
Signed-off-by: John Snow <jsnow@redhat.com>
---
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
next prev parent reply other threads:[~2018-02-07 17:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 17:01 [Qemu-devel] [PULL 0/1] Bitmaps patches John Snow
2018-02-07 17:01 ` John Snow [this message]
2018-02-08 11:04 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180207170124.26704-2-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=famz@redhat.com \
--cc=liliangleo@didichuxing.com \
--cc=mreitz@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
--cc=zhangweiping@didichuxing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).