Ignore pre-read for FIO_NOIO td
authorTomohiro Kusumi <tkusumi@tuxera.com>
Tue, 28 Mar 2017 20:02:55 +0000 (23:02 +0300)
committerJens Axboe <axboe@fb.com>
Tue, 28 Mar 2017 21:14:20 +0000 (15:14 -0600)
pre_read_file() should ignore FIO_NOIO (i.e. cpuio) in addition to
FIO_PIPEIO. It does/should fail anyway since FIO_NOIO td is supposed
to have -1 for fd for not supporting any I/O.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
filesetup.c

index 9335dcd3f8dd4b2c38548ee23dbc7e56282caeb0..bd971e8e1f032731ed3f72582c07beb486f34261 100644 (file)
@@ -235,7 +235,8 @@ static int pre_read_file(struct thread_data *td, struct fio_file *f)
        unsigned int bs;
        char *b;
 
        unsigned int bs;
        char *b;
 
-       if (td_ioengine_flagged(td, FIO_PIPEIO))
+       if (td_ioengine_flagged(td, FIO_PIPEIO) ||
+           td_ioengine_flagged(td, FIO_NOIO))
                return 0;
 
        if (!fio_file_open(f)) {
                return 0;
 
        if (!fio_file_open(f)) {