From: Wang Jianjian <wangjianjian0@foxmail.com>
To: linux-ext4@vger.kernel.org
Cc: Wang Jianjian <wangjianjian0@foxmail.com>
Subject: [PATCH] jbd2: Add a comment for incorrect tag size
Date: Thu, 4 Apr 2024 21:36:54 +0800 [thread overview]
Message-ID: <tencent_1D453DB77B0F2091CB4A68568A77627D4E08@qq.com> (raw)
journal_tag_t has already counted the checksum size, however, for
compatibility reason, we don't fix this bug and keep it as is.
Signed-off-by: Wang Jianjian <wangjianjian0@foxmail.com>
---
fs/jbd2/journal.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index b6c114c11b97..b5e614818e8b 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -2698,6 +2698,10 @@ size_t journal_tag_bytes(journal_t *journal)
sz = sizeof(journal_block_tag_t);
+ /*
+ * journal_block_tag_t has already counted checksum size
+ * but for compatibility reason, we keep it as is.
+ */
if (jbd2_has_feature_csum2(journal))
sz += sizeof(__u16);
--
2.34.3
reply other threads:[~2024-04-04 13:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=tencent_1D453DB77B0F2091CB4A68568A77627D4E08@qq.com \
--to=wangjianjian0@foxmail.com \
--cc=linux-ext4@vger.kernel.org \
/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 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 read-only IMAP folder(s) and NNTP newsgroup(s).