]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
ChangeLog, fsck.c, mke2fs.c:
authorTheodore Ts'o <tytso@mit.edu>
Tue, 9 Feb 1999 08:14:28 +0000 (08:14 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 9 Feb 1999 08:14:28 +0000 (08:14 +0000)
  fsck.c (fsck_device): Print an error message if the user passes in a
   device or directory name which isn't found in /etc/fstab.  Allow the
   location of /etc/fstab to be overridden by the FSTAB_FILE environment
   variable.
  mke2fs.c (write_inode_tables): Add kludge code so that when the
   MKE2FS_SYNC environment variable is set, mke2fs will sync every
   MKE2FS_SYNC block groups, while it is writing out the inode tables.
   This is to work around a VM bug in the 2.0 kernel.  I've heard a
   report that a RAID user was able to trigger it even using a 2.2
   kernel.

misc/ChangeLog
misc/fsck.c
misc/mke2fs.c

index 963bf0a01e01ef60e3b533633316240f0926e555..a44e3520536b54f2c5fdbc03ae21f5da8af36ad7 100644 (file)
@@ -1,3 +1,19 @@
+1999-02-09  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * fsck.c (fsck_device): Print an error message if the user passes
+               in a device or directory name which isn't found in /etc/fstab.
+               Allow the location of /etc/fstab to be overridden by
+               the FSTAB_FILE environment variable.
+
+1999-01-30  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * mke2fs.c (write_inode_tables): Add kludge code so that when the
+               MKE2FS_SYNC environment variable is set, mke2fs will sync
+               every MKE2FS_SYNC block groups, while it is writing out
+               the inode tables.  This is to work around a VM bug in the
+               2.0 kernel.  I've heard a report that a RAID user was able
+               to trigger it even using a 2.2 kernel.
+
 1999-01-16  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * fsck.c (execute, wait_one): Modified routines so that they
index 50f8f7ceafc99b890008a6ce0c9807b142b31399..678da9aeb3090a95a76a680fcb0e9f04e80906aa 100644 (file)
@@ -507,6 +507,12 @@ static void fsck_device(char *device)
                if (!type)
                        type = fsent->type;
        }
+       if (!fsent) {
+               fprintf(stderr,
+                       "Error: no entry found the fstab file for %s.\n",
+                       device);
+               exit(1);
+       }
        if (!type)
                type = DEFAULT_FSTYPE;
 
@@ -830,6 +836,7 @@ int main(int argc, char *argv[])
        int i;
        int status = 0;
        char *oldpath = getenv("PATH");
+       char *fstab;
 
        PRS(argc, argv);
 
@@ -837,7 +844,10 @@ int main(int argc, char *argv[])
                printf("Parallelizing fsck version %s (%s)\n",
                        E2FSPROGS_VERSION, E2FSPROGS_DATE);
 
-       load_fs_info(_PATH_MNTTAB);
+       fstab = getenv("FSTAB_FILE");
+       if (!fstab)
+               fstab = _PATH_MNTTAB;
+       load_fs_info(fstab);
 
        /* Update our search path to include uncommon directories. */
        if (oldpath) {
index 1f02da8fc968ebf50baa29aeee52db3fe9f06ee7..7f5e5e5eb8dc26e9546ca1df489510ed47a7cffa 100644 (file)
@@ -322,6 +322,12 @@ static void write_inode_tables(ext2_filsys fs)
        int             i, j, num, count;
        char            *buf;
        char            format[20], backup[80];
+       int             sync_kludge = 0;
+       char            *mke2fs_sync;
+
+       mke2fs_sync = getenv("MKE2FS_SYNC");
+       if (mke2fs_sync)
+               sync_kludge = atoi(mke2fs_sync);
 
        buf = malloc(fs->blocksize * STRIDE_LENGTH);
        if (!buf) {
@@ -362,6 +368,12 @@ static void write_inode_tables(ext2_filsys fs)
                }
                if (!quiet) 
                        fputs(backup, stdout);
+               if (sync_kludge) {
+                       if (sync_kludge == 1)
+                               sync();
+                       else if ((i % sync_kludge) == 0)
+                               sync();
+               }
        }
        free(buf);
        if (!quiet)