mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
6bfb820292
Using recursion to traverse the recursive data structure for extended partitions was never good, but when slice support was implemented in 1995, the recursion worked for the default maximum number of slices (32), and standard fdisk utilities didn't support creating more than the default number. Even then, corrupt extended partitions could cause endless recursion, because we attempt to check all slices, even ones which we don't turn into devices. The recursion has succumbed to creeping features. The stack requirements for each level had grown to 204 bytes on i386's. Most of the growth was caused by adding a 64-byte copy of the DOSpartition table to each frame. The kernel stack size has shrunk to about 5K on i386's. Most of the shrinkage was caused by the growth of `struct sigacts' by 2388 bytes to support 128 signals. Linux fdisk (a 1997 version at least) can now create 60 slices (4 standard ones, 56 for logical drives within extended partitions, and it seems to be leaving room to map the 4 BSD partitions on my test drive), and Linux (2.2.29 and 2.3.35 at least) now reports all these slices at boot time. The fix limits the recursion to 16 levels (4 + 16 slices) and recovers 32 bytes per level caused by gcc pessimizing for space. Switching to a static buffer doesn't cause any problems due to recursion, since the buffer is not passed down. Using a static buffer is wrong in general because it requires the giant lock to protect it. However, this problem is small compared with using a static buffer for dsname(). We sometimes neglect to copy the result of dsname() before sleeping. Also fixed slice names when we find more than MAX_SLICES (32) slices. The number of the last slice found was not passed passed recursively. The limit on the recursion now prevents finding more than 32 slices with a standard extended partition data structure anyway. |
||
---|---|---|
bin | ||
contrib | ||
crypto | ||
etc | ||
games | ||
gnu | ||
include | ||
kerberos5 | ||
kerberosIV | ||
lib | ||
libexec | ||
release | ||
sbin | ||
secure | ||
share | ||
sys | ||
tools | ||
usr.bin | ||
usr.sbin | ||
COPYRIGHT | ||
Makefile | ||
Makefile.inc1 | ||
Makefile.upgrade | ||
README | ||
UPDATING |
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