diff options
author | Wen Congyang | 2015-05-22 03:29:46 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2015-06-23 16:06:16 +0200 |
commit | c6a8c3283f1d53e360073bdb32f87a97e78e2880 (patch) | |
tree | fb2710f814a4c5ddd36096ac781168ecb3adee6e /include/qemu | |
parent | virtio-blk: Use blk_drain() to drain IO requests (diff) | |
download | qemu-c6a8c3283f1d53e360073bdb32f87a97e78e2880.tar.gz qemu-c6a8c3283f1d53e360073bdb32f87a97e78e2880.tar.xz qemu-c6a8c3283f1d53e360073bdb32f87a97e78e2880.zip |
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 <wency@cn.fujitsu.com>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 555E868A.60506@cn.fujitsu.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/hbitmap.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ -132,6 +132,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. * @item: Bit to query (0-based). |