[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 05/11] aio: Mark ctx->notifier's client type as "
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v2 05/11] aio: Mark ctx->notifier's client type as "context" |
Date: |
Wed, 29 Jul 2015 12:42:08 +0800 |
It is important to include this for any blocking poll, on the other hand it is
also OK to exclude it otherwise.
Signed-off-by: Fam Zheng <address@hidden>
---
async.c | 4 ++--
include/block/aio.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/async.c b/async.c
index 43f9425..0bea602 100644
--- a/async.c
+++ b/async.c
@@ -231,7 +231,7 @@ aio_ctx_finalize(GSource *source)
AioContext *ctx = (AioContext *) source;
thread_pool_free(ctx->thread_pool);
- aio_set_event_notifier(ctx, &ctx->notifier, AIO_CLIENT_UNSPECIFIED, NULL);
+ aio_set_event_notifier(ctx, &ctx->notifier, AIO_CLIENT_CONTEXT, NULL);
event_notifier_cleanup(&ctx->notifier);
rfifolock_destroy(&ctx->lock);
qemu_mutex_destroy(&ctx->bh_lock);
@@ -306,7 +306,7 @@ AioContext *aio_context_new(Error **errp)
}
g_source_set_can_recurse(&ctx->source, true);
aio_set_event_notifier(ctx, &ctx->notifier,
- AIO_CLIENT_UNSPECIFIED,
+ AIO_CLIENT_CONTEXT,
(EventNotifierHandler *)
event_notifier_dummy_cb);
ctx->thread_pool = NULL;
diff --git a/include/block/aio.h b/include/block/aio.h
index 8b15105..b0b2345 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -275,6 +275,7 @@ bool aio_dispatch(AioContext *ctx);
#define AIO_CLIENT_UNSPECIFIED (1 << 0)
#define AIO_CLIENT_PROTOCOL (1 << 1)
#define AIO_CLIENT_NBD_SERVER (1 << 2)
+#define AIO_CLIENT_CONTEXT (1 << 3)
#define AIO_CLIENT_MASK_ALL -1
/* Progress in completing AIO work to occur. This can issue new pending
--
2.4.3
- [Qemu-devel] [PATCH v2 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane, Fam Zheng, 2015/07/29
- [Qemu-devel] [PATCH v2 02/11] aio: Save type to AioHandler, Fam Zheng, 2015/07/29
- [Qemu-devel] [PATCH v2 04/11] nbd: Mark fd handlers client type as "nbd server", Fam Zheng, 2015/07/29
- [Qemu-devel] [PATCH v2 01/11] aio: Introduce "type" in aio_set_fd_handler and aio_set_event_notifier, Fam Zheng, 2015/07/29
- [Qemu-devel] [PATCH v2 03/11] block: Mark fd handlers as "protocol", Fam Zheng, 2015/07/29
- [Qemu-devel] [PATCH v2 05/11] aio: Mark ctx->notifier's client type as "context",
Fam Zheng <=
- [Qemu-devel] [PATCH v2 06/11] dataplane: Mark host notifiers' client type as "dataplane", Fam Zheng, 2015/07/29
- [Qemu-devel] [PATCH v2 07/11] aio-posix: introduce aio_{disable, enable}_clients, Fam Zheng, 2015/07/29
- [Qemu-devel] [PATCH v2 08/11] aio-win32: Implement aio_{disable, enable}_clients, Fam Zheng, 2015/07/29
- [Qemu-devel] [PATCH v2 09/11] block: Introduce bdrv_aio_poll, Fam Zheng, 2015/07/29
- [Qemu-devel] [PATCH v2 10/11] block: Replace nested aio_poll with bdrv_aio_poll, Fam Zheng, 2015/07/29
- [Qemu-devel] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll, Fam Zheng, 2015/07/29