From: Chao Yu <chao@kernel.org>
To: jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH 1/6] f2fs-tools: add packed attribute for struct f2fs_super_block
Date: Fri, 5 May 2023 18:02:00 +0800 [thread overview]
Message-ID: <20230505100205.1921708-1-chao@kernel.org> (raw)
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
next reply other threads:[~2023-05-05 10:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 10:02 Chao Yu [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230505100205.1921708-1-chao@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.