From 77cf8455a12a36b060b1a7085ba2de7e42b3966f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 8 Dec 2005 20:09:36 +0100 Subject: [PATCH] [PATCH] Kill ->cur_off, always just lseek() in sync ->io_prep --- fio-io.c | 8 +++----- fio.c | 3 --- fio.h | 2 -- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/fio-io.c b/fio-io.c index 3183e8fd..dee02ab5 100644 --- a/fio-io.c +++ b/fio-io.c @@ -352,11 +352,9 @@ static struct io_u *fio_syncio_event(struct thread_data *td, int event) 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 6f122c9b..c93cbe26 100644 --- a/fio.c +++ b/fio.c @@ -897,8 +897,6 @@ static void do_verify(struct thread_data *td) 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 @@ static void clear_io_state(struct thread_data *td) 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 dbce4af3..f1e49a50 100644 --- a/fio.h +++ b/fio.h @@ -148,8 +148,6 @@ struct thread_data { 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 *); -- 2.25.1