[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 02/10] block: Make bdrv_attach/detach_aio_context()
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PATCH 02/10] block: Make bdrv_attach/detach_aio_context() static |
Date: |
Mon, 6 May 2019 19:17:57 +0200 |
Since commit b97511c7bc8, there is no reason for block drivers any more
to call these functions (see the function comment in block_int.h). They
are now just internal helper functions for bdrv_set_aio_context()
and can be made static.
Signed-off-by: Kevin Wolf <address@hidden>
---
include/block/block_int.h | 21 ---------------------
block.c | 6 +++---
2 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index b150c5f047..aa2c638b02 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -965,27 +965,6 @@ void bdrv_parse_filename_strip_prefix(const char
*filename, const char *prefix,
void bdrv_add_before_write_notifier(BlockDriverState *bs,
NotifierWithReturn *notifier);
-/**
- * bdrv_detach_aio_context:
- *
- * May be called from .bdrv_detach_aio_context() to detach children from the
- * current #AioContext. This is only needed by block drivers that manage their
- * own children. Both ->file and ->backing are automatically handled and
- * block drivers should not call this function on them explicitly.
- */
-void bdrv_detach_aio_context(BlockDriverState *bs);
-
-/**
- * bdrv_attach_aio_context:
- *
- * May be called from .bdrv_attach_aio_context() to attach children to the new
- * #AioContext. This is only needed by block drivers that manage their own
- * children. Both ->file and ->backing are automatically handled and block
- * drivers should not call this function on them explicitly.
- */
-void bdrv_attach_aio_context(BlockDriverState *bs,
- AioContext *new_context);
-
/**
* bdrv_add_aio_context_notifier:
*
diff --git a/block.c b/block.c
index a70c01effb..00332c1eb4 100644
--- a/block.c
+++ b/block.c
@@ -5677,7 +5677,7 @@ static void
bdrv_do_remove_aio_context_notifier(BdrvAioNotifier *ban)
g_free(ban);
}
-void bdrv_detach_aio_context(BlockDriverState *bs)
+static void bdrv_detach_aio_context(BlockDriverState *bs)
{
BdrvAioNotifier *baf, *baf_tmp;
BdrvChild *child;
@@ -5709,8 +5709,8 @@ void bdrv_detach_aio_context(BlockDriverState *bs)
bs->aio_context = NULL;
}
-void bdrv_attach_aio_context(BlockDriverState *bs,
- AioContext *new_context)
+static void bdrv_attach_aio_context(BlockDriverState *bs,
+ AioContext *new_context)
{
BdrvAioNotifier *ban, *ban_tmp;
BdrvChild *child;
--
2.20.1
- [Qemu-block] [PATCH 00/10] block: AioContext management, part 1, Kevin Wolf, 2019/05/06
- [Qemu-block] [PATCH 01/10] block: Add bdrv_try_set_aio_context(), Kevin Wolf, 2019/05/06
- [Qemu-block] [PATCH 02/10] block: Make bdrv_attach/detach_aio_context() static,
Kevin Wolf <=
- [Qemu-block] [PATCH 03/10] block: Move recursion to bdrv_set_aio_context(), Kevin Wolf, 2019/05/06
- [Qemu-block] [PATCH 04/10] block: Propagate AioContext change to parents, Kevin Wolf, 2019/05/06
- [Qemu-block] [PATCH 05/10] test-block-iothread: Test AioContext propagation through the tree, Kevin Wolf, 2019/05/06
- [Qemu-block] [PATCH 06/10] block: Implement .(can_)set_aio_ctx for BlockBackend, Kevin Wolf, 2019/05/06
- [Qemu-block] [PATCH 07/10] block: Add blk_set_allow_aio_context_change(), Kevin Wolf, 2019/05/06
- [Qemu-block] [PATCH 09/10] blockjob: Remove AioContext notifiers, Kevin Wolf, 2019/05/06
- [Qemu-block] [PATCH 08/10] blockjob: Propagate AioContext change to all job nodes, Kevin Wolf, 2019/05/06
- [Qemu-block] [PATCH 10/10] test-block-iothread: Test AioContext propagation for block jobs, Kevin Wolf, 2019/05/06
- Re: [Qemu-block] [PATCH 00/10] block: AioContext management, part 1, Kevin Wolf, 2019/05/20