Add 'sequential' file_service_type
This service type will keep a file open until IO to it is completely
done, before moving on to the next available file.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/io_u.c b/io_u.c
index f2406e8..0d55c09 100644
--- a/io_u.c
+++ b/io_u.c
@@ -681,10 +681,15 @@
}
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);