FreeBSD src
Go to file
Kirk McKusick e50342e665 Yesterday I had to fix a badly broken disk, and found that fsck kept dying:
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>
2000-02-28 20:02:41 +00:00
bin Fix style bugs I introduced in the last revision. 2000-02-27 16:40:39 +00:00
contrib Get crypto from libcrypto, not libdes. 2000-02-24 19:28:31 +00:00
crypto 1) Add kerberos5 functionality. 2000-02-28 19:03:50 +00:00
etc Get the order of things right; the keys need to be generated 2000-02-28 19:54:06 +00:00
games Change RETTOKEN from '\n' to '\r'; it didn't work under some or all 2000-02-27 23:02:47 +00:00
gnu Use libcrypto instead of libdes. 2000-02-24 23:15:42 +00:00
include Do not conditionalize function prototype definition for functions we 2000-02-20 07:40:25 +00:00
kerberos5 Remove largescale evidence of crack-smoking. 2000-02-28 19:15:32 +00:00
kerberosIV Use libcrypto in place of libdes. 2000-02-24 20:57:04 +00:00
lib Add MAP_NOCORE to mmap(2), and MADV_NOCORE and MADV_CORE to madvise(2). 2000-02-28 04:10:35 +00:00
libexec Use libcrypto instead of libdes. 2000-02-24 21:18:08 +00:00
release Add OpenSSH blurb and some other minor changes. 2000-02-28 01:57:15 +00:00
sbin Yesterday I had to fix a badly broken disk, and found that fsck kept dying: 2000-02-28 20:02:41 +00:00
secure New distribution names. 2000-02-28 19:25:34 +00:00
share Update the description of NOCRYPT and NOSECURE to match reality. 2000-02-28 07:07:26 +00:00
sys Reset the hardware debug registers when exec'ing a new image. 2000-02-28 19:48:51 +00:00
tools These are regression tests for the P1003.1B scheduler. 2000-02-16 14:28:42 +00:00
usr.bin Previous fix was incomplete and has problem in reverse lookup failed dest, 2000-02-28 18:37:07 +00:00
usr.sbin Fix a serious bug in syslogd regarding the handling of pipes. The bug 2000-02-28 17:49:43 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile We have a new world order in libraries. 2000-02-24 23:03:16 +00:00
Makefile.inc1 We have a new world order in libraries. 2000-02-24 23:03:16 +00:00
Makefile.upgrade $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
README $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
UPDATING Slightly improved 3.x -> current instructions. 2000-02-23 05:51:02 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel and the contents of /etc.  Please see the top of the Makefile
in this directory for more information on the standard build targets
and compile-time flags.

Building a kernel with config(8) is a somewhat more involved process,
documentation for which can be found at:
   http://www.freebsd.org/handbook/kernelconfig.html
And in the config(8) man page.

The sample kernel configuration files reside in the sys/i386/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file LINT contains entries for all possible devices, not
just those commonly used, and is meant more as a general reference
than an actual kernel configuration file (a kernel built from it
wouldn't even run).


Source Roadmap:
---------------
bin		System/User commands.

contrib		Packages contributed by 3rd parties.

crypto		Export controlled stuff (see crypto/README).

etc		Template files for /etc

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberosIV	Kerberos package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		DES and DES-related utilities - NOT FOR EXPORT!

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/handbook/synching.html