Skip to content
Snippets Groups Projects
Commit 5ceb9e39 authored by Fam Zheng's avatar Fam Zheng Committed by Stefan Hajnoczi
Browse files

aio: Introduce aio_external_disabled


This allows AioContext users to check the enable/disable state of
external clients.

Signed-off-by: default avatarFam Zheng <famz@redhat.com>
Message-id: 1446177989-6702-2-git-send-email-famz@redhat.com
Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
parent 8347c532
No related branches found
No related tags found
No related merge requests found
......@@ -405,6 +405,17 @@ static inline void aio_enable_external(AioContext *ctx)
atomic_dec(&ctx->external_disable_cnt);
}
/**
* 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment