X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=ioengines.c;h=879c5f1c1f438a20a5116bec93968fc0d4e0642f;hb=f85ac25a7d5c9d5ba4d5c73363a6a2a461a9b013;hp=77c45f7ff05e1bc40224d2c4a784efa42add0a1c;hpb=2ba1c290d09af6d630d84a58b97b8032f73bc2ce;p=fio.git diff --git a/ioengines.c b/ioengines.c index 77c45f7f..879c5f1c 100644 --- a/ioengines.c +++ b/ioengines.c @@ -226,10 +226,11 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) if (io_u->ddir != DDIR_SYNC) td->io_issues[io_u->ddir]++; - io_u_mark_depth(td, io_u); - ret = td->io_ops->queue(td, io_u); + if (ret != FIO_Q_BUSY) + io_u_mark_depth(td, io_u); + if (ret == FIO_Q_QUEUED) { int r; @@ -302,7 +303,6 @@ int td_io_open_file(struct thread_data *td, struct fio_file *f) } f->last_free_lookup = 0; - f->last_completed_pos = 0; f->last_pos = f->file_offset; f->flags |= FIO_FILE_OPEN; f->flags &= ~FIO_FILE_CLOSING; @@ -343,7 +343,7 @@ err: return 1; } -void td_io_close_file(struct thread_data *td, struct fio_file *f) +int td_io_close_file(struct thread_data *td, struct fio_file *f) { if (!(f->flags & FIO_FILE_CLOSING)) log_file(td, f, FIO_LOG_CLOSE_FILE); @@ -353,5 +353,5 @@ void td_io_close_file(struct thread_data *td, struct fio_file *f) */ f->flags |= FIO_FILE_CLOSING; - put_file(td, f); + return put_file(td, f); }