Otherwise, it may trigger static assert below when the structure
updates.

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

Signed-off-by: Chao Yu <[email protected]>
---
 include/f2fs_fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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, "");
 
-- 
2.25.1



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to