minor fixes
cover minor fixes
Two minor fixes, nothing serious
Pavel Begunkov (2):
io_uring: correct io_queue_async_work() traces
io_uring: don't skip file_end_write() on reissue
fs/io_uring.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
Signature · 1 line
2.24.0
PATCH 1/2 io_uring: correct io_queue_async_work() traces
Request's io-wq work is hashed in io_prep_async_link(), so as trace_io_uring_queue_async_work() looks at it should follow after prep has been done.
--- fs/io_uring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/io_uring.c +2 -2
@@ -1239,10 +1239,10 @@ static void io_queue_async_work(struct io_kiocb *req)BUG_ON (!tctx);BUG_ON (!tctx->io_wq); -trace_io_uring_queue_async_work (ctx,io_wq_is_hashed (&req->work), req, - &req->work, req->flags);/* init ->work of the whole link before punting */ io_prep_async_link (req); +trace_io_uring_queue_async_work (ctx,io_wq_is_hashed (&req->work), req, + &req->work, req->flags);io_wq_enqueue (tctx->io_wq, &req->work);if (link)io_queue_linked_timeout (link);
Signature · 1 line
2.24.0
PATCH 2/2 io_uring: don't skip file_end_write() on reissue
In reply to Pavel BegunkovDon't miss to call kiocb_end_write() from __io_complete_rw() on reissue. Shouldn't be much of a problem as the function actually does some work only for ISREG, and NONBLOCK won't be reissued.
--- fs/io_uring.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
fs/io_uring.c +2 -3
@@ -2524,13 +2524,12 @@ static void __io_complete_rw(struct io_kiocb *req, long res, long res2, {int cflags =0 ; +if (req->rw.kiocb.ki_flags &IOCB_WRITE ) +kiocb_end_write (req);if ((res == -EAGAIN || res == -EOPNOTSUPP ) &&io_rw_reissue (req))return ;if (res != req->result)req_set_fail_links (req); - -if (req->rw.kiocb.ki_flags &IOCB_WRITE ) -kiocb_end_write (req);if (req->flags &REQ_F_BUFFER_SELECTED ) cflags =io_put_rw_kbuf (req);__io_req_complete (req, issue_flags, res, cflags);
Signature · 1 line
2.24.0
Quoted 8 lines · Pavel Begunkov
Two minor fixes, nothing serious
Pavel Begunkov (2):
io_uring: correctio_queue_async_work()traces
io_uring: don't skipfile_end_write()on reissuefs/io_uring.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
Thanks, applied.
Signature · 1 line
Jens Axboe