projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee3dcd9
)
Always make sure buffer sizes are aligned for allocation
author
Jens Axboe
<jens.axboe@oracle.com>
Tue, 20 Mar 2007 09:33:11 +0000
(10:33 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Tue, 20 Mar 2007 09:33:11 +0000
(10:33 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c
patch
|
blob
|
blame
|
history
diff --git
a/fio.c
b/fio.c
index a416856459c12ccf59cef5792efd126701bd7c0c..3c01156d1bd2d20c6f97c3c7ff58bcb9ea5bd59a 100644
(file)
--- a/
fio.c
+++ b/
fio.c
@@
-603,8
+603,8
@@
static int init_io_u(struct thread_data *td)
if (td->o.mem_type == MEM_SHMHUGE || td->o.mem_type == MEM_MMAPHUGE)
td->orig_buffer_size = (td->orig_buffer_size + td->o.hugepage_size - 1) & ~(td->o.hugepage_size - 1);
- else
- td->orig_buffer_size
+=
page_mask;
+ else
if (td->orig_buffer_size & page_mask)
+ td->orig_buffer_size
= (td->orig_buffer_size + page_mask) & ~
page_mask;
if (allocate_io_mem(td))
return 1;