From: Jens Axboe Date: Thu, 8 Dec 2005 19:09:36 +0000 (+0100) Subject: [PATCH] Kill ->cur_off, always just lseek() in sync ->io_prep X-Git-Tag: fio-1.2~6 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=77cf8455a12a36b060b1a7085ba2de7e42b3966f;p=fio.git [PATCH] Kill ->cur_off, always just lseek() in sync ->io_prep --- 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 *);