QEDHeader is read, and written, directly from on-disk images via bdrv_pread()/write(). To avoid any unintentional padding, these structs should be packed.
Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/qed.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qed.h b/block/qed.h index 2b4dded..4d6c812 100644 --- a/block/qed.h +++ b/block/qed.h @@ -83,7 +83,7 @@ enum { QED_NEED_CHECK_TIMEOUT = 5, /* in seconds */ }; -typedef struct { +typedef struct QEMU_PACKED { uint32_t magic; /* QED\0 */ uint32_t cluster_size; /* in bytes */ -- 1.8.3.1