X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=fio.c;h=89cc5996ca8854c9b9c655a232a366e8d278c9d7;hb=cca73aa73328c3cb4d78adf1e54345701eff29fd;hp=ef63ce6e4e47b384da36024e50a2c2504aa16b79;hpb=5a7c56804dafab5770797044a4f1d259fe708dfb;p=fio.git diff --git a/fio.c b/fio.c index ef63ce6e..89cc5996 100644 --- a/fio.c +++ b/fio.c @@ -35,7 +35,6 @@ #include #include "fio.h" -#include "os.h" unsigned long page_mask; unsigned long page_size; @@ -342,10 +341,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; @@ -1203,10 +1209,8 @@ int main(int argc, char *argv[]) if (parse_options(argc, argv)) return 1; - if (!thread_number) { - log_err("Nothing to do\n"); - return 1; - } + if (!thread_number) + return 0; ps = sysconf(_SC_PAGESIZE); if (ps < 0) {