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
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)
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");
io_u->xfer_buflen = io_u->resid;
io_u->xfer_buf += bytes;
io_u->offset += bytes;
- f->last_completed_pos = io_u->offset;
td->ts.short_io_u[io_u->ddir]++;
io_u->xfer_buflen = io_u->resid;
io_u->xfer_buf += bytes;
io_u->offset += bytes;
- f->last_completed_pos = io_u->offset;
td->ts.short_io_u[io_u->ddir]++;
unsigned long long io_size;
unsigned long long last_pos;
- unsigned long long last_completed_pos;
/*
* block map for random io
td->io_bytes[idx] += bytes;
td->this_io_bytes[idx] += bytes;
- io_u->file->last_completed_pos = io_u->endpos;
-
usec = utime_since(&io_u->issue_time, &icd->time);
add_clat_sample(td, idx, usec);
}
f->last_free_lookup = 0;
- f->last_completed_pos = 0;
f->last_pos = f->file_offset;
f->flags |= FIO_FILE_OPEN;
f->flags &= ~FIO_FILE_CLOSING;