summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ifs
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-03-13 15:37:23 +0000
committerpeter <peter@FreeBSD.org>1997-03-13 15:37:23 +0000
commit2d879de2ade07a5c269c286b027845381dc2b326 (patch)
treedac56cb8ba61bccd95afc3629a3808e3fcc83899 /sbin/fsck_ifs
parentccae52be0e9d2b421203eecf2021979143b75798 (diff)
downloadFreeBSD-src-2d879de2ade07a5c269c286b027845381dc2b326.zip
FreeBSD-src-2d879de2ade07a5c269c286b027845381dc2b326.tar.gz
Kill the Lite2 early "filesystem clean abort" check and go back to
something closer to how we used to do it. The Lite2 way is to check the "fsclean" flag in the superblock and stop there if so (during preen). We now do the various superblock sanity checks that we used to do before since it's cheap. We now get the filesystem state summary again instead of "FILESYSTEM CLEAN; CHECKING SKIPPED" (or whatever).
Diffstat (limited to 'sbin/fsck_ifs')
-rw-r--r--sbin/fsck_ifs/main.c4
-rw-r--r--sbin/fsck_ifs/setup.c10
2 files changed, 6 insertions, 8 deletions
diff --git a/sbin/fsck_ifs/main.c b/sbin/fsck_ifs/main.c
index b7343da..fbeb3ee 100644
--- a/sbin/fsck_ifs/main.c
+++ b/sbin/fsck_ifs/main.c
@@ -197,10 +197,6 @@ checkfilesys(filesys, mntpt, auxdata, child)
pfatal("CAN'T CHECK FILE SYSTEM.");
/* fall through */
case -1:
- return (0);
- }
-
- if (preen && sblock.fs_clean && !fflag) {
pwarn("clean, %ld free ", sblock.fs_cstotal.cs_nffree +
sblock.fs_frag * sblock.fs_cstotal.cs_nbfree);
printf("(%ld frags, %ld blocks, %.1f%% fragmentation)\n",
diff --git a/sbin/fsck_ifs/setup.c b/sbin/fsck_ifs/setup.c
index ab143e1..bec9a31 100644
--- a/sbin/fsck_ifs/setup.c
+++ b/sbin/fsck_ifs/setup.c
@@ -145,10 +145,6 @@ setup(dev)
pwarn("USING ALTERNATE SUPERBLOCK AT %d\n", bflag);
bflag = 0;
}
- if (skipclean && sblock.fs_clean) {
- pwarn("FILESYSTEM CLEAN; SKIPPING CHECKS\n");
- return (-1);
- }
maxfsblock = sblock.fs_size;
maxino = sblock.fs_ncg * sblock.fs_ipg;
/*
@@ -265,6 +261,12 @@ setup(dev)
}
}
/*
+ * If we survive the above basic checks and are preening,
+ * quit here unless forced.
+ */
+ if (skipclean && sblock.fs_clean && !fflag)
+ return (-1);
+ /*
* allocate and initialize the necessary maps
*/
bmapsize = roundup(howmany(maxfsblock, NBBY), sizeof(short));
OpenPOWER on IntegriCloud