[PATCH v3] fio: Fix padding properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Completely fix padding:
- use anonymous union for padding
- remove remaining padding in thread_stat.

Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
---
 stat.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/stat.h b/stat.h
index 16b3d1a..c2c30b2 100644
--- a/stat.h
+++ b/stat.h
@@ -171,8 +171,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 pad;
+	};
 	uint64_t total_err_count;
 	uint32_t first_error;
 
@@ -181,7 +183,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));
-- 
2.1.0.rc2.206.gedb03e5

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux