projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for different weights for reads and writes with bssplit
[fio.git]
/
ioengines.c
diff --git
a/ioengines.c
b/ioengines.c
index e447539c2051d1ece8714669e53a996a4ca3cbd3..2969840706d18f75965c083c574531d9ff2fa7e0 100644
(file)
--- a/
ioengines.c
+++ b/
ioengines.c
@@
-226,16
+226,15
@@
int td_io_queue(struct thread_data *td, struct io_u *io_u)
io_u->resid = 0;
if (td->io_ops->flags & FIO_SYNCIO) {
io_u->resid = 0;
if (td->io_ops->flags & FIO_SYNCIO) {
- fio_gettime(&io_u->issue_time, NULL);
- memcpy(&td->last_issue, &io_u->issue_time,
- sizeof(struct timeval));
+ if (fio_fill_issue_time(td))
+ fio_gettime(&io_u->issue_time, NULL);
/*
/*
- *
for a sync engine, set the timeout upfront
+ *
only used for iolog
*/
*/
- if (
mtime_since(&td->timeout_end, &io_u->issue_tim
e)
- < IO_U_TIMEOUT)
-
io_u_set_timeout(td
);
+ if (
td->o.read_iolog_fil
e)
+ memcpy(&td->last_issue, &io_u->issue_time,
+
sizeof(struct timeval)
);
}
if (io_u->ddir != DDIR_SYNC)
}
if (io_u->ddir != DDIR_SYNC)
@@
-271,18
+270,15
@@
int td_io_queue(struct thread_data *td, struct io_u *io_u)
}
if ((td->io_ops->flags & FIO_SYNCIO) == 0) {
}
if ((td->io_ops->flags & FIO_SYNCIO) == 0) {
- fio_gettime(&io_u->issue_time, NULL);
- memcpy(&td->last_issue, &io_u->issue_time,
- sizeof(struct timeval));
+ if (fio_fill_issue_time(td))
+ fio_gettime(&io_u->issue_time, NULL);
/*
/*
- *
async engine, set the timeout here
+ *
only used for iolog
*/
*/
- if (ret == FIO_Q_QUEUED &&
- (mtime_since(&td->timeout_end, &io_u->issue_time)
- < IO_U_TIMEOUT)) {
- io_u_set_timeout(td);
- }
+ if (td->o.read_iolog_file)
+ memcpy(&td->last_issue, &io_u->issue_time,
+ sizeof(struct timeval));
}
return ret;
}
return ret;
@@
-409,3
+405,11
@@
int td_io_close_file(struct thread_data *td, struct fio_file *f)
return put_file(td, f);
}
return put_file(td, f);
}
+
+int td_io_get_file_size(struct thread_data *td, struct fio_file *f)
+{
+ if (!td->io_ops->get_file_size)
+ return 0;
+
+ return td->io_ops->get_file_size(td, f);
+}