[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 27/58] block: implement .change_aio_ctx in child_of_bds
From: |
Kevin Wolf |
Subject: |
[PULL 27/58] block: implement .change_aio_ctx in child_of_bds |
Date: |
Thu, 27 Oct 2022 20:31:15 +0200 |
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
bdrv_child_cb_change_aio_ctx() is identical to
bdrv_child_cb_can_set_aio_ctx(), as we only need
to recursively go on the parent bs.
Note: bdrv_child_try_change_aio_context() is not called by
anyone at this point.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221025084952.2139888-6-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/block.c b/block.c
index 59319d9b0f..3386457083 100644
--- a/block.c
+++ b/block.c
@@ -1242,6 +1242,14 @@ static int bdrv_child_cb_inactivate(BdrvChild *child)
return 0;
}
+static bool bdrv_child_cb_change_aio_ctx(BdrvChild *child, AioContext *ctx,
+ GHashTable *visited, Transaction
*tran,
+ Error **errp)
+{
+ BlockDriverState *bs = child->opaque;
+ return bdrv_change_aio_context(bs, ctx, visited, tran, errp);
+}
+
static bool bdrv_child_cb_can_set_aio_ctx(BdrvChild *child, AioContext *ctx,
GSList **ignore, Error **errp)
{
@@ -1534,6 +1542,7 @@ const BdrvChildClass child_of_bds = {
.inactivate = bdrv_child_cb_inactivate,
.can_set_aio_ctx = bdrv_child_cb_can_set_aio_ctx,
.set_aio_ctx = bdrv_child_cb_set_aio_ctx,
+ .change_aio_ctx = bdrv_child_cb_change_aio_ctx,
.update_filename = bdrv_child_cb_update_filename,
.get_parent_aio_context = child_of_bds_get_parent_aio_context,
};
--
2.37.3
- [PULL 42/58] qcow2: add coroutine_fn annotation for indirect-called functions, (continued)
- [PULL 42/58] qcow2: add coroutine_fn annotation for indirect-called functions, Kevin Wolf, 2022/10/27
- [PULL 41/58] block: add missing coroutine_fn annotation to BlockDriverState callbacks, Kevin Wolf, 2022/10/27
- [PULL 52/58] qcow2: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 48/58] block: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 36/58] monitor: add missing coroutine_fn annotation, Kevin Wolf, 2022/10/27
- [PULL 50/58] parallels: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 29/58] block: use the new _change_ API instead of _can_set_ and _set_, Kevin Wolf, 2022/10/27
- [PULL 43/58] blkdebug: add missing coroutine_fn annotation for indirect-called functions, Kevin Wolf, 2022/10/27
- [PULL 55/58] vhdx: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 53/58] qed: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 27/58] block: implement .change_aio_ctx in child_of_bds,
Kevin Wolf <=
- [PULL 49/58] mirror: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 37/58] ssh: add missing coroutine_fn annotation, Kevin Wolf, 2022/10/27
- [PULL 26/58] blockjob: implement .change_aio_ctx in child_job, Kevin Wolf, 2022/10/27
- [PULL 23/58] block.c: assert bs->aio_context is written under BQL and drains, Kevin Wolf, 2022/10/27
- [PULL 38/58] block: add missing coroutine_fn annotation to prototypes, Kevin Wolf, 2022/10/27
- [PULL 44/58] qcow: manually add more coroutine_fn annotations, Kevin Wolf, 2022/10/27
- [PULL 47/58] commit: switch to *_co_* functions, Kevin Wolf, 2022/10/27
- [PULL 46/58] vmdk: manually add more coroutine_fn annotations, Kevin Wolf, 2022/10/27
- [PULL 40/58] coroutine-io: add missing coroutine_fn annotation to prototypes, Kevin Wolf, 2022/10/27
- [PULL 51/58] qcow: switch to *_co_* functions, Kevin Wolf, 2022/10/27