[PATCH] Fix hugetlb problems
Alignment was bad, and we need to check the shmhuge string before shm,
otherwise it'll match the latter.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index 8713614..41b6020 100644
--- a/fio.c
+++ b/fio.c
@@ -510,7 +510,7 @@
td->orig_buffer_size = max_bs * max_units;
if (td->mem_type == MEM_SHMHUGE)
- td->orig_buffer_size = (td->orig_buffer_size + FIO_HUGE_PAGE - 1) & ~FIO_HUGE_PAGE;
+ td->orig_buffer_size = (td->orig_buffer_size + FIO_HUGE_PAGE - 1) & ~(FIO_HUGE_PAGE - 1);
else
td->orig_buffer_size += MASK;