Skip to content

Commit

Permalink
io_uring: flush completions for CQE32
Browse files Browse the repository at this point in the history
This flushes the completions according to their CQE type: the same
processing is done for the default CQE size, but for large CQE's the
extra1 and extra2 fields are filled in.

Signed-off-by: Stefan Roesch <shr@fb.com>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Link: https://lore.kernel.org/r/20220426182134.136504-8-shr@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Stefan Roesch authored and Jens Axboe committed May 9, 2022
1 parent 2fee6bc commit 0e2e5c4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -3056,8 +3056,12 @@ static void __io_submit_flush_completions(struct io_ring_ctx *ctx)
struct io_kiocb *req = container_of(node, struct io_kiocb,
comp_list);

if (!(req->flags & REQ_F_CQE_SKIP))
__io_fill_cqe_req_filled(ctx, req);
if (!(req->flags & REQ_F_CQE_SKIP)) {
if (!(ctx->flags & IORING_SETUP_CQE32))
__io_fill_cqe_req_filled(ctx, req);
else
__io_fill_cqe32_req_filled(ctx, req);
}
}

io_commit_cqring(ctx);
Expand Down

0 comments on commit 0e2e5c4

Please sign in to comment.