mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
block/dirty-bitmaps: unify qmp_locked and user_locked calls
These mean the same thing now. Unify them and rename the merged call bdrv_dirty_bitmap_busy to indicate semantically what we are describing, as well as help disambiguate from the various _locked and _unlocked versions of bitmap helpers that refer to mutex locks. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190223000614.13894-8-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
21d2376f26
commit
27a1b301a4
5 changed files with 36 additions and 42 deletions
|
@ -261,7 +261,7 @@ static void dirty_bitmap_mig_cleanup(void)
|
|||
|
||||
while ((dbms = QSIMPLEQ_FIRST(&dirty_bitmap_mig_state.dbms_list)) != NULL) {
|
||||
QSIMPLEQ_REMOVE_HEAD(&dirty_bitmap_mig_state.dbms_list, entry);
|
||||
bdrv_dirty_bitmap_set_qmp_locked(dbms->bitmap, false);
|
||||
bdrv_dirty_bitmap_set_busy(dbms->bitmap, false);
|
||||
bdrv_unref(dbms->bs);
|
||||
g_free(dbms);
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ static int init_dirty_bitmap_migration(void)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (bdrv_dirty_bitmap_user_locked(bitmap)) {
|
||||
if (bdrv_dirty_bitmap_busy(bitmap)) {
|
||||
error_report("Can't migrate a bitmap that is in use by another operation: '%s'",
|
||||
bdrv_dirty_bitmap_name(bitmap));
|
||||
goto fail;
|
||||
|
@ -314,7 +314,7 @@ static int init_dirty_bitmap_migration(void)
|
|||
}
|
||||
|
||||
bdrv_ref(bs);
|
||||
bdrv_dirty_bitmap_set_qmp_locked(bitmap, true);
|
||||
bdrv_dirty_bitmap_set_busy(bitmap, true);
|
||||
|
||||
dbms = g_new0(DirtyBitmapMigBitmapState, 1);
|
||||
dbms->bs = bs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue