aboutsummaryrefslogtreecommitdiff
path: root/nbd/server.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2019-03-12 12:05:48 -0400
committerJohn Snow <jsnow@redhat.com>2019-03-12 12:05:48 -0400
commit27a1b301a448a0426a96716484fc034b73c10c51 (patch)
treeaa3d545a9355cfd2a3c0a021566f9a045d5fece0 /nbd/server.c
parent21d2376f264bcaa1692bd71ab1f99b9b0ff5afbf (diff)
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>
Diffstat (limited to 'nbd/server.c')
-rw-r--r--nbd/server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nbd/server.c b/nbd/server.c
index 6c6cade12b..ebb1031f58 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1510,7 +1510,7 @@ NBDExport *nbd_export_new(BlockDriverState *bs, uint64_t dev_offset,
goto fail;
}
- if (bdrv_dirty_bitmap_user_locked(bm)) {
+ if (bdrv_dirty_bitmap_busy(bm)) {
error_setg(errp, "Bitmap '%s' is in use", bitmap);
goto fail;
}
@@ -1523,7 +1523,7 @@ NBDExport *nbd_export_new(BlockDriverState *bs, uint64_t dev_offset,
goto fail;
}
- bdrv_dirty_bitmap_set_qmp_locked(bm, true);
+ bdrv_dirty_bitmap_set_busy(bm, true);
exp->export_bitmap = bm;
exp->export_bitmap_context = g_strdup_printf("qemu:dirty-bitmap:%s",
bitmap);
@@ -1641,7 +1641,7 @@ void nbd_export_put(NBDExport *exp)
}
if (exp->export_bitmap) {
- bdrv_dirty_bitmap_set_qmp_locked(exp->export_bitmap, false);
+ bdrv_dirty_bitmap_set_busy(exp->export_bitmap, false);
g_free(exp->export_bitmap_context);
}