diff mbox series

[f2fs-dev,1/6] f2fs-tools: add packed attribute for struct f2fs_super_block

Message ID 20230505100205.1921708-1-chao@kernel.org (mailing list archive)
State New
Headers show
Series [f2fs-dev,1/6] f2fs-tools: add packed attribute for struct f2fs_super_block | expand

Commit Message

Chao Yu May 5, 2023, 10:02 a.m. UTC
Otherwise, it may trigger static assert below when the structure
updates.

static_assert(sizeof(struct f2fs_super_block) == 3072, "")

Signed-off-by: Chao Yu <chao@kernel.org>
---
 include/f2fs_fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 6948814..c71b59d 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -849,7 +849,7 @@  struct f2fs_super_block {
 	__u8 s_errors[MAX_F2FS_ERRORS];		/* reason of image corrupts */
 	__u8 reserved[258];		/* valid reserved region */
 	__le32 crc;			/* checksum of superblock */
-};
+} __attribute__((packed));
 
 static_assert(sizeof(struct f2fs_super_block) == 3072, "");