projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
client: move jobs_eta to the end of client_eta
[fio.git]
/
ioengines.c
diff --git
a/ioengines.c
b/ioengines.c
index a87175a23aa74999999ec18a64edf823e84aff90..93e763124c1b18f56bdfc6eb54e912f0b0f11788 100644
(file)
--- a/
ioengines.c
+++ b/
ioengines.c
@@
-236,7
+236,7
@@
int td_io_getevents(struct thread_data *td, unsigned int min, unsigned int max,
out:
if (r >= 0) {
/*
out:
if (r >= 0) {
/*
- * Reflect that our submitted requests were retrieved with
+ * Reflect that our submitted requests were retrieved with
* whatever OS async calls are in the underlying engine.
*/
td->io_u_in_flight -= r;
* whatever OS async calls are in the underlying engine.
*/
td->io_u_in_flight -= r;
@@
-260,6
+260,11
@@
int td_io_queue(struct thread_data *td, struct io_u *io_u)
assert(fio_file_open(io_u->file));
assert(fio_file_open(io_u->file));
+ /*
+ * If using a write iolog, store this entry.
+ */
+ log_io_u(td, io_u);
+
io_u->error = 0;
io_u->resid = 0;
io_u->error = 0;
io_u->resid = 0;
@@
-275,8
+280,8
@@
int td_io_queue(struct thread_data *td, struct io_u *io_u)
sizeof(struct timeval));
}
sizeof(struct timeval));
}
- if (ddir_rw(
io_u->ddir
))
- td->io_issues[
io_u->ddir
]++;
+ if (ddir_rw(
acct_ddir(io_u)
))
+ td->io_issues[
acct_ddir(io_u)
]++;
ret = td->io_ops->queue(td, io_u);
ret = td->io_ops->queue(td, io_u);
@@
-361,14
+366,14
@@
int td_io_commit(struct thread_data *td)
if (!td->cur_depth || !td->io_u_queued)
return 0;
if (!td->cur_depth || !td->io_u_queued)
return 0;
- io_u_mark_depth(td, td->io_u_queued);
+ io_u_mark_depth(td, td->io_u_queued);
if (td->io_ops->commit) {
ret = td->io_ops->commit(td);
if (ret)
td_verror(td, -ret, "io commit");
}
if (td->io_ops->commit) {
ret = td->io_ops->commit(td);
if (ret)
td_verror(td, -ret, "io commit");
}
-
+
/*
* Reflect that events were submitted as async IO requests.
*/
/*
* Reflect that events were submitted as async IO requests.
*/
@@
-397,7
+402,7
@@
int td_io_open_file(struct thread_data *td, struct fio_file *f)
return 1;
}
return 1;
}
- fio_file_reset(f);
+ fio_file_reset(
td,
f);
fio_file_set_open(f);
fio_file_clear_closing(f);
disk_util_inc(f->du);
fio_file_set_open(f);
fio_file_clear_closing(f);
disk_util_inc(f->du);
@@
-470,7
+475,9
@@
int td_io_close_file(struct thread_data *td, struct fio_file *f)
fio_file_set_closing(f);
disk_util_dec(f->du);
fio_file_set_closing(f);
disk_util_dec(f->du);
- unlock_file_all(td, f);
+
+ if (td->o.file_lock_mode != FILE_LOCK_NONE)
+ unlock_file_all(td, f);
return put_file(td, f);
}
return put_file(td, f);
}
@@
-533,7
+540,7
@@
int do_io_u_trim(struct thread_data *td, struct io_u *io_u)
ret = os_trim(f->fd, io_u->offset, io_u->xfer_buflen);
if (!ret)
ret = os_trim(f->fd, io_u->offset, io_u->xfer_buflen);
if (!ret)
- return io_u->xfer_buflen;
;
+ return io_u->xfer_buflen;
io_u->error = ret;
return 0;
io_u->error = ret;
return 0;