More option help updates
[fio.git] / engines / mmap.c
index da6906947764ba099c377be51bae7c231b070ee6..f3d55c167691616a9d6478dba51e51154475ff3f 100644 (file)
@@ -13,7 +13,6 @@
 #include <sys/mman.h>
 
 #include "../fio.h"
-#include "../os.h"
 
 static int fio_mmapio_queue(struct thread_data *td, struct io_u *io_u)
 {
@@ -61,6 +60,12 @@ static int fio_mmapio_open(struct thread_data *td, struct fio_file *f)
        if (ret)
                return ret;
 
+       /*
+        * for size checkup, don't mmap anything.
+        */
+       if (!f->io_size)
+               return 0;
+
        if (td_rw(td))
                flags = PROT_READ | PROT_WRITE;
        else if (td_write(td)) {