Add pending IO to the tail of the busy list
authorBruce Cran <bruce@cran.org.uk>
Wed, 10 Oct 2012 14:15:58 +0000 (08:15 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Oct 2012 14:15:58 +0000 (08:15 -0600)
We add at the head now. The windowsaio engine completes from
the head of the list, so lets ensure that we wait and complete
closer to the submit order.

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

diff --git a/io_u.c b/io_u.c
index a2c583df26bb43943d7bda1ebf05e6999d9432b6..e047677e1b507d0923dfe781f5c354f63248a62c 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -1096,7 +1096,7 @@ again:
 
                io_u->error = 0;
                flist_del(&io_u->list);
 
                io_u->error = 0;
                flist_del(&io_u->list);
-               flist_add(&io_u->list, &td->io_u_busylist);
+               flist_add_tail(&io_u->list, &td->io_u_busylist);
                td->cur_depth++;
                io_u->flags |= IO_U_F_IN_CUR_DEPTH;
        } else if (td->o.verify_async) {
                td->cur_depth++;
                io_u->flags |= IO_U_F_IN_CUR_DEPTH;
        } else if (td->o.verify_async) {