Ensure that thread_stat alignment is correct
authorOmri Mor <omor1@asu.edu>
Mon, 19 Jun 2017 22:41:51 +0000 (16:41 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 19 Jun 2017 22:41:51 +0000 (16:41 -0600)
clang seems to align this weirdly, and then fault when it
isn't 128-bit aligned. Align it explicitly, so it does the
right thing.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fio.h

diff --git a/fio.h b/fio.h
index 963cf03..6c06a0c 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -149,7 +149,7 @@ struct thread_data {
        unsigned int thread_number;
        unsigned int subjob_number;
        unsigned int groupid;
-       struct thread_stat ts __attribute__ ((aligned));
+       struct thread_stat ts __attribute__ ((aligned(8)));
 
        int client_type;