summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/ChangeLog16
-rw-r--r--misc/fsck.c12
-rw-r--r--misc/mke2fs.c12
3 files changed, 39 insertions, 1 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog
index 963bf0a0..a44e3520 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -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
diff --git a/misc/fsck.c b/misc/fsck.c
index 50f8f7ce..678da9ae 100644
--- a/misc/fsck.c
+++ b/misc/fsck.c
@@ -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) {
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 1f02da8f..7f5e5e5e 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -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)