From f331acbe56d88dcd38ffe0f029240ed55fdaea9e Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sat, 7 Apr 2007 15:39:50 -0400 Subject: [PATCH] Allow the journal size to up to 10,240,000 blocks Increase the maximum size of the journal to 100 times the previous maximum, but add a restriction that it can be no more than half the size of the filesystem. Signed-off-by: Andreas Dilger Signed-off-by: "Theodore Ts'o" --- misc/ChangeLog | 6 ++++++ misc/util.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/misc/ChangeLog b/misc/ChangeLog index eff4f81..656b7df 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,9 @@ +2007-04-07 Theodore Tso + + * util.c (figure_journal_size): Allow the journal size to be up to + 10,240,000 blocks, but no more half the size of the + filesystem. + 2007-04-02 Theodore Tso * badblocks.8.in: Document the -X flag. diff --git a/misc/util.c b/misc/util.c index 0ea6cb4..53f3613 100644 --- a/misc/util.c +++ b/misc/util.c @@ -260,15 +260,15 @@ int figure_journal_size(int size, ext2_filsys fs) if (size > 0) { j_blocks = size * 1024 / (fs->blocksize / 1024); - if (j_blocks < 1024 || j_blocks > 102400) { + if (j_blocks < 1024 || j_blocks > 10240000) { fprintf(stderr, _("\nThe requested journal " "size is %d blocks; it must be\n" - "between 1024 and 102400 blocks. " + "between 1024 and 10240000 blocks. " "Aborting.\n"), j_blocks); exit(1); } - if (j_blocks > fs->super->s_free_blocks_count) { + if (j_blocks > fs->super->s_free_blocks_count / 2) { fputs(_("\nJournal size too big for filesystem.\n"), stderr); exit(1); -- 1.8.3.1