Skip to content
Snippets Groups Projects
Commit a4d5224c authored by Andrey Zhadchenko's avatar Andrey Zhadchenko Committed by Kevin Wolf
Browse files

hbitmap: fix hbitmap_status() return value for first dirty bit case


The last return statement should return true, as we already evaluated that
start == next_dirty

Also, fix hbitmap_status() description in header

Cc: qemu-stable@nongnu.org
Fixes: a6426475 ("block/dirty-bitmap: introduce bdrv_dirty_bitmap_status()")
Signed-off-by: default avatarAndrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
Message-Id: <20230202181523.423131-1-andrey.zhadchenko@virtuozzo.com>
Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 005ee3cd
No related branches found
No related tags found
No related merge requests found
......@@ -330,7 +330,7 @@ bool hbitmap_next_dirty_area(const HBitmap *hb, int64_t start, int64_t end,
int64_t *dirty_start, int64_t *dirty_count);
/*
* bdrv_dirty_bitmap_status:
* hbitmap_status:
* @hb: The HBitmap to operate on
* @start: The bit to start from
* @count: Number of bits to proceed
......
......@@ -331,7 +331,7 @@ bool hbitmap_status(const HBitmap *hb, int64_t start, int64_t count,
assert(next_zero > start);
*pnum = next_zero - start;
return false;
return true;
}
bool hbitmap_empty(const HBitmap *hb)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment