projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add environment-variable substitution to config options
[fio.git]
/
ioengines.c
diff --git
a/ioengines.c
b/ioengines.c
index 8975591d080acb0efc55894e2f40ec830df9d1fd..e447539c2051d1ece8714669e53a996a4ca3cbd3 100644
(file)
--- a/
ioengines.c
+++ b/
ioengines.c
@@
-195,9
+195,13
@@
int td_io_getevents(struct thread_data *td, unsigned int min, unsigned int max,
if (r < 0)
goto out;
}
+ if (max > td->cur_depth)
+ max = td->cur_depth;
+ if (min > max)
+ max = min;
r = 0;
- if (td->io_ops->getevents)
+ if (
max &&
td->io_ops->getevents)
r = td->io_ops->getevents(td, min, max, t);
out:
if (r >= 0)