freebsd kernel with SKQ
Go to file
mckusick 95c69781b5 Reported problem:
Large (60GB) filesystems created using "newfs -U -O 1 -b 65536 -f 8192"
show incorrect results from "df" for free and used space when mounted
immediately after creation. fsck on the new filesystem (before ever
mounting it once) gives a "SUMMARY INFORMATION BAD" error in phase 5.

This error hasn't occurred in any runs of fsck immediately after
"newfs -U -b 65536 -f 8192" (leaving out the "-O 1" option).

Solution:
The default UFS1 superblock is located at offset 8K in the filesystem
partition; the default UFS2 superblock is located at offset 64K in
the filesystem partition. For UFS1 filesystems with a blocksize of
64K, the first alternate superblock resides at 64K which is the the
location used for the default UFS2 superblock. By default, the
system first checks for a valid superblock at the default location
for a UFS2 filoesystem. For a UFS1 filesystem with a blocksize of
64K, there is a valid UFS1 superblock at this location.  Thus, even
though it is expected to be a backup superblock, the system will
use it as its default superblock. So, we have to ensure that all the
statistcs on usage are correct in this first alternate superblock
as it is the superblock that will actually be used.

While tracking down this problem, another limitation of UFS1 became
evident. For UFS1, the number of inodes per cylinder group is stored
in an int16_t. Thus the maximum number of inodes per cylinder group
is limited to 2^15 - 1. This limit can easily be exceeded for block
sizes of 32K and above. Thus when building UFS1 filesystems, newfs
must limit the number of inodes per cylinder group to 2^15 - 1.

Reported by: Guy Helmer<ghelmer@palisadesys.com>
Followup by: Bruce Cran <brucec@freebsd.org>
PR:          107692
MFC after:   4 weeks
2010-09-24 19:08:56 +00:00
bin Correct sort order. 2010-09-22 19:26:41 +00:00
cddl Minor grammar fixes. 2010-09-21 21:07:46 +00:00
contrib Upgrade our Clang in base to r114020, from upstream's release_28 branch. 2010-09-20 16:43:17 +00:00
crypto Bring in OpenSSL checkin 19821: 2010-09-21 10:22:29 +00:00
etc Split $ipv6_prefer into $ip6addrctl_policy and $ipv6_activate_all_interfaces. 2010-09-13 19:55:40 +00:00
games fix the move so that it matches what the rest of the internet 2010-09-03 03:20:34 +00:00
gnu Move test for zero bufp or size before rseq and wseq calculation. This 2010-09-22 19:41:01 +00:00
include Correct value for _POSIX_AIO_LISTIO_MAX in <limits.h>. 2010-08-29 22:22:15 +00:00
kerberos5 Fix a typo. 2010-01-09 18:53:03 +00:00
lib inline testcancel() into thr_cancel_leave(), because cancel_pending is 2010-09-24 13:01:01 +00:00
libexec Remove the duplicate logging of failed read requests, whose error message 2010-09-24 14:44:04 +00:00
release Chase the ports list to make snapshots work again with NOPORTS set. 2010-09-17 07:40:02 +00:00
rescue MFtbemd: 2010-08-23 22:24:11 +00:00
sbin Reported problem: 2010-09-24 19:08:56 +00:00
secure Revert changes of 'assure' to 'ensure' made in r211936. 2010-09-11 10:49:56 +00:00
share Various changes from various sources: 2010-09-23 11:19:03 +00:00
sys Improve r56796; the reply handler actually may remove the request from 2010-09-24 16:40:46 +00:00
tools Make the labels match the device name that's mounted, not just the 2010-09-22 04:48:39 +00:00
usr.bin Make WARNS=6 clean. 2010-09-24 10:40:17 +00:00
usr.sbin Eliminate the --disable-ipv6 string which while technically correct in 2010-09-22 18:46:17 +00:00
COPYRIGHT Happy New Year 2010! :-) 2009-12-31 10:00:37 +00:00
LOCKS Update LOCKS syntax. 2008-06-05 19:47:58 +00:00
MAINTAINERS Add a comment to MAINTAINERS indicating that sbin/routed is in fact 2010-04-10 12:29:09 +00:00
Makefile Connect FDT infrastructure to the build system. 2010-06-13 13:02:43 +00:00
Makefile.inc1 Check TARGET_ARCH as well as TARGET to determine if we are doing a cross 2010-09-08 19:53:16 +00:00
Makefile.mips Guard against TARGET_ABI being undefined (TARGET_ABI will go away soon) 2010-08-26 14:54:12 +00:00
ObsoleteFiles.inc Mark the sbuf_overflowed(9) manpage as obsolete since it has been 2010-09-10 20:42:41 +00:00
README Simply running ``make world'' will bomb unless you dig up the 2006-06-07 03:33:48 +00:00
UPDATING UPDATING entry for r212647 2010-09-15 10:04:41 +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, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  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 is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/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 NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


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

contrib		Packages contributed by 3rd parties.

crypto		Cryptography 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.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

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/doc/en_US.ISO8859-1/books/handbook/synching.html