Skip to contentSkip to conversation

fs: ext4fs: add CONFIG_EXT4_MAX_JOURNAL_ENTRIES to Kconfig

PATCH In review Tony Dinh 2 participants 3 messages Aug 26, 2025 – Sep 10, 2025 ext4 file system

lore
Share & tools
lore

Tony Dinh

author
#0 lore raw

PATCH 1/1 fs: ext4fs: add CONFIG_EXT4_MAX_JOURNAL_ENTRIES to Kconfig

Add maximum ext4 journal entries to Kconfig. It is necessary since the number of journal entries is proportional to disk capacity. For example, an ext4 4TB HDD partition could require approximately 500 entries.

---
 fs/ext4/Kconfig        | 8 ++++++++
 fs/ext4/ext4_journal.h | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)
fs/ext4/Kconfig +8 -0
index 8ddaebebd48..a2faa9f878a 100644
@@ -12,3 +12,11 @@ config EXT4_WRITE
 	help
 	  This provides support for creating and writing new files to an
 	  existing ext4 filesystem partition.
+
+config EXT4_MAX_JOURNAL_ENTRIES
+	int "Maximum numbers of journal entries for ext4 filesystem"
+	default 100
+	depends on EXT4_WRITE
+	help
+	  This provides support for allocating the maximum number of
+	  journal entries in disks formatted with ext4 filesysyem.
fs/ext4/ext4_journal.h +1 -1
index 43fb8e76641..a492df49fbe 100644
@@ -38,7 +38,7 @@
 #define EXT3_JOURNAL_FLAG_LAST_TAG	8
 
 /* Maximum entries in 1 journal transaction */
-#define MAX_JOURNAL_ENTRIES 100
+#define MAX_JOURNAL_ENTRIES CONFIG_EXT4_MAX_JOURNAL_ENTRIES
 struct journal_log {
 	char *buf;
 	int blknr;
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Tony Dinh

Add maximum ext4 journal entries to Kconfig. It is necessary since the number of journal entries is proportional to disk capacity. For example, an ext4 4TB HDD partition could require approximately 500 entries.

Signature · 1 line
Tom
#2 lore raw
In reply to Tony Dinh
Quoted 5 lines · Tony Dinh

Add maximum ext4 journal entries to Kconfig. It is necessary since the number of journal entries is proportional to disk capacity. For example, an ext4 4TB HDD partition could require approximately 500 entries.

Applied to u-boot/next, thanks!

[1/1] fs: ext4fs: add CONFIG_EXT4_MAX_JOURNAL_ENTRIES to Kconfig

      commit: 8c599da5060c2bb4c085a7d92794c8134f61ef25
Signature · 1 line
Tom