static int fio_syncio_prep(struct thread_data *td, struct io_u *io_u)
{
- if (td->cur_off != io_u->offset) {
- if (lseek(td->fd, io_u->offset, SEEK_SET) == -1) {
- td_verror(td, errno);
- return 1;
- }
+ if (lseek(td->fd, io_u->offset, SEEK_SET) == -1) {
+ td_verror(td, errno);
+ return 1;
}
return 0;
break;
}
- td->cur_off = v_io_u->offset + v_io_u->buflen;
-
/*
* if we can't submit more io, we need to verify now
*/
if (td->io_engine == FIO_SYNCIO)
lseek(td->fd, SEEK_SET, 0);
- td->cur_off = 0;
td->last_bytes = 0;
td->stat_io_bytes[0] = td->stat_io_bytes[1] = 0;
td->this_io_bytes[0] = td->this_io_bytes[1] = 0;
int shm_id;
- unsigned long long cur_off;
-
void *io_data;
char io_engine_name[16];
int (*io_prep)(struct thread_data *, struct io_u *);