We'd lseek to the same location twice, making sequential
IO lseek() and read/write to each location twice.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
struct iovec *iovecs;
struct io_u **io_us;
unsigned int queued;
+ unsigned int events;
unsigned long queued_bytes;
unsigned long long last_offset;
int ret;
if (min) {
- ret = sd->queued;
- sd->queued = 0;
+ ret = sd->events;
+ sd->events = 0;
} else
ret = 0;
ret = writev(f->fd, sd->iovecs, sd->queued);
dprint(FD_IO, "vsyncio_commit: %d\n", (int) ret);
+ sd->events = sd->queued;
+ sd->queued = 0;
return fio_vsyncio_end(td, ret);
}