public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] jbd2: Add a comment for incorrect tag size
@ 2024-04-04 13:36 Wang Jianjian
  2024-06-19 23:36 ` Theodore Ts'o
  0 siblings, 1 reply; 5+ messages in thread
From: Wang Jianjian @ 2024-04-04 13:36 UTC (permalink / raw)
  To: linux-ext4; +Cc: Wang Jianjian

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


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

end of thread, other threads:[~2024-06-28  2:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-04 13:36 [PATCH] jbd2: Add a comment for incorrect tag size Wang Jianjian
2024-06-19 23:36 ` Theodore Ts'o
2024-06-20  3:19   ` wangjianjian (C)
2024-06-27 13:31     ` Theodore Ts'o
2024-06-28  2:15       ` wangjianjian (C)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox