aboutsummaryrefslogtreecommitdiff
path: root/include/qemu
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-04-17 19:50:03 -0400
committerKevin Wolf <kwolf@redhat.com>2015-04-28 15:36:10 +0200
commitce1ffea8cdcea41533bde87759b8390f0e3a9ad3 (patch)
tree1a8014749e9da6baa25e1cd65724164972867dc2 /include/qemu
parent20dca81075e712ebcbc151eed9b1a02d4e5d08f5 (diff)
downloadqemu-ce1ffea8cdcea41533bde87759b8390f0e3a9ad3.zip
qemu-ce1ffea8cdcea41533bde87759b8390f0e3a9ad3.tar.gz
qemu-ce1ffea8cdcea41533bde87759b8390f0e3a9ad3.tar.bz2
block: Resize bitmaps on bdrv_truncate
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1429314609-29776-16-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/hbitmap.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h
index 6cb2d0e..f0a85f8 100644
--- a/include/qemu/hbitmap.h
+++ b/include/qemu/hbitmap.h
@@ -65,6 +65,16 @@ struct HBitmapIter {
HBitmap *hbitmap_alloc(uint64_t size, int granularity);
/**
+ * hbitmap_truncate:
+ * @hb: The bitmap to change the size of.
+ * @size: The number of elements to change the bitmap to accommodate.
+ *
+ * truncate or grow an existing bitmap to accommodate a new number of elements.
+ * This may invalidate existing HBitmapIterators.
+ */
+void hbitmap_truncate(HBitmap *hb, uint64_t size);
+
+/**
* hbitmap_merge:
* @a: The bitmap to store the result in.
* @b: The bitmap to merge into @a.