summaryrefslogtreecommitdiffstats
path: root/sbin/fsck
Commit message (Collapse)AuthorAgeFilesLines
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* mdoc(7) police: Fixed broken xrefs.ru2001-08-221-1/+1
|
* Silence non-constant format string warnings by marking functionskris2001-08-191-1/+1
| | | | | | | as __printflike()/__printf0like(), adding const, or adding missing "%s" format strings, as appropriate. MFC after: 2 weeks
* Remove whitespace at EOL.dd2001-07-151-5/+5
|
* Update usage message with new options.mckusick2001-04-301-1/+1
| | | | Submitted by: Ruslan Ermilov <ru@FreeBSD.org>
* mdoc(7) police: update document date, sort xrefs, fix markup.ru2001-04-271-5/+11
|
* Add support for running foreground (-F) and background (-B) checks.mckusick2001-04-255-49/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | Traditionally, fsck is invoked before the filesystems are mounted and all checks are done to completion at that time. If background checking is available, fsck is invoked twice. It is first invoked at the traditional time, before the filesystems are mounted, with the -F flag to do checking on all the filesystems that cannot do background checking. It is then invoked a second time, after the system has completed going multiuser, with the -B flag to do checking on all the filesystems that can do background checking. Unlike the foreground checking, the background checking is started asynchonously so that other system activity can proceed even on the filesystems that are being checked. At the moment, only the fast filesystem supports background checking. To be able to do background checking, a filesystem must have been running with soft updates, not have been marked as needing a foreground check, and be mounted and writable when the background check is to be done (i.e., not listed as `noauto' in /etc/fstab). These changes are the final piece needed to support background filesystem checking. They will not have any effect until you update your /etc/rc to invoke fsck in its new mode of operation. I am still playing around with exactly what those changes should be and should be committing them later this week.
* Don't make fsck go quite _that_ fast:phk2001-04-071-1/+3
| | | | In Preen mode we only checked one partition per disk device.
* mdoc(7) police: use .Nm instead of hardcoded name.ru2001-04-041-1/+3
|
* This change sanitizes the way fsck deals with pass numbers.phk2001-03-304-61/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this /etc/fstab: # Device Mountpoint FStype Options Dump Pass# /dev/ad1s1b none swap sw 0 0 /dev/ad0s1b none swap sw 0 0 /dev/ad0s1a / ufs rw 1 1 /dev/ad0s1e /home ufs rw 2 2 /dev/ad1s1e /tmp ufs rw 2 2 /dev/ad1s1f /usr ufs rw 2 2 /dev/ccd0c /syv ufs rw 2 11 proc /proc procfs rw 0 0 ccd0c is striped over /dev/ad0f and /dev/ad1g Without this pass, fsck in preen mode will check ad0s1a first, and then issue three processes in parallel: One process doing ad0s1e One process doing ad1s1e and ad1s1f One process doing ccd0c There is no way to tell it that ccd0c overlaps ad0 and ad1. With the patch, it will do it this way: pass 2: One process doing ad0s1e One process doing ad1s1e and ad1s1f and when they are complete: pass 11: One process doing ccd0c This is much faster and more sane. Valid pass numbers are anything from 1 to INTMAX-1. I retired the '-l' option which tried to allow people to do something like this, but which didn't work and which complicated the code an awful lot.
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for sbin/ to 8.ru2001-03-201-1/+0
|
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-011-2/+2
|
* Use macro API to <sys/queue.h>phk2000-12-302-6/+6
| | | | | Submitted by: "Peter Avalos" <pavalos@theshell.com> Reviewed by: /sbin/md5
* When trying to deduce the diskname from the name so we can runphk2000-12-272-8/+13
| | | | | | | | | | | | | | | | | parallel fsck's one per drive, use the shortest prefix ending in a digit rather than the longest prefix ending in a digit. This makes "/dev/ad0s1a" and "/dev/ad0s2a" appear to both reside on the disk "/dev/ad0" and consequently they will be fsck'ed sequentially rather than in parallel as now. In general this heuristic is rather soft and errorprone. For instance ccd may often reside on two or more physical disks. A good solution would be to look for passes larger than 1 until no disks are found in a particular pass, that way people could put ccd stripes in pass 3... and have them fsck'ed sequentially. Reviewed by: mjacob
* Use official API to <sys/queue.h> instead of groping around inside thephk2000-12-271-17/+16
| | | | | | data structures. Reviewed by: imp
* Prepare for mdoc(7)NG.ru2000-12-181-1/+1
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-1/+1
|
* mdoc(7) police: fix errors uncovered by the new feature of the Nm macro.ru2000-11-181-2/+2
|
* We want the FreeBSD ID as the RCS ID, not the NetBSD one.obrien2000-10-101-4/+3
|
* Fixed breakage of CFLAGS and misplacement of $FreeBSD$ in previous commit.bde2000-10-101-2/+1
|
* .. fsck wrappers aftercommit #1: I don't know how these files got lost,adrian2000-10-092-0/+467
| | | | but they did. Oops.
* Reviewed by: rwatson, bpadrian2000-10-0925-8129/+1004
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Approved by: rwatson Obtained from: NetBSD source tree Second part of the fsck wrappers commit. This commit enables the new fsck code (removing the fsck/* code and replacing it with the netbsd fsck wrapper code), and enabling some FFS-based utilities to compile. Details: * quotacheck, fsdb required modification to use the fsck_ffs/ code rather than fsck/ . This might change later since quotacheck requires preen.c which should exist in fsck/ rather than fsck_ffs/ * src/Makefile has fsck_ffs added to it so it it built as part of the tree now * share/doc/smm/03.fsck/ uses the SMM.doc/ stuff from fsck_ffs, not fsck. I've tested this, and it shouldn't require any changes on your machine. The fsck wrapper reads /etc/fsck and is command-line-compatible enough to not require rc changes (well, most changes unless you want to do anything nifty by specifying the fs types explicityly, read the man page if you want further details on what it can do.) This now allows us to support multiple filesystem types during bootup.
* Format string fix.kris2000-10-061-1/+1
|
* If the lost+found directory is created by fsck, it will do a cacheino()mckusick2000-07-241-1/+5
| | | | | | | | | | | | | | which sets the inoinfo's i_parent and i_dotdot to 0, but they never get set to ROOTINO. This means that propagate will never find lost+found and its descendents, subdirectories will remain DSTATE (instead of DFOUND) even though they *are* correctly linked in, and pass4.c will try to clear them unsuccessfully, thinking that there is no link count from the DSTATE directory's parent. The result is that you need to run fsck twice and get link count increasing errors (which are unexpected and fatal when running in preen mode). The fix is to set i_parent and i_dotdot to "parent" after the second cacheino() call in dir.c:allocdir(). Obtained from: "Ethan Solomita" <ethan@geocast.com> (of the NetBSD Project)
* Make a tighter test for valid inode numbers in getnextinode().mckusick2000-07-151-2/+3
|
* Ensure that block and character devices as well as fifo's and socketsmckusick2000-07-121-0/+6
| | | | | | | | | all have zero length. A non-zero length panic's the kernel when one of these is deleted. PR: 19426 Submitted by: Ian Dowse <iedowse@maths.tcd.ie> Reviewed by: dwmalone@FreeBSD.org
* Teach fsck about snapshot files. These changes should have nomckusick2000-07-066-15/+121
| | | | | | | effect on operation of fsck on filesystems without snapshots. If you get compilation errors, be sure that you have copies of /usr/include/sys/mount.h (1.94), /usr/include/sys/stat.h (1.21), and /usr/include/ufs/ffs/fs.h (1.16) as of July 4, 2000 or later.
* Yesterday I had to fix a badly broken disk, and found that fsck kept dying:mckusick2000-02-283-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DIR I=64512 CONNECTED. PARENT WAS I=4032 fsck: cannot find inode 995904 fsdb found the inodes with no problem: fsdb (inum: 64512)> inode 995904 current inode: directory I=995904 MODE=40777 SIZE=512 MTIME=Feb 14 15:27:07 2000 [0 nsec] CTIME=Feb 14 15:27:07 2000 [0 nsec] ATIME=Feb 24 10:31:58 2000 [0 nsec] OWNER=nobody GRP=nobody LINKCNT=4 FLAGS=0 BLKCNT=2 GEN=38a41386 Direct blocks: 8094568 0 0 0 0 0 0 0 0 0 0 0 Indirect blocks: 0 0 0 The problem turns out to be a program logic error in fsck. It stores directory inodes internally in hash lists, using the number of directories to form the hash key: inpp = &inphead[inumber % numdirs]; Elsewhere, however, it increments numdirs when it finds unattached directories. I've made the following fix, which solved the problem in the case in hand. Submitted by: Greg Lehey <grog@lemis.com> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Approved by: Kirk McKusick <mckusick@mckusick.com>
* Fix the use of an uninitialized variable in the previous commit.peter2000-01-101-2/+2
| | | | | | | Also, in addition to the previous log message, the last change had a fix for the case where where f.mntfromname is a relative path like da0a. Submitted by: bde
* - Style/bde changes.peter2000-01-101-32/+38
| | | | | | | | | | - Don't use realpath as stat does the right thing. - Only check ufs filesystems in getmntpt. - Dont' bother checking that the ufs-mounted-on device is a special file. It *must* be a special file, or ufs wouldn't have mounted it. Submitted by: Paul Saab <ps@yahoo-inc.com>
* - Forgot to nuke hotroot completely.peter2000-01-101-1/+1
| | | | Submitted by: Paul Saab <ps@yahoo-inc.com>
* Make fsck(8) do a MNT_RELOAD after cleaning for all read-only mountedpeter1999-12-302-35/+63
| | | | | | | filesystems, not just for the root fs. Reviewed by: mckusick Submitted by: Paul Saab <ps@yahoo-inc.com>
* Make fsck even more char/blk dev tolerant.phk1999-11-272-18/+11
|
* Allow root-reloading also for chr devices.phk1999-11-271-44/+3
|
* $Id$ -> $FreeBSD$peter1999-08-2813-13/+13
|
* Also check against chardevs when looking for root.phk1999-07-201-1/+3
|
* Cosmetic and documentation changes brought from earlier FreeBSD versions.julian1998-12-0313-32/+91
| | | | (e.g. RCS Id:)
* Reviewed by: Don Lewis <Don.Lewis@tsc.tdk.com>julian1998-12-0314-379/+556
| | | | | | | | | | | | Submitted by: Kirk McKusick <mckusick@McKusick.COM> Obtained from: Mckusick, BSDI and a host of others This exactly matches Kirks sources imported under the Tag MCKUSICK2. These are as supplied by kirk with one small change needed to compile under freeBSD. Some FreeBSD patches will be added back, though many have been added to Kirk's sources already.
* These shouldn't have been checked in here..julian1998-12-022-406/+0
| | | | Reviewee by:
* This commit was generated by cvs2svn to compensate for changes in r41461,julian1998-12-022-0/+406
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Latest version of fsck from the folks at EX-CSRG specifically Kirk Mckusick.julian1998-12-0217-345/+1196
| | | | | | | | | | Don Lewis and Kirk have merges nearly all FreeBSD Fixes into Kirks sources so there is very little that needs to be re-merged.
| * Import some CSRG 4.4BSD-Lite2 components for sbin onto vendor branch.peter1997-03-1115-346/+680
| | | | | | | | (note that some of these have already been imported, this is a no-op)
* | For large filesystems you can run past default resource limits causingmjacob1998-11-051-1/+7
| | | | | | | | | | | | | | fsck to exit unhappily. Fix this by doing a getrlimit/setrlimit for RLIMIT_DATA. I made the same fix in NetBSD. Reviewed by: dg@root.com
* | - Back out softupdate change that already existed in FreeBSD from V1.6,nate1998-09-231-3/+1
| | | | | | | | | | | | | | | | | | which caused the reference count of a directory to get doubly decremented. PR: bin/8030 Reviewed by: nate Submitted by: Don Lewis <Don.Lewis@tsc.tdk.com>
* | Use explicitly sized types when laying out the cylinder groups. Thisdfr1998-08-151-6/+6
| | | | | | | | | | | | bug was the cause of the 'freeing free frag' panics that people have been seeing with FreeBSD/alpha. I have a similar patch to newfs but I've not finished testing it.
* | There seem to be two messages that were added with soft-updatesphk1998-08-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | support, which need a final "\n". I only observed one line of mangled output, but I think there is another one which suffers from the same problem, and thus I provide a patch that covers both. PR: 7483 Reviewed by: phk Submitted by: Stefan Esser <se@FreeBSD.org>
* | Avoid trying to malloc > (1<<32) bytes of memory due to an arithmeticdfr1998-08-011-2/+2
| | | | | | | | underflow on the alpha.
* | Restored rev.1.11, which I somehow clobbered in rev.1.12.bde1998-07-061-1/+4
| |
* | Fixed printf format errors.bde1998-06-285-21/+22
| |
OpenPOWER on IntegriCloud