summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ifs/setup.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove IFS from 5.0-CURRENT. This facilitates introducing UFS2 asrwatson2002-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)
* Retire the bogus uses of the disklabel field d_sbsize and begin tophk2002-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.
* o __P removedimp2002-03-201-18/+9
| | | | | | | o ansi function prototypes o unifdef -D__STDC__ o __dead2 on usage prototype o remove now-bogus main prototype
* Remove 'register' keyword.obrien2002-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?)
* The ffs superblock includes a 128-byte region for use by temporaryiedowse2001-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
* Pre-IFS commit. Commit IFS-aware fsck and mount utilities.adrian2000-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.
* Teach fsck about snapshot files. These changes should have nomckusick2000-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.
* Yesterday I had to fix a badly broken disk, and found that fsck kept dying: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>
* Make fsck even more char/blk dev tolerant.phk1999-11-271-2/+3
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Cosmetic and documentation changes brought from earlier FreeBSD versions.julian1998-12-031-1/+4
| | | | (e.g. RCS Id:)
* Reviewed by: Don Lewis <Don.Lewis@tsc.tdk.com>julian1998-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.
* Fixed printf format errors.bde1998-06-281-2/+3
|
* Correct use of .Nm. Add rcsid. Remove unused #includes. Use err(3).charnier1998-06-151-2/+4
|
* Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)julian1998-03-081-1/+7
| | | | | Submitted by: Kirk McKusick (mcKusick@mckusick.com) Obtained from: WHistle development tree
* If numdirs is zero, print a helpful message instead of divding by zero later.phk1998-03-041-0/+4
|
* Guard against a block size of 0 in the label. When the firstbde1998-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
* Kill the Lite2 early "filesystem clean abort" check and go back topeter1997-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).
* Finished (?) merging with Lite2: cleaned up #include mess.bde1997-03-121-2/+0
|
* Merge from Lite2. Note that Lite2 has it's own filesystem clean checkpeter1997-03-111-33/+60
| | | | | skipping code that overrides ours sooner. One should be eliminated, but for now it works.
* Remove trailing whitespace.rgrimes1995-05-301-4/+4
|
* Submitted by: phk, added to by bdebde1995-04-021-4/+14
| | | | Fix all the warnings from `gcc -Wall'.
* Don't allow the alternate superblock block number for one file systembde1995-02-091-0/+2
| | | | to apply to others (except when it is given on the command line).
* BSD 4.4 Lite sbin Sourcesrgrimes1994-05-261-0/+466
Note: XNSrouted and routed NOT imported here, they shall be imported with usr.sbin.
OpenPOWER on IntegriCloud