ChangeLog, fsck.c, mke2fs.c:
  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.

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 1f02da8..7f5e5e5 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -322,6 +322,12 @@
 	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 @@
 		}
 		if (!quiet) 
 			fputs(backup, stdout);
+		if (sync_kludge) {
+			if (sync_kludge == 1)
+				sync();
+			else if ((i % sync_kludge) == 0)
+				sync();
+		}
 	}
 	free(buf);
 	if (!quiet)