Add 'sequential' file_service_type
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index f2406e8c1ec91cb86f56196b2f83e33dca9087ca..0d55c09ae59dd2c70ea60313dff4bc1ddfef29a6 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -681,10 +681,15 @@ static struct fio_file *get_next_file(struct thread_data *td)
        }
 
        f = td->file_service_file;
-       if (f && (f->flags & FIO_FILE_OPEN) && td->file_service_left--)
-               goto out;
+       if (f && (f->flags & FIO_FILE_OPEN)) {
+               if (td->o.file_service_type == FIO_FSERVICE_SEQ)
+                       goto out;
+               if (td->file_service_left--)
+                       goto out;
+       }
 
-       if (td->o.file_service_type == FIO_FSERVICE_RR)
+       if (td->o.file_service_type == FIO_FSERVICE_RR ||
+           td->o.file_service_type == FIO_FSERVICE_SEQ)
                f = get_next_file_rr(td, FIO_FILE_OPEN, FIO_FILE_CLOSING);
        else
                f = get_next_file_rand(td, FIO_FILE_OPEN, FIO_FILE_CLOSING);