[PATCH] Kill ->cur_off, always just lseek() in sync ->io_prep
diff --git a/fio-io.c b/fio-io.c
index 3183e8f..dee02ab 100644
--- a/fio-io.c
+++ b/fio-io.c
@@ -352,11 +352,9 @@
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;
diff --git a/fio.c b/fio.c
index 6f122c9..c93cbe2 100644
--- a/fio.c
+++ b/fio.c
@@ -897,8 +897,6 @@
break;
}
- td->cur_off = v_io_u->offset + v_io_u->buflen;
-
/*
* if we can't submit more io, we need to verify now
*/
@@ -1609,7 +1607,6 @@
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;
diff --git a/fio.h b/fio.h
index dbce4af..f1e49a5 100644
--- a/fio.h
+++ b/fio.h
@@ -148,8 +148,6 @@
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 *);