summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTony Dinh <[email protected]>2025-08-26 12:45:37 -0700
committerTom Rini <[email protected]>2025-09-10 10:39:09 -0600
commit8c599da5060c2bb4c085a7d92794c8134f61ef25 (patch)
treea6e27f55281969b0331fd23979b90ef6470dd9f3 /fs
parent1f8fd9d37d69ecc269943a273d3bca4c1be2384e (diff)
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. Signed-off-by: Tony Dinh <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/Kconfig8
-rw-r--r--fs/ext4/ext4_journal.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig
index 8ddaebebd48..a2faa9f878a 100644
--- a/fs/ext4/Kconfig
+++ b/fs/ext4/Kconfig
@@ -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.
diff --git a/fs/ext4/ext4_journal.h b/fs/ext4/ext4_journal.h
index 43fb8e76641..a492df49fbe 100644
--- a/fs/ext4/ext4_journal.h
+++ b/fs/ext4/ext4_journal.h
@@ -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;