unsigned long long file_offset;
cpu_set_t cpumask;
+ off_t cur_off;
+
io_context_t aio_ctx;
unsigned int aio_depth;
struct io_event *aio_events;
unsigned long blocks, msec, usec;
struct timeval e;
+ td->cur_off = 0;
+
for (blocks = 0; blocks < td->blocks; blocks++) {
struct io_u *io_u;
int ret;
io_u = get_io_u(td);
- if (lseek(td->fd, io_u->offset, SEEK_SET) == -1) {
- td->error = errno;
- break;
+ if (td->cur_off != io_u->offset) {
+ if (lseek(td->fd, io_u->offset, SEEK_SET) == -1) {
+ td->error = errno;
+ break;
+ }
}
if (td->delay_sleep)
}
td->io_blocks++;
+ td->cur_off = io_u->offset + io_u->buflen;
if (should_fsync(td) && td->fsync_blocks &&
(td->io_blocks % td->fsync_blocks) == 0)