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 963cf034c260a333f60eca33a365e280c400330f..6c06a0cdf27815d194b64f0e9a9be112bb7081a4 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;