From 7e69ba2ae2604456cc17257bf14dc7a0576657cf Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 9 May 2005 22:25:39 -0400 Subject: [PATCH] Change the default journal size to be bigger for larger filesystems, given modern memory sizes. Now, for filesystems greater than 4GB, we use a journal of 128 MB instead 32 MB. --- misc/ChangeLog | 5 +++++ misc/util.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/misc/ChangeLog b/misc/ChangeLog index 5399e73..5520395 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,5 +1,10 @@ 2005-05-09 Theodore Ts'o + * util.c (figure_journal_size): Change the default journal size to + be bigger for larger filesystems, given modern memory + sizes. Now, for filesystems greater than 4GB, we use a + journal of 128 MB instead 32 MB. + * tune2fs.c (main): Fix grammar in message printed when setting the check interval (tune2fs -i) diff --git a/misc/util.c b/misc/util.c index 16ea19f..77359c8 100644 --- a/misc/util.c +++ b/misc/util.c @@ -267,10 +267,15 @@ int figure_journal_size(int size, ext2_filsys fs) if (fs->super->s_blocks_count < 32768) j_blocks = 1024; - else if (fs->super->s_blocks_count < 262144) + else if (fs->super->s_blocks_count < 256*1024) j_blocks = 4096; - else + else if (fs->super->s_blocks_count < 512*1024) j_blocks = 8192; + else if (fs->super->s_blocks_count < 1024*1024) + j_blocks = 16384; + else + j_blocks = 32768; + return j_blocks; } -- 1.8.3.1