aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsck_ifs/setup.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove IFS from 5.0-CURRENT. This facilitates introducing UFS2 asRobert Watson2002-05-191-511/+0
| | | | | | | | | | | IFS had its fingers deep in the belly of the UFS/FFS split. IFS will be reimplemented by the maintainer at a later date once the UFS implementation is in place. Requested by: adrian (maintainer) Notes: svn path=/head/; revision=96884
* Retire the bogus uses of the disklabel field d_sbsize and begin toPoul-Henning Kamp2002-05-121-3/+0
| | | | | | | | | | initialize it to zero so we don't have to have everbody and their aunt including FFS specific header files. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=96475
* o __P removedWarner Losh2002-03-201-18/+9
| | | | | | | | | | o ansi function prototypes o unifdef -D__STDC__ o __dead2 on usage prototype o remove now-bogus main prototype Notes: svn path=/head/; revision=92839
* Remove 'register' keyword.David E. O'Brien2002-03-201-4/+4
| | | | | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?) Notes: svn path=/head/; revision=92806
* The ffs superblock includes a 128-byte region for use by temporaryIan Dowse2001-01-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | | in-core pointers to summary information. An array in this region (fs_csp) could overflow on filesystems with a very large number of cylinder groups (~16000 on i386 with 8k blocks). When this happens, other fields in the superblock get corrupted, and fsck refuses to check the filesystem. Solve this problem by replacing the fs_csp array in 'struct fs' with a single pointer, and add padding to keep the length of the 128-byte region fixed. Update the kernel and userland utilities to use just this single pointer. With this change, the kernel no longer makes use of the superblock fields 'fs_csshift' and 'fs_csmask'. Add a comment to newfs/mkfs.c to indicate that these fields must be calculated for compatibility with older kernels. Reviewed by: mckusick Notes: svn path=/head/; revision=71073
* Pre-IFS commit. Commit IFS-aware fsck and mount utilities.Adrian Chadd2000-10-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | mount_ifs: repocopy of sbin/mount, with most of the intelligence ripped out and "ufs" replaced with "ifs" in the right places. It will only mount a single filesystem, rather than the -t <type> magic that our real mount does. fsck_ifs: repocopy of sbin/fsck_ffs, but the directory structure stuff (pass2 and some refcount checks) has been #ifdef'ed out. src/sbin/Makefile: Build these two utilities There is probably cruft code left in both which can be removed at a later date, especially in mount_ifs, but I trust that people will not try mount_ifs -a .. Note: there are no man pages installed for these two commands as I haven't actually written them yet. Notes: svn path=/head/; revision=67105
* Teach fsck about snapshot files. These changes should have noKirk McKusick2000-07-061-3/+10
| | | | | | | | | | 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. Notes: svn path=/head/; revision=62668
* Yesterday I had to fix a badly broken disk, and found that fsck kept dying:Kirk McKusick2000-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=57573
* Make fsck even more char/blk dev tolerant.Poul-Henning Kamp1999-11-271-2/+3
| | | | Notes: svn path=/head/; revision=53781
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Cosmetic and documentation changes brought from earlier FreeBSD versions.Julian Elischer1998-12-031-1/+4
| | | | | | | (e.g. RCS Id:) Notes: svn path=/head/; revision=41477
* Reviewed by: Don Lewis <Don.Lewis@tsc.tdk.com>Julian Elischer1998-12-031-32/+17
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=41474
* Fixed printf format errors.Bruce Evans1998-06-281-2/+3
| | | | Notes: svn path=/head/; revision=37236
* Correct use of .Nm. Add rcsid. Remove unused #includes. Use err(3).Philippe Charnier1998-06-151-2/+4
| | | | Notes: svn path=/head/; revision=37000
* Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)Julian Elischer1998-03-081-1/+7
| | | | | | | | Submitted by: Kirk McKusick (mcKusick@mckusick.com) Obtained from: WHistle development tree Notes: svn path=/head/; revision=34266
* If numdirs is zero, print a helpful message instead of divding by zero later.Poul-Henning Kamp1998-03-041-0/+4
| | | | Notes: svn path=/head/; revision=34033
* Guard against a block size of 0 in the label. When the firstBruce Evans1998-01-191-0/+5
| | | | | | | | | | | | | | | | | | | | superblock is invalid, fsck looks at the label to help guess where the next superblock should be. If the partition type is 4.2BSD, fsck assumed that the block size was valid and divided by it, so it dumped core if the size was 0. Initialization of the label was broken almost 3 years ago in rev.1.9 of newfs/newfs.c. Newfs does not change the label at all, so there is no problem (except the breakage of the automatic search for backup superblocks) unless something else sets the partition type to 4.2BSD. However, it is too easy to set partition types to 4.2.BSD by copying an old label or by using a disktab entry to create the label. PR: 2537 Notes: svn path=/head/; revision=32622
* Kill the Lite2 early "filesystem clean abort" check and go back toPeter Wemm1997-03-131-4/+6
| | | | | | | | | | | 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). Notes: svn path=/head/; revision=23844
* Finished (?) merging with Lite2: cleaned up #include mess.Bruce Evans1997-03-121-2/+0
| | | | Notes: svn path=/head/; revision=23799
* Merge from Lite2. Note that Lite2 has it's own filesystem clean checkPeter Wemm1997-03-111-33/+60
| | | | | | | | skipping code that overrides ours sooner. One should be eliminated, but for now it works. Notes: svn path=/head/; revision=23675
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-4/+4
| | | | Notes: svn path=/head/; revision=8871
* Submitted by: phk, added to by bdeBruce Evans1995-04-021-4/+14
| | | | | | | Fix all the warnings from `gcc -Wall'. Notes: svn path=/head/; revision=7585
* Don't allow the alternate superblock block number for one file systemBruce Evans1995-02-091-0/+2
| | | | | | | to apply to others (except when it is given on the command line). Notes: svn path=/head/; revision=6280
* BSD 4.4 Lite sbin SourcesRodney W. Grimes1994-05-261-0/+466
Note: XNSrouted and routed NOT imported here, they shall be imported with usr.sbin. Notes: svn path=/head/; revision=1558