Requeue io_u flags fix
authorJens Axboe <jens.axboe@oracle.com>
Sat, 24 Feb 2007 12:31:57 +0000 (13:31 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Sat, 24 Feb 2007 12:31:57 +0000 (13:31 +0100)
We need to clear IO_U_F_FLIGHT and set IO_U_F_FREE in requeue.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
io_u.c

diff --git a/io_u.c b/io_u.c
index 53e57b4ffe4a6bcc51907c54ac25ca2531c73d1a..372f46a0507ddd941f47ff9d38a16a6d745569ae 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -211,6 +211,9 @@ void requeue_io_u(struct thread_data *td, struct io_u **io_u)
 {
        struct io_u *__io_u = *io_u;
 
+       __io_u->flags |= IO_U_F_FREE;
+       __io_u->flags &= ~IO_U_F_FLIGHT;
+
        list_del(&__io_u->list);
        list_add_tail(&__io_u->list, &td->io_u_requeues);
        td->cur_depth--;