Thread (37 messages) 37 messages, 5 authors, 2019-01-10

Re: [PATCH 10/16] io_uring: split kiocb init from allocation

flat view

From: Jens Axboe <axboe@kernel.dk>
Date: 2019-01-09 16:56:13
Also in: linux-arch, linux-fsdevel

On 1/9/19 5:12 AM, Christoph Hellwig wrote:
On Tue, Jan 08, 2019 at 09:56:39AM -0700, Jens Axboe wrote:
quoted
In preparation from having pre-allocated requests, that we then just
need to initialize before use.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 fs/io_uring.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index afbaebb63012..11d045f0f799 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -202,6 +202,14 @@ static struct io_uring_event *io_peek_cqring(struct io_ring_ctx *ctx)
 	return &ring->events[tail & ctx->cq_ring.ring_mask];
 }
 
+static void io_req_init(struct io_ring_ctx *ctx, struct io_kiocb *req)
+{
+	percpu_ref_get(&ctx->refs);
+	req->ki_ctx = ctx;
+	INIT_LIST_HEAD(&req->ki_list);
+	req->ki_flags = 0;
We still only have a single caller of this in the final tree, and
I don't think this function helps.  So I'd just drop the patch.
Dropped

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help