stat: ensure that struct jobs_eta packs nicely
authorJens Axboe <axboe@kernel.dk>
Thu, 15 Aug 2019 15:16:19 +0000 (09:16 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 15 Aug 2019 15:16:19 +0000 (09:16 -0600)
It has two holes in it, and some weird mid-struct packing. Let's
clean it up.

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

index abb23ba..ac71325 100644 (file)
--- 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 c209ab6..ba7e290 100644 (file)
--- 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[];                                              \
 }