X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fnull.c;h=67ac4535245f40c72905dfac07df3b6c9e182b33;hp=1988678946ca397e8ac20c6b0532262c20c5f0bf;hb=7401c088106ba35dcfba62ec753b6b20b72ad0e2;hpb=65afa5f2146ee010b7129934f68e691faee54982 diff --git a/engines/null.c b/engines/null.c index 19886789..67ac4535 100644 --- a/engines/null.c +++ b/engines/null.c @@ -24,14 +24,17 @@ static struct io_u *fio_null_event(struct thread_data *td, int event) return nd->io_us[event]; } -static int fio_null_getevents(struct thread_data *td, int fio_unused min, +static int fio_null_getevents(struct thread_data *td, int min_events, int fio_unused max, struct timespec fio_unused *t) { struct null_data *nd = td->io_ops->data; - int ret; + int ret = 0; + + if (min_events) { + ret = nd->events; + nd->events = 0; + } - ret = nd->events; - nd->events = 0; return ret; } @@ -39,7 +42,7 @@ static int fio_null_commit(struct thread_data *td) { struct null_data *nd = td->io_ops->data; - nd->events = nd->queued; + nd->events += nd->queued; nd->queued = 0; return 0; }