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 abb23bad490d155d6e7935d7cd165e331376f6e7..ac7132522caf750827d0a08e60aea8cb104b969e 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 c209ab6c7a96ab67e59842c0e8e21a3d37212a3f..ba7e290d5d95c49117157852b64fdd3e91be2b02 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[];                                              \
 }