summaryrefslogtreecommitdiff
path: root/stat.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2014-10-25 16:04:32 -0700
committerJens Axboe <axboe@fb.com>2014-10-27 08:50:47 -0600
commit3d0ebb30e8f97934603aaf22e82b1cc8bb790765 (patch)
tree723fec01b2d6b71c05d1197dec59fc428ceaedb1 /stat.h
parentec803e97e616d8a410d760368c478b683625842a (diff)
downloadfio-3d0ebb30e8f97934603aaf22e82b1cc8bb790765.tar.gz
fio-3d0ebb30e8f97934603aaf22e82b1cc8bb790765.tar.bz2
fio: Fix padding properly
Completely fix padding: - use anonymous union for padding. - move existing padding in thread_stat. - add alignment checks. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'stat.h')
-rw-r--r--stat.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/stat.h b/stat.h
index 16b3d1a6..8aefe03c 100644
--- a/stat.h
+++ b/stat.h
@@ -158,6 +158,8 @@ struct thread_stat {
uint32_t io_u_lat_u[FIO_IO_U_LAT_U_NR];
uint32_t io_u_lat_m[FIO_IO_U_LAT_M_NR];
uint32_t io_u_plat[DDIR_RWDIR_CNT][FIO_IO_U_PLAT_NR];
+ uint32_t pad;
+
uint64_t total_io_u[3];
uint64_t short_io_u[3];
uint64_t drop_io_u[3];
@@ -171,8 +173,10 @@ struct thread_stat {
/*
* IO Error related stats
*/
- uint16_t continue_on_error;
- uint16_t filler[3];
+ union {
+ uint16_t continue_on_error;
+ uint64_t pad2;
+ };
uint64_t total_err_count;
uint32_t first_error;
@@ -181,7 +185,6 @@ struct thread_stat {
uint32_t latency_depth;
uint64_t latency_target;
- uint32_t pad;
fio_fp64_t latency_percentile;
uint64_t latency_window;
} __attribute__((packed));