[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/7] aio: Introduce aio_external_disabled
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 3/7] aio: Introduce aio_external_disabled |
Date: |
Fri, 6 Nov 2015 17:52:25 +0000 |
From: Fam Zheng <address@hidden>
This allows AioContext users to check the enable/disable state of
external clients.
Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
include/block/aio.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/block/aio.h b/include/block/aio.h
index 92efc5e..cab7c76 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -406,6 +406,17 @@ static inline void aio_enable_external(AioContext *ctx)
}
/**
+ * aio_external_disabled:
+ * @ctx: the aio context
+ *
+ * Return true if the external clients are disabled.
+ */
+static inline bool aio_external_disabled(AioContext *ctx)
+{
+ return atomic_read(&ctx->external_disable_cnt);
+}
+
+/**
* aio_node_check:
* @ctx: the aio context
* @is_external: Whether or not the checked node is an external event source.
--
2.5.0
- [Qemu-devel] [PULL 0/7] Block patches, Stefan Hajnoczi, 2015/11/06
- [Qemu-devel] [PULL 1/7] dataplane: simplify indirect descriptor read, Stefan Hajnoczi, 2015/11/06
- [Qemu-devel] [PULL 2/7] dataplane: support non-contigious s/g, Stefan Hajnoczi, 2015/11/06
- [Qemu-devel] [PULL 3/7] aio: Introduce aio_external_disabled,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 4/7] aio: Introduce aio_context_setup, Stefan Hajnoczi, 2015/11/06
- [Qemu-devel] [PULL 5/7] aio: Introduce aio-epoll.c, Stefan Hajnoczi, 2015/11/06
- [Qemu-devel] [PULL 7/7] blockdev: acquire AioContext in hmp_commit(), Stefan Hajnoczi, 2015/11/06
- [Qemu-devel] [PULL 6/7] monitor: add missed aio_context_acquire into vm_completion call, Stefan Hajnoczi, 2015/11/06
- Re: [Qemu-devel] [PULL 0/7] Block patches, Peter Maydell, 2015/11/06