projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve precision of the io_limit setting
[fio.git]
/
ioengines.c
diff --git
a/ioengines.c
b/ioengines.c
index 56149381894abfb56e9bd7a47368cc2773278fde..88f67d51dbaede8438a0a589073e816887a8fb6b 100644
(file)
--- a/
ioengines.c
+++ b/
ioengines.c
@@
-220,7
+220,7
@@
int td_io_prep(struct thread_data *td, struct io_u *io_u)
}
int td_io_getevents(struct thread_data *td, unsigned int min, unsigned int max,
}
int td_io_getevents(struct thread_data *td, unsigned int min, unsigned int max,
- struct timespec *t)
+
const
struct timespec *t)
{
int r = 0;
{
int r = 0;
@@
-294,8
+294,10
@@
int td_io_queue(struct thread_data *td, struct io_u *io_u)
sizeof(struct timeval));
}
sizeof(struct timeval));
}
- if (ddir_rw(acct_ddir(io_u)))
+ if (ddir_rw(acct_ddir(io_u)))
{
td->io_issues[acct_ddir(io_u)]++;
td->io_issues[acct_ddir(io_u)]++;
+ td->io_issue_bytes[acct_ddir(io_u)] += io_u->xfer_buflen;
+ }
ret = td->io_ops->queue(td, io_u);
ret = td->io_ops->queue(td, io_u);
@@
-321,7
+323,7
@@
int td_io_queue(struct thread_data *td, struct io_u *io_u)
"support direct IO, or iomem_align= is bad.\n");
}
"support direct IO, or iomem_align= is bad.\n");
}
- if (!td->io_ops->commit ||
ddir_trim(io_u->ddir)
) {
+ if (!td->io_ops->commit ||
io_u->ddir == DDIR_TRIM
) {
io_u_mark_submit(td, 1);
io_u_mark_complete(td, 1);
}
io_u_mark_submit(td, 1);
io_u_mark_complete(td, 1);
}