summaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2010-10-28 08:52:13 -0600
committerJens Axboe <jaxboe@fusionio.com>2010-10-28 08:52:13 -0600
commitca7e0ddb08fece35c95e9056ca877e0806f1e6ef (patch)
treec02dea9d9e9a37e244961a7630f4d6c2de5ed90c /memory.c
parentf0f346d8604d594506c0dc1a3310a27de127c2ed (diff)
binject: ensure we get aligned memory
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/memory.c b/memory.c
index 7f4cef5..b94cd6d 100644
--- a/memory.c
+++ b/memory.c
@@ -193,7 +193,8 @@ int allocate_io_mem(struct thread_data *td)
total_mem = td->orig_buffer_size;
- if (td->o.odirect || td->o.mem_align) {
+ if (td->o.odirect || td->o.mem_align ||
+ (td->io_ops->flags & FIO_MEMALIGN)) {
total_mem += page_mask;
if (td->o.mem_align && td->o.mem_align > page_size)
total_mem += td->o.mem_align - page_size;