summaryrefslogtreecommitdiffstats
path: root/block.c
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito2022-10-25 10:49:52 +0200
committerKevin Wolf2022-10-27 20:14:11 +0200
commit142e6907120d12de1e7ac402e556597ebbab86e8 (patch)
tree2cfe728224f939e1b6f13cbc560daa3bd3c37c5a /block.c
parentblock: rename bdrv_child_try_change_aio_context in bdrv_try_change_aio_context (diff)
downloadqemu-142e6907120d12de1e7ac402e556597ebbab86e8.tar.gz
qemu-142e6907120d12de1e7ac402e556597ebbab86e8.tar.xz
qemu-142e6907120d12de1e7ac402e556597ebbab86e8.zip
block: remove bdrv_try_set_aio_context and replace it with bdrv_try_change_aio_context
No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20221025084952.2139888-11-eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/block.c b/block.c
index cf97a35f82..5da15d0f4e 100644
--- a/block.c
+++ b/block.c
@@ -2904,7 +2904,7 @@ static void bdrv_attach_child_common_abort(void *opaque)
bdrv_replace_child_noperm(s->child, NULL);
if (bdrv_get_aio_context(bs) != s->old_child_ctx) {
- bdrv_try_set_aio_context(bs, s->old_child_ctx, &error_abort);
+ bdrv_try_change_aio_context(bs, s->old_child_ctx, NULL, &error_abort);
}
if (bdrv_child_get_parent_aio_context(s->child) != s->old_parent_ctx) {
@@ -2975,7 +2975,8 @@ static BdrvChild *bdrv_attach_child_common(BlockDriverState *child_bs,
parent_ctx = bdrv_child_get_parent_aio_context(new_child);
if (child_ctx != parent_ctx) {
Error *local_err = NULL;
- int ret = bdrv_try_set_aio_context(child_bs, parent_ctx, &local_err);
+ int ret = bdrv_try_change_aio_context(child_bs, parent_ctx, NULL,
+ &local_err);
if (ret < 0 && child_class->change_aio_ctx) {
Transaction *tran = tran_new();
@@ -3065,7 +3066,7 @@ static void bdrv_detach_child(BdrvChild *child)
* When the parent requiring a non-default AioContext is removed, the
* node moves back to the main AioContext
*/
- bdrv_try_set_aio_context(old_bs, qemu_get_aio_context(), NULL);
+ bdrv_try_change_aio_context(old_bs, qemu_get_aio_context(), NULL, NULL);
}
}
@@ -7407,13 +7408,6 @@ int bdrv_try_change_aio_context(BlockDriverState *bs, AioContext *ctx,
return 0;
}
-int bdrv_try_set_aio_context(BlockDriverState *bs, AioContext *ctx,
- Error **errp)
-{
- GLOBAL_STATE_CODE();
- return bdrv_try_change_aio_context(bs, ctx, NULL, errp);
-}
-
void bdrv_add_aio_context_notifier(BlockDriverState *bs,
void (*attached_aio_context)(AioContext *new_context, void *opaque),
void (*detach_aio_context)(void *opaque), void *opaque)