Verify requeue handling
authorJens Axboe <jens.axboe@oracle.com>
Mon, 19 Feb 2007 12:21:35 +0000 (13:21 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 19 Feb 2007 12:21:35 +0000 (13:21 +0100)
If file is already filled, it's a requeue. In that case, don't grab
a new io_piece, we already filled the offsets in the io_u.

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

index f2ef10792a2c53969a894b94cccc3d8788ee9e07..6cbd0add35d2683186771a20f8b3079cb8079f5b 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -143,6 +143,12 @@ int get_next_verify(struct thread_data *td, struct io_u *io_u)
 {
        struct io_piece *ipo;
 
 {
        struct io_piece *ipo;
 
+       /*
+        * this io_u is from a requeue, we already filled the offsets
+        */
+       if (io_u->file)
+               return 0;
+
        if (!list_empty(&td->io_hist_list)) {
                ipo = list_entry(td->io_hist_list.next, struct io_piece, list);
 
        if (!list_empty(&td->io_hist_list)) {
                ipo = list_entry(td->io_hist_list.next, struct io_piece, list);