]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
fs: ext4fs: add CONFIG_EXT4_MAX_JOURNAL_ENTRIES to Kconfig
authorTony Dinh <mibodhi@gmail.com>
Tue, 26 Aug 2025 19:45:37 +0000 (12:45 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 10 Sep 2025 16:39:09 +0000 (10:39 -0600)
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 <mibodhi@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
fs/ext4/Kconfig
fs/ext4/ext4_journal.h

index 8ddaebebd48419e05278bae49b5a3fcda2672798..a2faa9f878a7c2e650e793dd82d1e46985772a7c 100644 (file)
@@ -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.
index 43fb8e7664118804e366dc4626acac55fbd0d644..a492df49fbe267e0f1865f044744092300077394 100644 (file)
@@ -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;