unsigned int eventfd_async: 1;
unsigned int restricted: 1;
unsigned int off_timeout_used: 1;
- unsigned int drain_used: 1;
+ unsigned int drain_active: 1;
} ____cacheline_aligned_in_smp;
/* submission data */
static void io_commit_cqring(struct io_ring_ctx *ctx)
{
- if (unlikely(ctx->off_timeout_used || ctx->drain_used)) {
+ if (unlikely(ctx->off_timeout_used || ctx->drain_active)) {
if (ctx->off_timeout_used)
io_flush_timeouts(ctx);
- if (ctx->drain_used)
+ if (ctx->drain_active)
io_queue_deferred(ctx);
}
/* order cqe stores with ring update */
/* Still need defer if there is pending req in defer list. */
if (likely(list_empty_careful(&ctx->defer_list) &&
- !(req->flags & REQ_F_IO_DRAIN)))
+ !(req->flags & REQ_F_IO_DRAIN))) {
+ ctx->drain_active = false;
return false;
+ }
seq = io_get_sequence(req);
/* Still a chance to pass the sequence check */
static inline void io_queue_sqe(struct io_kiocb *req)
{
- if (unlikely(req->ctx->drain_used) && io_drain_req(req))
+ if (unlikely(req->ctx->drain_active) && io_drain_req(req))
return;
if (likely(!(req->flags & REQ_F_FORCE_ASYNC))) {
}
if (unlikely(req->flags & REQ_F_IO_DRAIN)) {
- ctx->drain_used = true;
+ ctx->drain_active = true;
/*
* Taking sequential execution of a link, draining both sides