diff mbox series

jbd2: Add a comment for incorrect tag size

Message ID tencent_1D453DB77B0F2091CB4A68568A77627D4E08@qq.com
State New
Headers show
Series jbd2: Add a comment for incorrect tag size | expand

Commit Message

Wang Jianjian April 4, 2024, 1:36 p.m. UTC
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 mbox series

Patch

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);