From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Fam Zheng <famz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PULL 3/7] aio: Introduce aio_external_disabled
Date: Fri, 6 Nov 2015 17:52:25 +0000 [thread overview]
Message-ID: <1446832349-14952-4-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1446832349-14952-1-git-send-email-stefanha@redhat.com>
From: Fam Zheng <famz@redhat.com>
This allows AioContext users to check the enable/disable state of
external clients.
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1446177989-6702-2-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
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
next prev parent reply other threads:[~2015-11-06 17:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 17:52 [Qemu-devel] [PULL 0/7] Block patches Stefan Hajnoczi
2015-11-06 17:52 ` [Qemu-devel] [PULL 1/7] dataplane: simplify indirect descriptor read Stefan Hajnoczi
2015-11-06 17:52 ` [Qemu-devel] [PULL 2/7] dataplane: support non-contigious s/g Stefan Hajnoczi
2015-11-06 17:52 ` Stefan Hajnoczi [this message]
2015-11-06 17:52 ` [Qemu-devel] [PULL 4/7] aio: Introduce aio_context_setup Stefan Hajnoczi
2015-11-06 17:52 ` [Qemu-devel] [PULL 5/7] aio: Introduce aio-epoll.c Stefan Hajnoczi
2015-11-06 17:52 ` [Qemu-devel] [PULL 6/7] monitor: add missed aio_context_acquire into vm_completion call Stefan Hajnoczi
2015-11-06 17:52 ` [Qemu-devel] [PULL 7/7] blockdev: acquire AioContext in hmp_commit() Stefan Hajnoczi
2015-11-06 18:07 ` [Qemu-devel] [PULL 0/7] Block patches Peter Maydell
2015-11-09 2:00 ` Fam Zheng
2015-11-09 7:35 ` Markus Armbruster
2015-11-09 10:01 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446832349-14952-4-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=famz@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).