qcow2: reorder fields in Qcow2CachedTable to reduce padding
authorAlberto Garcia <berto@igalia.com>
Tue, 4 Aug 2015 12:14:42 +0000 (15:14 +0300)
committerMax Reitz <mreitz@redhat.com>
Fri, 4 Sep 2015 19:00:32 +0000 (21:00 +0200)
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>
Message-id: 0bd55291211df3dfb514d0e7d2031dd5c4f9f807.1438690126.git.berto@igalia.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-cache.c

index 8457458418cb78c7a4a602a092b94ab12be15feb..046f5b8e48b4a0e0cc16d7c365dc0980061ad86c 100644 (file)
@@ -37,9 +37,9 @@
 
 typedef struct Qcow2CachedTable {
     int64_t  offset;
-    bool     dirty;
     uint64_t lru_counter;
     int      ref;
+    bool     dirty;
 } Qcow2CachedTable;
 
 struct Qcow2Cache {