Fix short IO handling for verifies as well
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index ef63ce6e4e47b384da36024e50a2c2504aa16b79..125cf6fb6cfa93b44aaa468b0f5f6fd7fcfbbb85 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -342,10 +342,17 @@ static void do_verify(struct thread_data *td)
                                        put_io_u(td, io_u);
                                        break;
                                }
+
                                io_u->xfer_buflen = io_u->resid;
                                io_u->xfer_buf += bytes;
+                               io_u->offset += bytes;
+
+                               if (io_u->offset == io_u->file->real_file_size)
+                                       goto sync_done;
+
                                requeue_io_u(td, &io_u);
                        } else {
+sync_done:
                                ret = io_u_sync_complete(td, io_u);
                                if (ret < 0)
                                        break;