mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-21 09:02:00 -06:00
hbitmap: add next_zero function
The function searches for next zero bit. Also add interface for BdrvDirtyBitmap and unit test. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20171012135313.227864-2-vsementsov@virtuozzo.com Signed-off-by: Jeff Cody <jcody@redhat.com>
This commit is contained in:
parent
411ad78115
commit
56207df55e
5 changed files with 114 additions and 0 deletions
|
@ -292,6 +292,14 @@ void hbitmap_iter_init(HBitmapIter *hbi, const HBitmap *hb, uint64_t first);
|
|||
*/
|
||||
unsigned long hbitmap_iter_skip_words(HBitmapIter *hbi);
|
||||
|
||||
/* hbitmap_next_zero:
|
||||
* @hb: The HBitmap to operate on
|
||||
* @start: The bit to start from.
|
||||
*
|
||||
* Find next not dirty bit.
|
||||
*/
|
||||
int64_t hbitmap_next_zero(const HBitmap *hb, uint64_t start);
|
||||
|
||||
/* hbitmap_create_meta:
|
||||
* Create a "meta" hbitmap to track dirtiness of the bits in this HBitmap.
|
||||
* The caller owns the created bitmap and must call hbitmap_free_meta(hb) to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue