diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2019-08-06 13:40:31 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2019-08-06 13:40:31 +0100 |
| commit | df1a7c99dd5392212e70f75f6131d2e647330c17 (patch) | |
| tree | 043972c943876683f19576ccb90a7b0187a568ca /util/hbitmap.c | |
| parent | 9bb68d34dda9be60335e73e65c8fb61bca035362 (diff) | |
| parent | 110571be4e70ac015628e76d2731f96dd8d1998c (diff) | |
| download | focaccia-qemu-df1a7c99dd5392212e70f75f6131d2e647330c17.tar.gz focaccia-qemu-df1a7c99dd5392212e70f75f6131d2e647330c17.zip | |
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-08-06' into staging
Block patches for 4.1.0-rc4: - Fix the backup block job when using copy offloading - Fix the mirror block job when using the write-blocking copy mode - Fix incremental backups after the image has been grown with the respective bitmap attached to it # gpg: Signature made Tue 06 Aug 2019 12:57:07 BST # gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40 # gpg: issuer "mreitz@redhat.com" # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full] # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2019-08-06: block/backup: disable copy_range for compressed backup iotests: Test unaligned blocking mirror write mirror: Only mirror granularity-aligned chunks iotests: Test incremental backup after truncation util/hbitmap: update orig_size on truncate iotests: Test backup job with two guest writes backup: Copy only dirty areas Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util/hbitmap.c')
| -rw-r--r-- | util/hbitmap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util/hbitmap.c b/util/hbitmap.c index 7905212a8b..bcc0acdc6a 100644 --- a/util/hbitmap.c +++ b/util/hbitmap.c @@ -53,7 +53,9 @@ */ struct HBitmap { - /* Size of the bitmap, as requested in hbitmap_alloc. */ + /* + * Size of the bitmap, as requested in hbitmap_alloc or in hbitmap_truncate. + */ uint64_t orig_size; /* Number of total bits in the bottom level. */ @@ -732,6 +734,8 @@ void hbitmap_truncate(HBitmap *hb, uint64_t size) uint64_t num_elements = size; uint64_t old; + hb->orig_size = size; + /* Size comes in as logical elements, adjust for granularity. */ size = (size + (1ULL << hb->granularity) - 1) >> hb->granularity; assert(size <= ((uint64_t)1 << HBITMAP_LOG_MAX_SIZE)); |