aboutsummaryrefslogtreecommitdiff
path: root/migration/block.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2019-07-29 16:35:53 -0400
committerJohn Snow <jsnow@redhat.com>2019-08-16 16:28:02 -0400
commit28636b8211c30e9b7ab05806a8824eabf377f307 (patch)
tree222052df2f06426b22f2396380de35b0527cffa6 /migration/block.c
parentb7661ca5d84a7d330acc3c3f471e757e55261f84 (diff)
downloadqemu-28636b8211c30e9b7ab05806a8824eabf377f307.zip
qemu-28636b8211c30e9b7ab05806a8824eabf377f307.tar.gz
qemu-28636b8211c30e9b7ab05806a8824eabf377f307.tar.bz2
block/dirty-bitmap: add bdrv_dirty_bitmap_get
Add a public interface for get. While we're at it, rename "bdrv_get_dirty_bitmap_locked" to "bdrv_dirty_bitmap_get_locked". (There are more functions to rename to the bdrv_dirty_bitmap_VERB form, but they will wait until the conclusion of this series.) Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 20190709232550.10724-11-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'migration/block.c')
-rw-r--r--migration/block.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/migration/block.c b/migration/block.c
index e81fd7e..aa747b5 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -521,7 +521,6 @@ static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds,
int is_async)
{
BlkMigBlock *blk;
- BlockDriverState *bs = blk_bs(bmds->blk);
int64_t total_sectors = bmds->total_sectors;
int64_t sector;
int nr_sectors;
@@ -536,8 +535,8 @@ static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds,
blk_mig_unlock();
}
bdrv_dirty_bitmap_lock(bmds->dirty_bitmap);
- if (bdrv_get_dirty_locked(bs, bmds->dirty_bitmap,
- sector * BDRV_SECTOR_SIZE)) {
+ if (bdrv_dirty_bitmap_get_locked(bmds->dirty_bitmap,
+ sector * BDRV_SECTOR_SIZE)) {
if (total_sectors - sector < BDRV_SECTORS_PER_DIRTY_CHUNK) {
nr_sectors = total_sectors - sector;
} else {