#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <sys/uio.h>
#include <errno.h>
#include <assert.h>
struct iovec *iovecs;
struct io_u **io_us;
unsigned int queued;
+ unsigned int events;
unsigned long queued_bytes;
unsigned long long last_offset;
if (io_u->ddir == DDIR_SYNC)
return 0;
- if (io_u->offset == f->last_completed_pos)
- return 0;
if (lseek(f->fd, io_u->offset, SEEK_SET) == -1) {
td_verror(td, errno, "lseek");
int ret;
if (min) {
- ret = sd->queued;
- sd->queued = 0;
+ ret = sd->events;
+ sd->events = 0;
} else
ret = 0;
if (!sd->queued)
return 0;
+ io_u_mark_submit(td, sd->queued);
f = sd->last_file;
if (lseek(f->fd, sd->io_us[0]->offset, SEEK_SET) == -1) {
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);
}
free(sd->iovecs);
free(sd->io_us);
free(sd);
- td->io_ops->data = NULL;
}
static struct ioengine_ops ioengine_rw = {
.queue = fio_syncio_queue,
.open_file = generic_open_file,
.close_file = generic_close_file,
+ .get_file_size = generic_get_file_size,
.flags = FIO_SYNCIO,
};
.queue = fio_psyncio_queue,
.open_file = generic_open_file,
.close_file = generic_close_file,
+ .get_file_size = generic_get_file_size,
.flags = FIO_SYNCIO,
};
.getevents = fio_vsyncio_getevents,
.open_file = generic_open_file,
.close_file = generic_close_file,
+ .get_file_size = generic_get_file_size,
.flags = FIO_SYNCIO,
};