From: Bart Samwel Add support for the value "0" to ext3's "commit" option. When this value is given, ext3 substitutes it by the default commit interval. Introduce a constant JBD_DEFAULT_MAX_COMMIT_AGE for this. --- 25-akpm/fs/ext3/super.c | 4 ++++ 25-akpm/fs/jbd/journal.c | 2 +- 25-akpm/include/linux/jbd.h | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff -puN fs/ext3/super.c~ext3-commit-default fs/ext3/super.c --- 25/fs/ext3/super.c~ext3-commit-default 2004-04-03 03:04:07.843553608 -0800 +++ 25-akpm/fs/ext3/super.c 2004-04-03 03:04:07.851552392 -0800 @@ -735,6 +735,10 @@ static int parse_options (char * options case Opt_commit: if (match_int(&args[0], &option)) return 0; + if (option < 0) + return 0; + if (option == 0) + option = JBD_DEFAULT_MAX_COMMIT_AGE; sbi->s_commit_interval = HZ * option; break; case Opt_data_journal: diff -puN fs/jbd/journal.c~ext3-commit-default fs/jbd/journal.c --- 25/fs/jbd/journal.c~ext3-commit-default 2004-04-03 03:04:07.844553456 -0800 +++ 25-akpm/fs/jbd/journal.c 2004-04-03 03:04:07.852552240 -0800 @@ -636,7 +636,7 @@ static journal_t * journal_init_common ( spin_lock_init(&journal->j_list_lock); spin_lock_init(&journal->j_state_lock); - journal->j_commit_interval = (HZ * 5); + journal->j_commit_interval = (HZ * JBD_DEFAULT_MAX_COMMIT_AGE); /* The journal is marked for error until we succeed with recovery! */ journal->j_flags = JFS_ABORT; diff -puN include/linux/jbd.h~ext3-commit-default include/linux/jbd.h --- 25/include/linux/jbd.h~ext3-commit-default 2004-04-03 03:04:07.846553152 -0800 +++ 25-akpm/include/linux/jbd.h 2004-04-03 03:04:07.853552088 -0800 @@ -42,6 +42,11 @@ */ #undef JBD_PARANOID_IOFAIL +/* + * The default maximum commit age, in seconds. + */ +#define JBD_DEFAULT_MAX_COMMIT_AGE 5 + #ifdef CONFIG_JBD_DEBUG /* * Define JBD_EXPENSIVE_CHECKING to enable more expensive internal _