summaryrefslogtreecommitdiff
path: root/io_uring
AgeCommit message (Collapse)Author
2022-07-24io_uring: move opcode table to opdef.cJens Axboe
We already have the declarations in opdef.h, move the rest into its own file rather than in the main io_uring.c file. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move read/write related opcodes to its own fileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move remaining file table manipulation to filetable.cJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move rsrc related data, core, and commandsJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: split provided buffers handling into its own fileJens Axboe
Move both the opcodes related to it, and the internals code dealing with it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move cancelation into its own fileJens Axboe
This also helps cleanup the io_uring.h cancel parts, as we can make things static in the cancel.c file, mostly. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move poll handling into its own fileJens Axboe
Add a io_poll_issue() rather than export the general task_work locking and io_issue_sqe(), and put the io_op_defs definition and structure into a separate header file so that poll can use it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: add opcode name to io_op_defsJens Axboe
This kills the last per-op switch. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: include and forward-declaration sanitationJens Axboe
Remove some dead headers we no longer need, and get rid of the io_ring_ctx and io_uring_fops forward declarations. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move io_uring_task (tctx) helpers into its own fileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move fdinfo helpers to its own fileJens Axboe
This also means moving a bit more of the fixed file handling to the filetable side, which makes sense separately too. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: use io_is_uring_fops() consistentlyJens Axboe
Convert the last spots that check for io_uring_fops to use the provided helper instead. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move SQPOLL related handling into its own fileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move timeout opcodes and handling into its own fileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move our reference counting into a headerJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move msg_ring into its own fileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: split network related opcodes into its own fileJens Axboe
While at it, convert the handlers to just use io_eopnotsupp_prep() if CONFIG_NET isn't set. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move statx handling to its own fileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move epoll handler to its own fileJens Axboe
Would be nice to sort out Kconfig for this and don't even compile epoll.c if we don't have epoll configured. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: add a dummy -EOPNOTSUPP prep handlerJens Axboe
Add it and use it for the epoll handling, if epoll isn't configured. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move uring_cmd handling to its own fileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: split out open/close operationsJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: separate out file table handling codeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: split out fadvise/madvise operationsJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: split out fs related sync/fallocate functionsJens Axboe
This splits out sync_file_range, fsync, and fallocate. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: split out splice related operationsJens Axboe
This splits out splice and tee support. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: split out filesystem related operationsJens Axboe
This splits out renameat, unlinkat, mkdirat, symlinkat, and linkat. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move nop into its own fileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: move xattr related opcodes to its own fileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: handle completions in the coreJens Axboe
Normally request handlers complete requests themselves, if they don't return an error. For the latter case, the core will complete it for them. This is unhandy for pushing opcode handlers further out, as we don't want a bunch of inline completion code and we don't want to make the completion path slower than it is now. Let the core handle any completion, unless the handler explicitly asks us not to. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: set completion results upfrontJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: add io_uring_types.hJens Axboe
This adds definitions of structs that both the core and the various opcode handlers need to know about. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: define a request type cleanup handlerJens Axboe
This can move request type specific cleanup into a private handler, removing the need for the core io_uring parts to know what types they are dealing with. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: unify struct io_symlink and io_hardlinkJens Axboe
They are really just a subset of each other, just use the one type. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert iouring_cmd to io_cmd_typeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert xattr to use io_cmd_typeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert rsrc_update to io_cmd_typeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert msg and nop to io_cmd_typeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert splice to use io_cmd_typeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert epoll to io_cmd_typeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert file system request types to use io_cmd_typeJens Axboe
This converts statx, rename, unlink, mkdir, symlink, and hardlink to use io_cmd_type. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert madvise/fadvise to use io_cmd_typeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert open/close path to use io_cmd_typeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert timeout path to use io_cmd_typeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert cancel path to use io_cmd_typeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert the sync and fallocate paths to use io_cmd_typeJens Axboe
They all share the same struct io_sync, convert them to use the io_cmd_type approach instead. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert net related opcodes to use io_cmd_typeJens Axboe
This converts accept, connect, send/recv, sendmsg/recvmsg, shutdown, and socket to use io_cmd_type. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: remove recvmsg knowledge from io_arm_poll_handler()Jens Axboe
There's a special case for recvmsg with MSG_ERRQUEUE set. This is problematic as it means the core needs to know about this special request type. For now, just add a generic flag for it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert poll_update path to use io_cmd_typeJens Axboe
Remove struct io_poll_update from io_kiocb, and convert the poll path to use the io_cmd_type approach instead. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24io_uring: convert poll path to use io_cmd_typeJens Axboe
Remove struct io_poll_iocb from io_kiocb, and convert the poll path to use the io_cmd_type approach instead. While at it, rename io_poll_iocb to io_poll which is consistent with the other request type private structures. Signed-off-by: Jens Axboe <axboe@kernel.dk>