mirror of
https://github.com/qemu/qemu.git
synced 2024-11-30 15:23:34 +08:00
bitmaps patches for 2020-10-26
- fix infloop on large bitmap granularity - silence compiler warning -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAl+WuYYACgkQp6FrSiUn Q2owKwgAhXf5jJEoUzSMFIIczxST9eaokL4Jweb65bp2y4Ii014/kzAnwyU+7B1Y DMniSrpySi1F74zng2eOKijgNDgQ1INm1v5P/qeoMa4UpPwL3eaNQl3FwMUCJMdN WVo3jl1wxzqcRDVUWDWiAMD0C03nzRKI8i2uw4USUDXiW12bLC0YQPzOCofZagld xC1HAnqRMCnK10lj4aoY5jOHQL9R05TLtsEcQCdI73q3c87p+sxI1eOlqJcZw1KC vgb6uMOXQrkTPKfVsUK5bJ+aJh97LHhWb/o/Jj65f5IMbBQzaebRby3m38Pgph2W +AVuxe2FBAo7o+heucbOrrFwAUcofw== =ArcV -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/ericb/tags/pull-bitmaps-2020-10-26' into staging bitmaps patches for 2020-10-26 - fix infloop on large bitmap granularity - silence compiler warning # gpg: Signature made Mon 26 Oct 2020 11:56:54 GMT # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-bitmaps-2020-10-26: migration/block-dirty-bitmap: fix uninitialized variable warning migration/block-dirty-bitmap: fix larger granularity bitmaps Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
091e3e3dbc
@ -562,8 +562,9 @@ static int add_bitmaps_to_list(DBMSaveState *s, BlockDriverState *bs,
|
||||
dbms->bitmap_alias = g_strdup(bitmap_alias);
|
||||
dbms->bitmap = bitmap;
|
||||
dbms->total_sectors = bdrv_nb_sectors(bs);
|
||||
dbms->sectors_per_chunk = CHUNK_SIZE * 8 *
|
||||
bdrv_dirty_bitmap_granularity(bitmap) >> BDRV_SECTOR_BITS;
|
||||
dbms->sectors_per_chunk = CHUNK_SIZE * 8LLU *
|
||||
(bdrv_dirty_bitmap_granularity(bitmap) >> BDRV_SECTOR_BITS);
|
||||
assert(dbms->sectors_per_chunk != 0);
|
||||
if (bdrv_dirty_bitmap_enabled(bitmap)) {
|
||||
dbms->flags |= DIRTY_BITMAP_MIG_START_FLAG_ENABLED;
|
||||
}
|
||||
@ -1071,18 +1072,15 @@ static int dirty_bitmap_load_header(QEMUFile *f, DBMLoadState *s,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!s->cancelled) {
|
||||
if (bitmap_alias_map) {
|
||||
bitmap_name = g_hash_table_lookup(bitmap_alias_map,
|
||||
s->bitmap_alias);
|
||||
if (!bitmap_name) {
|
||||
error_report("Error: Unknown bitmap alias '%s' on node "
|
||||
"'%s' (alias '%s')", s->bitmap_alias,
|
||||
s->bs->node_name, s->node_alias);
|
||||
cancel_incoming_locked(s);
|
||||
}
|
||||
} else {
|
||||
bitmap_name = s->bitmap_alias;
|
||||
bitmap_name = s->bitmap_alias;
|
||||
if (!s->cancelled && bitmap_alias_map) {
|
||||
bitmap_name = g_hash_table_lookup(bitmap_alias_map,
|
||||
s->bitmap_alias);
|
||||
if (!bitmap_name) {
|
||||
error_report("Error: Unknown bitmap alias '%s' on node "
|
||||
"'%s' (alias '%s')", s->bitmap_alias,
|
||||
s->bs->node_name, s->node_alias);
|
||||
cancel_incoming_locked(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user