From: Jens Axboe Date: Thu, 15 Aug 2019 15:16:19 +0000 (-0600) Subject: stat: ensure that struct jobs_eta packs nicely X-Git-Tag: fio-3.16~24 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=cd8920a40ef04625d9e76f63fa09fcaac9e9977e stat: ensure that struct jobs_eta packs nicely It has two holes in it, and some weird mid-struct packing. Let's clean it up. Signed-off-by: Jens Axboe --- diff --git a/server.h b/server.h index abb23bad..ac713252 100644 --- a/server.h +++ b/server.h @@ -48,7 +48,7 @@ struct fio_net_cmd_reply { }; enum { - FIO_SERVER_VER = 78, + FIO_SERVER_VER = 79, FIO_SERVER_MAX_FRAGMENT_PDU = 1024, FIO_SERVER_MAX_CMD_MB = 2048, diff --git a/stat.h b/stat.h index c209ab6c..ba7e290d 100644 --- a/stat.h +++ b/stat.h @@ -258,13 +258,15 @@ struct thread_stat { uint32_t nr_pending; \ uint32_t nr_setting_up; \ \ - uint64_t m_rate[DDIR_RWDIR_CNT], t_rate[DDIR_RWDIR_CNT]; \ + uint64_t m_rate[DDIR_RWDIR_CNT]; \ + uint64_t t_rate[DDIR_RWDIR_CNT]; \ uint64_t rate[DDIR_RWDIR_CNT]; \ - uint32_t m_iops[DDIR_RWDIR_CNT] __attribute__((packed)); \ - uint32_t t_iops[DDIR_RWDIR_CNT] __attribute__((packed)); \ - uint32_t iops[DDIR_RWDIR_CNT] __attribute__((packed)); \ - uint64_t elapsed_sec __attribute__((packed)); \ - uint64_t eta_sec __attribute__((packed)); \ + uint32_t m_iops[DDIR_RWDIR_CNT]; \ + uint32_t t_iops[DDIR_RWDIR_CNT]; \ + uint32_t iops[DDIR_RWDIR_CNT]; \ + uint32_t pad; \ + uint64_t elapsed_sec; \ + uint64_t eta_sec; \ uint32_t is_pow2; \ uint32_t unit_base; \ \ @@ -276,6 +278,7 @@ struct thread_stat { * Network 'copy' of run_str[] \ */ \ uint32_t nr_threads; \ + uint32_t pad2; \ uint8_t run_str[]; \ }