Whamcloud - gitweb
Change the default journal size to be bigger for larger filesystems,
authorTheodore Ts'o <tytso@mit.edu>
Tue, 10 May 2005 02:25:39 +0000 (22:25 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 10 May 2005 02:25:39 +0000 (22:25 -0400)
given modern memory sizes.  Now, for filesystems greater than 4GB, we
use a journal of 128 MB instead 32 MB.

misc/ChangeLog
misc/util.c

index 5399e73..5520395 100644 (file)
@@ -1,5 +1,10 @@
 2005-05-09  Theodore Ts'o  <tytso@mit.edu>
 
+       * 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)
 
index 16ea19f..77359c8 100644 (file)
@@ -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;
 }