diff mbox

[4/4] qcow2: reorder fields in Qcow2CachedTable to reduce padding

Message ID 18678ef28b7e8b94a2a397713b867a28e34718a2.1433247225.git.berto@igalia.com
State New
Headers show

Commit Message

Alberto Garcia June 2, 2015, 12:22 p.m. UTC
Changing the current ordering saves 8 bytes per cache entry in x86_64.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
---
 block/qcow2-cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
index c008ed0..1f0c47b 100644
--- a/block/qcow2-cache.c
+++ b/block/qcow2-cache.c
@@ -37,9 +37,9 @@ 
 
 typedef struct Qcow2CachedTable {
     int64_t  offset;
-    bool     dirty;
     uint64_t lru_counter;
     int      ref;
+    bool     dirty;
 } Qcow2CachedTable;
 
 struct Qcow2Cache {