linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/6] f2fs-tools: add packed attribute for struct f2fs_super_block
@ 2023-05-05 10:02 Chao Yu
  2023-05-05 10:02 ` [f2fs-dev] [PATCH 2/6] f2fs-tools: rename i_padding to i_compress_flag Chao Yu
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Chao Yu @ 2023-05-05 10:02 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel

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 --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
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-17  2:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-05 10:02 [f2fs-dev] [PATCH 1/6] f2fs-tools: add packed attribute for struct f2fs_super_block Chao Yu
2023-05-05 10:02 ` [f2fs-dev] [PATCH 2/6] f2fs-tools: rename i_padding to i_compress_flag Chao Yu
2023-05-05 10:02 ` [f2fs-dev] [PATCH 3/6] f2fs-tools: fix typo in f2fs_inode structure Chao Yu
2023-05-05 10:02 ` [f2fs-dev] [PATCH 4/6] f2fs-tools: add DISP_u8() macro Chao Yu
2023-05-05 10:02 ` [f2fs-dev] [PATCH 5/6] f2fs-tools: print more raw sb info Chao Yu
2023-05-05 10:02 ` [f2fs-dev] [PATCH 6/6] f2fs-tools: use f2fs_init_inode() to clean up codes Chao Yu
2023-05-08 19:42   ` Jaegeuk Kim
2023-05-17  2:02     ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).