FreeBSD src
Go to file
Poul-Henning Kamp 4392001125 Move UFS from DEVFS backing to GEOM backing.
This eliminates a bunch of vnode overhead (approx 1-2 % speed
improvement) and gives us more control over the access to the storage
device.

Access counts on the underlying device are not correctly tracked and
therefore it is possible to read-only mount the same disk device multiple
times:
	syv# mount -p
	/dev/md0        /var    ufs rw  2 2
	/dev/ad0        /mnt    ufs ro  1 1
	/dev/ad0        /mnt2   ufs ro  1 1
	/dev/ad0        /mnt3   ufs ro  1 1

Since UFS/FFS is not a synchrousely consistent filesystem (ie: it caches
things in RAM) this is not possible with read-write mounts, and the system
will correctly reject this.

Details:

	Add a geom consumer and a bufobj pointer to ufsmount.

	Eliminate the vnode argument from softdep_disk_prewrite().
	Pick the vnode out of bp->b_vp for now.  Eventually we
	should find it through bp->b_bufobj->b_private.

	In the mountcode, use g_vfs_open() once we have used
	VOP_ACCESS() to check permissions.

	When upgrading and downgrading between r/o and r/w do the
	right thing with GEOM access counts.  Remove all the
	workarounds for not being able to do this with VOP_OPEN().

	If we are the root mount, drop the exclusive access count
	until we upgrade to r/w.  This allows fsck of the root
	filesystem and the MNT_RELOAD to work correctly.

	Set bo_private to the GEOM consumer on the device bufobj.

	Change the ffs_ops->strategy function to call g_vfs_strategy()

	In ufs_strategy() directly call the strategy on the disk
	bufobj.  Same in rawread.

	In ffs_fsync() we will no longer see VCHR device nodes, so
	remove code which synced the filesystem mounted on it, in
	case we came there.  I'm not sure this code made sense in
	the first place since we would have taken the specfs route
	on such a vnode.

	Redo the highly bogus readblock() function in the snapshot
	code to something slightly less bogus: Constructing an uio
	and using physio was really quite a detour.  Instead just
	fill in a bio and ship it down.
2004-10-29 10:15:56 +00:00
bin Add -I, an option that asks for confirmation once if recursively 2004-10-28 08:25:30 +00:00
contrib Fix some more files that got butchered to appear to be back on the 2004-10-21 20:10:14 +00:00
crypto Better Xlist command line. 2004-10-28 16:13:28 +00:00
etc - Add 'check' command for checking rules syntax. 2004-10-25 08:12:28 +00:00
games Never be afraid to try something new. Remember, amateurs built the ark. 2004-10-27 20:28:56 +00:00
gnu For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
include For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
kerberos5 Join the 21st century: Cryptography is no longer an optional component 2004-08-06 07:27:08 +00:00
lib Fix brk(3). The stack was unbalanced when we jumped to cerror. Oops! 2004-10-27 17:11:43 +00:00
libexec Log the actual number of bytes sent on the wire to /var/log/ftpd 2004-10-24 20:12:08 +00:00
release For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
rescue For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
sbin Remove useless inclusion of <sys/disklabel.h> 2004-10-25 03:44:10 +00:00
secure Update for OpenSSH 3.9p1. 2004-10-28 16:04:23 +00:00
share Document that libkvm requires device mem to work. 2004-10-26 21:11:06 +00:00
sys Move UFS from DEVFS backing to GEOM backing. 2004-10-29 10:15:56 +00:00
tools Typo: s/Exampes/Examples 2004-10-25 20:56:24 +00:00
usr.bin Only check if ENABLE_SUID_NEWGRP is defined, for consistency with 2004-10-24 16:02:38 +00:00
usr.sbin Add usage of -m option. 2004-10-29 01:24:32 +00:00
COPYRIGHT Update the COPYRIGHT file to include FreeBSD's compilation copyright 2003-12-31 22:35:22 +00:00
installworld_newk Commit the first set of files for changing time_t on freebsd/sparc64 2004-03-03 19:36:20 +00:00
installworld_oldk Commit the first set of files for changing time_t on freebsd/sparc64 2004-03-03 19:36:20 +00:00
MAINTAINERS Remove vinum from the list. I no longer have the time and energy to 2004-09-08 02:08:33 +00:00
Makefile Fixed MAKEOBJDIRPREFIX variable type check in case the env(1) 2004-10-18 17:47:31 +00:00
Makefile.inc1 For variables that are only checked with defined(), don't provide 2004-10-24 15:33:08 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Shave 40 unused bytes from struct tcpcb. 2004-10-22 19:55:04 +00:00
UPDATING.64BTT Add a tip for people who are using database-related ports on a sparc64 2004-03-17 01:59:47 +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
``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.

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