summaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-03-01 18:09:49 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-03-01 18:09:49 +0100
commitf85ac25a7d5c9d5ba4d5c73363a6a2a461a9b013 (patch)
tree8bb9621c300684dea34571073d223bc213426c34 /engines
parent126d65c6fc97d6acdc568aa5a969c012018daf15 (diff)
downloadfio-f85ac25a7d5c9d5ba4d5c73363a6a2a461a9b013.tar.gz
Remove the file->last_completed_pos variable
This tracks where we last did IO to this file, however with file sharing that may break. So just remove this optimization, it'll cost an extra lseek() for the sync engine but doesn't do much else outside of that. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'engines')
-rw-r--r--engines/net.c13
-rw-r--r--engines/sync.c2
2 files changed, 1 insertions, 14 deletions
diff --git a/engines/net.c b/engines/net.c
index f6ae3790..60d53bc2 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -28,7 +28,6 @@ struct netio_data {
static int fio_netio_prep(struct thread_data *td, struct io_u *io_u)
{
struct netio_data *nd = td->io_ops->data;
- struct fio_file *f = io_u->file;
/*
* Make sure we don't see spurious reads to a receiver, and vice versa
@@ -39,17 +38,7 @@ static int fio_netio_prep(struct thread_data *td, struct io_u *io_u)
return 1;
}
- if (io_u->ddir == DDIR_SYNC)
- return 0;
- if (io_u->offset == f->last_completed_pos)
- return 0;
-
- /*
- * If offset is different from last end position, it's a seek.
- * As network io is purely sequential, we don't allow seeks.
- */
- td_verror(td, EINVAL, "cannot seek");
- return 1;
+ return 0;
}
static int splice_io_u(int fdin, int fdout, unsigned int len)
diff --git a/engines/sync.c b/engines/sync.c
index c5410c7d..46cb864d 100644
--- a/engines/sync.c
+++ b/engines/sync.c
@@ -30,8 +30,6 @@ static int fio_syncio_prep(struct thread_data *td, struct io_u *io_u)
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");