summaryrefslogtreecommitdiffstats
path: root/io_uring/io_uring.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-10-21 21:32:19 +0200
committerJens Axboe <axboe@kernel.dk>2024-10-29 20:43:27 +0100
commit81d8191eb99d95b32e55d09d74f682d40d3e74e9 (patch)
treebec1d88fda87b11bee440fa30ecdf66c32a4b049 /io_uring/io_uring.h
parentio_uring: move max entry definition and ring sizing into header (diff)
downloadlinux-81d8191eb99d95b32e55d09d74f682d40d3e74e9.tar.xz
linux-81d8191eb99d95b32e55d09d74f682d40d3e74e9.zip
io_uring: abstract out a bit of the ring filling logic
Abstract out a io_uring_fill_params() helper, which fills out the necessary bits of struct io_uring_params. Add it to io_uring.h as well, in preparation for having another internal user of it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.h')
-rw-r--r--io_uring/io_uring.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
index 4a471a810f02..e3e6cb14de5d 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -70,6 +70,7 @@ static inline bool io_should_wake(struct io_wait_queue *iowq)
unsigned long rings_size(unsigned int flags, unsigned int sq_entries,
unsigned int cq_entries, size_t *sq_offset);
+int io_uring_fill_params(unsigned entries, struct io_uring_params *p);
bool io_cqe_cache_refill(struct io_ring_ctx *ctx, bool overflow);
int io_run_task_work_sig(struct io_ring_ctx *ctx);
void io_req_defer_failed(struct io_kiocb *req, s32 res);