projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f085737
)
Make sure mmaphuge file backed file is the size we need
author
Jens Axboe
<jens.axboe@oracle.com>
Mon, 19 Mar 2007 13:00:54 +0000
(14:00 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Mon, 19 Mar 2007 13:00:54 +0000
(14:00 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
memory.c
patch
|
blob
|
blame
|
history
diff --git
a/memory.c
b/memory.c
index be664c9c22a40285cd07c6f7f69da120408618d7..e5680389072e1f13910dea1b87a1d9c3bd7fd570 100644
(file)
--- a/
memory.c
+++ b/
memory.c
@@
-96,6
+96,11
@@
int allocate_io_mem(struct thread_data *td)
td->orig_buffer = NULL;
return 1;
}
td->orig_buffer = NULL;
return 1;
}
+ if (ftruncate(td->mmapfd, td->orig_buffer_size) < 0) {
+ td_verror(td, errno, "truncate mmap file");
+ td->orig_buffer = NULL;
+ return 1;
+ }
} else
flags |= OS_MAP_ANON;
} else
flags |= OS_MAP_ANON;