Update windowsaio for changes to the thread structure
authorBruce Cran <bruce@cran.org.uk>
Wed, 29 May 2013 10:06:24 +0000 (12:06 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 29 May 2013 10:06:24 +0000 (12:06 +0200)
The free/busy/requeue list has been replaced with a FIFO + ring: update
windowsaio.c to work with the new code.

Modified by Jens to check for IO_U_F_FLIGHT before doing engine
private checks.

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

index ee89fa1..16df740 100644 (file)
@@ -259,9 +259,9 @@ static int fio_windowsaio_getevents(struct thread_data *td, unsigned int min,
                                        unsigned int max, struct timespec *t)
 {
        struct windowsaio_data *wd = td->io_ops->data;
-       struct flist_head *entry;
        unsigned int dequeued = 0;
        struct io_u *io_u;
+       int i;
        struct fio_overlapped *fov;
        DWORD start_count = 0;
        DWORD end_count = 0;
@@ -275,8 +275,10 @@ static int fio_windowsaio_getevents(struct thread_data *td, unsigned int min,
        }
 
        do {
-               flist_for_each(entry, &td->io_u_busylist) {
-                       io_u = flist_entry(entry, struct io_u, list);
+               io_u_qiter(&td->io_u_all, io_u, i) {
+                       if (!(io_u->flags & IO_U_F_FLIGHT))
+                               continue;
+
                        fov = (struct fio_overlapped*)io_u->engine_data;
 
                        if (fov->io_complete) {