mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-21 00:53:27 -06:00
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>
This commit is contained in:
parent
20dca81075
commit
ce1ffea8cd
3 changed files with 76 additions and 0 deletions
|
@ -64,6 +64,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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue