diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-09-16 17:19:09 +0300 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2019-10-17 17:02:32 -0400 |
commit | 5deb6cbd1fae10197623a74b0734a468ec80c609 (patch) | |
tree | 088aa9a3e2e23c293350828d16ce41323cbc2a68 /migration | |
parent | 767db3aad8a491c332870ae14d8cfad506a78662 (diff) | |
download | qemu-5deb6cbd1fae10197623a74b0734a468ec80c609.zip qemu-5deb6cbd1fae10197623a74b0734a468ec80c609.tar.gz qemu-5deb6cbd1fae10197623a74b0734a468ec80c609.tar.bz2 |
block/dirty-bitmap: add bs link
Add bs field to BdrvDirtyBitmap structure. Drop BlockDriverState
parameter from bitmap APIs where possible.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 20190916141911.5255-3-vsementsov@virtuozzo.com
[Rebased on top of block-copy. --js]
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/block-dirty-bitmap.c | 7 | ||||
-rw-r--r-- | migration/block.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c index 5121f86..793f249 100644 --- a/migration/block-dirty-bitmap.c +++ b/migration/block-dirty-bitmap.c @@ -474,7 +474,7 @@ static int dirty_bitmap_load_start(QEMUFile *f, DirtyBitmapLoadState *s) if (flags & DIRTY_BITMAP_MIG_START_FLAG_ENABLED) { DirtyBitmapLoadBitmapState *b; - bdrv_dirty_bitmap_create_successor(s->bs, s->bitmap, &local_err); + bdrv_dirty_bitmap_create_successor(s->bitmap, &local_err); if (local_err) { error_report_err(local_err); return -EINVAL; @@ -535,13 +535,12 @@ static void dirty_bitmap_load_complete(QEMUFile *f, DirtyBitmapLoadState *s) bdrv_dirty_bitmap_lock(s->bitmap); if (enabled_bitmaps == NULL) { /* in postcopy */ - bdrv_reclaim_dirty_bitmap_locked(s->bs, s->bitmap, &error_abort); + bdrv_reclaim_dirty_bitmap_locked(s->bitmap, &error_abort); bdrv_enable_dirty_bitmap_locked(s->bitmap); } else { /* target not started, successor must be empty */ int64_t count = bdrv_get_dirty_count(s->bitmap); - BdrvDirtyBitmap *ret = bdrv_reclaim_dirty_bitmap_locked(s->bs, - s->bitmap, + BdrvDirtyBitmap *ret = bdrv_reclaim_dirty_bitmap_locked(s->bitmap, NULL); /* bdrv_reclaim_dirty_bitmap can fail only on no successor (it * must be) or on merge fail, but merge can't fail when second diff --git a/migration/block.c b/migration/block.c index 8e49382..c90288e 100644 --- a/migration/block.c +++ b/migration/block.c @@ -361,7 +361,7 @@ static int set_dirty_tracking(void) fail: QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) { if (bmds->dirty_bitmap) { - bdrv_release_dirty_bitmap(blk_bs(bmds->blk), bmds->dirty_bitmap); + bdrv_release_dirty_bitmap(bmds->dirty_bitmap); } } return ret; @@ -374,7 +374,7 @@ static void unset_dirty_tracking(void) BlkMigDevState *bmds; QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) { - bdrv_release_dirty_bitmap(blk_bs(bmds->blk), bmds->dirty_bitmap); + bdrv_release_dirty_bitmap(bmds->dirty_bitmap); } } |