Skip to content

tctx setup cleanups

Jens Axboe io-uring 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2io_uring/tctx: have io_uring_alloc_task_context() return tctxio_uring/sqpoll.c io_uring/tctx.c io_uring/tctx.h+19 -140 replies
2/2io_uring/tctx: clean up __io_uring_add_tctx_node() error handlingio_uring/tctx.c+40 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCHSET for-next 0/2] tctx setup cleanups

Hi,

It's a bit annoying how io_uring_alloc_task_context() automatically assigns tsk->io_uring, when callers later may have paths that fail. This is fine because task cleanup deals with whatever state that ->io_uring may be in, but it would be cleaner to have it either be assigned if it's fully setup, or not assigned at all. These 2 patches do that by having io_uring_alloc_task_context() return the context rather than implicitly assigning it inside the task being passed. The caller must instead assign it to the task, when any operation that can fail has been completed.

No functional changes intended in this series, strictly a cleanup

 io_uring/sqpoll.c |  8 ++++-
 io_uring/tctx.c   | 77 +++++++++++++++++++++++++++++------------------
 io_uring/tctx.h   |  4 +--
 3 files changed, 57 insertions(+), 32 deletions(-)
Signature · 1 line
Jens Axboe