projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2bfe24b
)
mmap engine: fix open-for-size check
author
Jens Axboe
<jens.axboe@oracle.com>
Mon, 21 May 2007 12:52:43 +0000
(14:52 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Mon, 21 May 2007 12:52:43 +0000
(14:52 +0200)
Don't call into mmap() yet, since we didn't setup ->io_size.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/mmap.c
patch
|
blob
|
blame
|
history
diff --git
a/engines/mmap.c
b/engines/mmap.c
index 95ad1d842250049162564a078864070cc28c8f2e..f3d55c167691616a9d6478dba51e51154475ff3f 100644
(file)
--- a/
engines/mmap.c
+++ b/
engines/mmap.c
@@
-60,6
+60,12
@@
static int fio_mmapio_open(struct thread_data *td, struct fio_file *f)
if (ret)
return ret;
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)) {
if (td_rw(td))
flags = PROT_READ | PROT_WRITE;
else if (td_write(td)) {