util/hbitmap: update orig_size on truncate
commit4e4de222799634d8159ee7b9303b9e1b45c6be2c
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Mon, 5 Aug 2019 12:01:20 +0000 (5 15:01 +0300)
committerMax Reitz <mreitz@redhat.com>
Tue, 6 Aug 2019 11:17:20 +0000 (6 13:17 +0200)
tree462b96cf2cf511b9f887d3690bcac976a83d9366
parent5f594a2e99f19ca0f7744d333bcd556f5976b78f
util/hbitmap: update orig_size on truncate

Without this, hbitmap_next_zero and hbitmap_next_dirty_area are broken
after truncate. So, orig_size is broken since it's introduction in
76d570dc495c56bb.

Fixes: 76d570dc495c56bb
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190805120120.23585-1-vsementsov@virtuozzo.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Max Reitz <mreitz@redhat.com>
util/hbitmap.c