Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Mar 14, 2018

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit c4bf91427a4fd1fbdb662667307189eabacf45b5:

Merge branch 'master' of https://github.com/bvanassche/fio (2018-03-12 18:13:10 -0600)

are available in the git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to 69b98f11d62cb12482130fac79b8ebf00c0bb139:

io_u: only rewind file position if it's non-zero (2018-03-13 11:49:55 -0600)

----------------------------------------------------------------
Jens Axboe (2):
configure: don't disable lex on FreeBSD
io_u: only rewind file position if it's non-zero

 configure | 2 +-
 io_u.c    | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

---

Diff of recent changes:

configure +1 -1
index a73b61e..f38e9c7 100755
@@ -282,7 +282,7 @@ fi
 # cross-compiling to one of these OSes then you'll need to specify
 # the correct CPU with the --cpu option.
 case $targetos in
-AIX|*BSD)
+AIX|OpenBSD|NetBSD)
   # Unless explicitly enabled, turn off lex.
   # OpenBSD will hit syntax error when enabled.
   if test -z "$disable_lex" ; then
io_u.c +5 -1
index a37b723..01b3693 100644
@@ -430,7 +430,11 @@ static int get_next_seq_offset(struct thread_data *td, struct fio_file *f,
 	if (f->last_pos[ddir] < f->real_file_size) {
 		uint64_t pos;
 
-		if (f->last_pos[ddir] == f->file_offset && o->ddir_seq_add < 0) {
+		/*
+		 * Only rewind if we already hit the end
+		 */
+		if (f->last_pos[ddir] == f->file_offset &&
+		    f->file_offset && o->ddir_seq_add < 0) {
 			if (f->real_file_size > f->io_size)
 				f->last_pos[ddir] = f->io_size;
 			else