]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
ChangeLog, mke2fs.8.in, mke2fs.c:
authorTheodore Ts'o <tytso@mit.edu>
Sun, 14 Jan 2001 17:02:09 +0000 (17:02 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 14 Jan 2001 17:02:09 +0000 (17:02 +0000)
  mke2fs.c: Add new filesystem types, largefile and largefile4, for
   those filesystems whose average inode size is 1MB and 4MB,
   respectively.  Allow the inode ratio specified to be has high as 4MB.
   Make the s_max_mount_count vary between 20 and 40, to avoid needing to
   check all of the filesystems at the same time.  Add some random jitter
   to the s_max_mount_count value so that we avoid checking all of the
   filesystems at the same time when we reboot.

misc/ChangeLog
misc/mke2fs.8.in
misc/mke2fs.c

index 042fbd74f1abf0e8817cd85e755340299204777d..8d85d4f7d3d4f8263f1ca4fcdc9f0ec8c7578571 100644 (file)
@@ -1,5 +1,14 @@
 2001-01-14  Theodore Ts'o  <tytso@valinux.com>
 
+       * mke2fs.c: Add new filesystem types, largefile and largefile4,
+               for those filesystems whose average inode size is 1MB and
+               4MB, respectively.  Allow the inode ratio specified to be
+               has high as 4MB.   Make the s_max_mount_count vary between
+               20 and 40, to avoid needing to check all of the
+               filesystems at the same time.  Add some random jitter to
+               the s_max_mount_count value so that we avoid checking all
+               of the filesystems at the same time when we reboot.
+
        * tune2fs.8.in: Add description of the -j option.
 
        * tune2fs.c (add_journal): Minor fixes from Andreas Dilger. Flush
index 99d209d1f08260ac599e882d7812ffd50f9f9249..f8d5fe023e6f129c57ba3c40511a5cdbb4cc9ca8 100644 (file)
@@ -268,8 +268,14 @@ is no guarantee that any data will be salvageable.
 .TP
 .BI \-T " fs-type"
 Specify how the filesystem is going to be used, so that mke2fs can 
-automatically determine the optimal filesystem parameters.  The only
-filesystem type which is currently supported is "news".
+chose optimal filesystem parameters for that use.  The only
+currently supported filesystem types are:
+.BR news ,
+which reserves space for  one inode per 4kb block,
+.BR largefile
+which allocates one inode per megabyte, and
+.BR largefile4
+which allocates one inode per 4 megabytes.  
 .TP
 .B \-V
 Print the version number of 
index b6110659ff736d72be53729b628cc8ecffbdfce9..b72ea1b2221b3c86113cdb704150270a60ad963c 100644 (file)
@@ -137,6 +137,8 @@ struct mke2fs_defaults {
        { default_str, 512, 1024, 4096 },
        { default_str, 3, 1024, 8192 },
        { "news", 0, 4096, 4096 },
+       { "largefile", 0, 4096, 1024 * 1024 },
+       { "largefile4", 0, 4096, 4096 * 1024 },
        { 0, 0, 0, 0},
 };
 
@@ -725,7 +727,7 @@ static void PRS(int argc, char *argv[])
                        break;
                case 'i':
                        inode_ratio = strtoul(optarg, &tmp, 0);
-                       if (inode_ratio < 1024 || inode_ratio > 256 * 1024 ||
+                       if (inode_ratio < 1024 || inode_ratio > 4096 * 1024 ||
                            *tmp) {
                                com_err(program_name, 0,
                                        _("bad inode ratio - %s"), optarg);
@@ -927,6 +929,7 @@ int main (int argc, char *argv[])
        ext2_filsys     fs;
        badblocks_list  bb_list = 0;
        int             journal_blocks;
+       int             i, val;
 
 #ifdef ENABLE_NLS
        setlocale(LC_MESSAGES, "");
@@ -955,6 +958,15 @@ int main (int argc, char *argv[])
         */
        uuid_generate(fs->super->s_uuid);
 
+       /*
+        * Add "jitter" to the superblock's check interval so that we
+        * don't check all the filesystems at the same time.  We use a
+        * kludgy hack of using the UUID to derive a random jitter value.
+        */
+       for (i = 0, val = 0 ; i < sizeof(fs->super->s_uuid); i++)
+               val += fs->super->s_uuid[i];
+       fs->super->s_max_mnt_count += val % EXT2_DFL_MAX_MNT_COUNT;
+
        /*
         * Override the creator OS, if applicable
         */