From c6a8c3283f1d53e360073bdb32f87a97e78e2880 Mon Sep 17 00:00:00 2001 From: Wen Congyang Date: Fri, 22 May 2015 09:29:46 +0800 Subject: util/hbitmap: Add an API to reset all set bits in hbitmap The function bdrv_clear_dirty_bitmap() is updated to use faster hbitmap_reset_all() call. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Acked-by: Paolo Bonzini Reviewed-by: Eric Blake Reviewed-by: John Snow Message-id: 555E868A.60506@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi --- include/qemu/hbitmap.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/qemu/hbitmap.h') diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h index f0a85f8649..bb94a00c5f 100644 --- a/include/qemu/hbitmap.h +++ b/include/qemu/hbitmap.h @@ -131,6 +131,14 @@ void hbitmap_set(HBitmap *hb, uint64_t start, uint64_t count); */ void hbitmap_reset(HBitmap *hb, uint64_t start, uint64_t count); +/** + * hbitmap_reset_all: + * @hb: HBitmap to operate on. + * + * Reset all bits in an HBitmap. + */ +void hbitmap_reset_all(HBitmap *hb); + /** * hbitmap_get: * @hb: HBitmap to operate on. -- cgit 1.4.1