]> git.infradead.org Git - users/hch/misc.git/commitdiff
io_uring: improve request linking trace
authorJens Axboe <axboe@kernel.dk>
Fri, 20 Sep 2024 05:38:01 +0000 (23:38 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 20 Sep 2024 06:17:46 +0000 (00:17 -0600)
Right now any link trace is listed as being linked after the head
request in the chain, but it's more useful to note explicitly which
request a given new request is chained to. Change the link trace to dump
the tail request so that chains are immediately apparent when looking at
traces.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c

index 11c455b638a287caf384839cfc0a940266fc569b..d306f566a944ca7b35518845dc7c45a381513b7c 100644 (file)
@@ -2153,7 +2153,7 @@ static inline int io_submit_sqe(struct io_ring_ctx *ctx, struct io_kiocb *req,
         * conditions are true (normal request), then just queue it.
         */
        if (unlikely(link->head)) {
-               trace_io_uring_link(req, link->head);
+               trace_io_uring_link(req, link->last);
                link->last->link = req;
                link->last = req;