freebsd-dev/sys/sys
Alan Cox 4221e284a3 The VFS/BIO subsystem contained a number of hacks in order to optimize
piecemeal, middle-of-file writes for NFS.  These hacks have caused no
end of trouble, especially when combined with mmap().  I've removed
them.  Instead, NFS will issue a read-before-write to fully
instantiate the struct buf containing the write.  NFS does, however,
optimize piecemeal appends to files.  For most common file operations,
you will not notice the difference.  The sole remaining fragment in
the VFS/BIO system is b_dirtyoff/end, which NFS uses to avoid cache
coherency issues with read-merge-write style operations.  NFS also
optimizes the write-covers-entire-buffer case by avoiding the
read-before-write.  There is quite a bit of room for further
optimization in these areas.

The VM system marks pages fully-valid (AKA vm_page_t->valid =
VM_PAGE_BITS_ALL) in several places, most noteably in vm_fault.  This
is not correct operation.  The vm_pager_get_pages() code is now
responsible for marking VM pages all-valid.  A number of VM helper
routines have been added to aid in zeroing-out the invalid portions of
a VM page prior to the page being marked all-valid.  This operation is
necessary to properly support mmap().  The zeroing occurs most often
when dealing with file-EOF situations.  Several bugs have been fixed
in the NFS subsystem, including bits handling file and directory EOF
situations and buf->b_flags consistancy issues relating to clearing
B_ERROR & B_INVAL, and handling B_DONE.

getblk() and allocbuf() have been rewritten.  B_CACHE operation is now
formally defined in comments and more straightforward in
implementation.  B_CACHE for VMIO buffers is based on the validity of
the backing store.  B_CACHE for non-VMIO buffers is based simply on
whether the buffer is B_INVAL or not (B_CACHE set if B_INVAL clear,
and vise-versa).  biodone() is now responsible for setting B_CACHE
when a successful read completes.  B_CACHE is also set when a bdwrite()
is initiated and when a bwrite() is initiated.  VFS VOP_BWRITE
routines (there are only two - nfs_bwrite() and bwrite()) are now
expected to set B_CACHE.  This means that bowrite() and bawrite() also
set B_CACHE indirectly.

There are a number of places in the code which were previously using
buf->b_bufsize (which is DEV_BSIZE aligned) when they should have
been using buf->b_bcount.  These have been fixed.  getblk() now clears
B_DONE on return because the rest of the system is so bad about
dealing with B_DONE.

Major fixes to NFS/TCP have been made.  A server-side bug could cause
requests to be lost by the server due to nfs_realign() overwriting
other rpc's in the same TCP mbuf chain.  The server's kernel must be
recompiled to get the benefit of the fixes.

Submitted by:	Matthew Dillon <dillon@apollo.backplane.com>
1999-05-02 23:57:16 +00:00
..
_posix.h Well folks, this is it - The second stage of the removal for build support 1999-04-17 08:36:07 +00:00
_sigset.h Define ss_size in struct sigaltstack as size_t instead of int. 1998-08-05 09:04:36 +00:00
acct.h Forward declare more structs that are used in prototypes here - don't 1998-02-01 20:08:39 +00:00
aio.h Bring a bit closer to the normal form. (In particular, add 1999-01-17 22:33:08 +00:00
bio.h The VFS/BIO subsystem contained a number of hacks in order to optimize 1999-05-02 23:57:16 +00:00
bitstring.h
blist.h Add new blist module - radix tree based bitmap allocator with 1999-01-21 08:11:06 +00:00
buf.h The VFS/BIO subsystem contained a number of hacks in order to optimize 1999-05-02 23:57:16 +00:00
bus_dma.h Don't pretend to support ix86's with 16-bit ints by using longs just 1998-09-29 09:06:00 +00:00
bus_private.h Bring the 'new-bus' to the i386. This extensively changes the way the 1999-04-16 21:22:55 +00:00
bus.h Bring the 'new-bus' to the i386. This extensively changes the way the 1999-04-16 21:22:55 +00:00
callout.h Expose a slightly-lower-level interface to timeouts which allows callers 1999-03-06 04:46:20 +00:00
ccdvar.h system.h: 1998-09-15 10:07:26 +00:00
cdefs.h Per request from ache, change the numbering scheme of __FreeBSD_cc_version. 1998-10-29 22:11:08 +00:00
cdio.h Add new atapi-cd driver that supports atapi CD-R/RW drives. 1998-09-08 20:57:47 +00:00
chio.h Fixed pedantic syntax error (trailing comma in enum). 1999-03-06 16:57:12 +00:00
clist.h Some staticized variables were still declared to be extern. 1997-09-07 05:27:26 +00:00
conf.h Reviewed by: Julian Elischer <julian@whistle.com> 1999-02-25 05:22:30 +00:00
cons.h Fixed pedantic syntax errors caused by a trailing semicolon in a macro 1999-01-09 14:07:37 +00:00
copyright.h Change copyright in kernel output at booting time 1999-03-17 19:55:52 +00:00
dataacq.h Put back this wholly innocent victim of Mike's drive-by shooting on alog; 1999-01-20 13:09:28 +00:00
devfsext.h Rename one of the two devfs_link's to devfs_makelink. 1998-12-10 19:57:01 +00:00
device.h Remove '???' because it generates an annoying message about 1998-07-04 19:00:47 +00:00
devicestat.h Add a prioritization field to the devstat_add_entry() call so that 1999-02-10 00:04:13 +00:00
dir.h
dirent.h Make <sys/dirent.h> and <dirent.h> self-sufficient, using new __intN_t types. 1998-12-19 00:30:01 +00:00
disk.h buf.h: 1997-09-21 22:09:24 +00:00
disklabel.h Fixed some style bugs (mainly vinum ones and ones fixed in Lite2 but 1999-04-03 07:21:14 +00:00
diskmbr.h Fixed some style bugs (mainly vinum ones and ones fixed in Lite2 but 1999-04-03 07:21:14 +00:00
diskpc98.h Fixed some style bugs (mainly vinum ones and ones fixed in Lite2 but 1999-04-03 07:21:14 +00:00
diskslice.h remove bdevsw arg from dsopen(); 1998-08-23 20:16:35 +00:00
dkbad.h Forward declare more structs that are used in prototypes here - don't 1998-02-01 20:08:39 +00:00
dkstat.h New Kernel device statistics code. 1998-09-15 08:16:17 +00:00
dmap.h
domain.h Make DOMAIN_SET() use SYSINIT rather than linker sets. 1999-04-26 08:53:03 +00:00
elf32.h Add generic defines ELF_ARCH, ELF_CLASS, and ELF_DATA. These give 1998-09-14 20:30:13 +00:00
elf64.h Add generic defines ELF_ARCH, ELF_CLASS, and ELF_DATA. These give 1998-09-14 20:30:13 +00:00
elf_common.h Add generic defines ELF_ARCH, ELF_CLASS, and ELF_DATA. These give 1998-09-14 20:30:13 +00:00
elf_generic.h Add generic defines ELF_ARCH, ELF_CLASS, and ELF_DATA. These give 1998-09-14 20:30:13 +00:00
errno.h typo in comment 1999-04-24 18:26:54 +00:00
exec.h Well folks, this is it - The second stage of the removal for build support 1999-04-17 08:36:07 +00:00
fbio.h
fcntl.h Implement a new open(2) flag: O_NOFOLLOW. This will instruct open 1998-04-06 17:38:43 +00:00
fdcio.h
file.h Add standard padding argument to pread and pwrite syscall. That should make them 1999-04-04 21:41:28 +00:00
filedesc.h I got another batch of suggestions for cosmetic changes from bde. 1998-11-11 10:56:07 +00:00
filio.h
ftape.h
gmon.h Changed to the C9x draft spelling of the (unsigned) integral type 1998-07-14 05:09:48 +00:00
imgact_aout.h Add provisions for variant core dump file formats, depending on the 1998-09-14 05:36:51 +00:00
imgact_elf.h Hmm- I must be blind. There *was* already an appropriate typedef still 1999-02-06 17:58:06 +00:00
imgact.h Restore support for executing BSD/OS binaries on the i386 by passing 1999-04-03 22:20:03 +00:00
inflate.h Fixed gratuitous ANSIisms. 1997-09-16 11:44:05 +00:00
interrupt.h Stage 1 of a cleanup of the i386 interrupt registration mechanism. 1999-04-21 07:26:30 +00:00
inttypes.h Little reorganization: 1998-12-19 00:02:34 +00:00
ioccom.h This commit fixes various 64bit portability problems required for 1998-06-07 17:13:14 +00:00
ioctl_bt848.h Corrected ioctl numbers conflict. 1999-02-15 11:04:36 +00:00
ioctl_compat.h
ioctl_meteor.h
ioctl.h
ipc.h Change suser_xxx() to suser() where it applies. 1999-04-27 12:21:16 +00:00
jail.h This Implements the mumbled about "Jail" feature. 1999-04-28 11:38:52 +00:00
joystick.h
kernel.h Well folks, this is it - The second stage of the removal for build support 1999-04-17 08:36:07 +00:00
ktrace.h
libkern.h
linedisc.h Reviewed by: Julian Elischer <julian@whistle.com> 1999-02-25 05:22:30 +00:00
link_aout.h Add GDB support for ELF shared libs. 1998-05-23 15:17:53 +00:00
link_elf.h Add GDB support for ELF shared libs. 1998-05-23 15:17:53 +00:00
linker_set.h Move the linker set definitions into a new header file 1999-01-14 05:48:46 +00:00
linker.h Add MODINFO_ARGS, parameters passed to a module at load time. 1999-03-08 11:05:52 +00:00
lock.h Add 'options DEBUG_LOCKS', which stores extra information in struct 1999-01-20 14:49:12 +00:00
lockf.h Forward declare a struct and #include <sys/queue.h> so that this file 1998-02-03 22:17:45 +00:00
lockmgr.h Add 'options DEBUG_LOCKS', which stores extra information in struct 1999-01-20 14:49:12 +00:00
malloc.h Fix warnings in preparation for adding -Wall -Wcast-qual to the 1999-01-27 21:50:00 +00:00
mbuf.h Get rid of MT_RTABLE; multicast routing no longer uses it. 1999-01-18 02:09:52 +00:00
md5.h Export MD5Transform in md5.c and remove a private version in random_machdep.c 1998-03-29 11:55:06 +00:00
mdioctl.h
memrange.h Add a hook that can be called to initialise a slave processor's memory 1999-04-30 22:09:45 +00:00
mman.h Mostly remove the VM_STACK OPTION. 1999-01-26 02:49:52 +00:00
module.h More -Wall / -Wcast-qual cleanup. Also, EXEC_SET can't use 1999-01-29 08:36:45 +00:00
mount.h Well folks, this is it - The second stage of the removal for build support 1999-04-17 08:36:07 +00:00
mouse.h 1) Added define for USB as an interface 1999-02-21 16:08:43 +00:00
msg.h
msgbuf.h Some cleanups related to timecounters and weird ifdefs in <sys/time.h>. 1998-05-28 09:30:28 +00:00
mtio.h minor tweaks 1999-02-05 07:57:26 +00:00
namei.h This commit fixes various 64bit portability problems required for 1998-06-07 17:13:14 +00:00
nlist_aout.h Move nlist related defines from link.h into nlist.h. Clean up 1997-12-06 17:59:52 +00:00
param.h bump __FreeBSD_version to 400005: 1999-04-27 11:20:54 +00:00
pciio.h Revive PCIConf. 1998-09-15 08:21:13 +00:00
pioctl.h Add a copyright and license notice, on Jordan's request. 1997-12-20 18:36:02 +00:00
pipe.h I got another batch of suggestions for cosmetic changes from bde. 1998-11-11 10:56:07 +00:00
poll.h Cleaned up some comments and ifdefs. 1998-02-03 22:32:23 +00:00
posix4.h Well folks, this is it - The second stage of the removal for build support 1999-04-17 08:36:07 +00:00
proc.h This Implements the mumbled about "Jail" feature. 1999-04-28 11:38:52 +00:00
procfs.h Viola! The kernel now generates standard ELF core dumps for ELF 1998-09-14 22:46:08 +00:00
protosw.h Add a flag, passed to pru_send routines, PRUS_MORETOCOME. This 1999-01-20 17:32:01 +00:00
ptrace.h This commit fixes various 64bit portability problems required for 1998-06-07 17:13:14 +00:00
queue.h Remove feature creep: STAILQ_REMOVE_HEAD_UNTIL added it for convenience 1999-04-20 22:37:18 +00:00
random.h Converted add_interrupt_randomness() to take a `void *' arg. Rewrote 1998-06-21 11:33:32 +00:00
reboot.h Define shift, mask and extraction macros for obtaining the slice number 1998-03-08 15:04:20 +00:00
resource.h Add a new "file" to procfs: "rlimit" which shows the resource limits for 1999-04-30 13:04:21 +00:00
resourcevar.h Enforce monotonicity of apparent process user, system and interrupt times. 1999-03-13 19:46:13 +00:00
rlist.h
rman.h Bring the 'new-bus' to the i386. This extensively changes the way the 1999-04-16 21:22:55 +00:00
rtprio.h Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and 1998-03-28 11:51:01 +00:00
scsiio.h Serves me right for committing code late at night... 1998-02-01 18:09:50 +00:00
select.h
selinfo.h
sem.h Remove hardwired alignment, align to sizeof(long) which should be more 1998-12-14 21:34:55 +00:00
semaphore.h Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and 1998-03-28 11:51:01 +00:00
shm.h Forward declare more structs that are used in prototypes here - don't 1998-02-01 20:08:39 +00:00
signal.h Define ss_size in struct sigaltstack as size_t instead of int. 1998-08-05 09:04:36 +00:00
signalvar.h Enable Linux threads support by default. 1999-01-26 02:38:12 +00:00
sliceio.h Bad144 support for the slice system (!) 1998-04-22 19:27:54 +00:00
smp.h Enable vmspace sharing on SMP. Major changes are, 1999-04-28 01:04:33 +00:00
snoop.h Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
socket.h Implemented zero-copy TCP/IP extensions via sendfile(2) - send a 1998-11-05 14:28:26 +00:00
socketvar.h Add standard padding argument to pread and pwrite syscall. That should make them 1999-04-04 21:41:28 +00:00
sockio.h Introduce the SIOC[SG]IFGENERIC hooks that can be used to pass an 1997-10-07 07:39:40 +00:00
soundcard.h o sys/i386/include/soundcard.h 1999-04-08 08:09:34 +00:00
stat.h Fix the futimes/undelete/utrace conflict with other BSD's. Note that 1998-05-11 03:55:28 +00:00
syscall-hide.h This Implements the mumbled about "Jail" feature. 1999-04-28 11:38:52 +00:00
syscall.h This Implements the mumbled about "Jail" feature. 1999-04-28 11:38:52 +00:00
syscall.mk This Implements the mumbled about "Jail" feature. 1999-04-28 11:38:52 +00:00
sysctl.h This Implements the mumbled about "Jail" feature. 1999-04-28 11:38:52 +00:00
sysent.h Implement support for adding syscalls in KLD modules. 1999-01-09 14:15:41 +00:00
syslimits.h
syslog.h Added macros __printflike() and __scanflike() to <sys/cdefs.h>. 1998-07-13 06:45:23 +00:00
sysproto.h This Implements the mumbled about "Jail" feature. 1999-04-28 11:38:52 +00:00
systm.h Stage 1 of a cleanup of the i386 interrupt registration mechanism. 1999-04-21 07:26:30 +00:00
tablet.h
termios.h Change a couple of long types to int to match NetBSD so that termios 1998-05-05 21:49:37 +00:00
time.h Make the machdep.i8254_freq and machdep.tsc_freq sysctls modify the 1999-04-25 09:00:00 +00:00
timeb.h
timepps.h Specfic prototypes not needed. 1999-03-30 11:44:59 +00:00
timers.h
times.h
timetc.h Make the machdep.i8254_freq and machdep.tsc_freq sysctls modify the 1999-04-25 09:00:00 +00:00
timex.h Update to latest version from Dave Mills. Mostly textual. 1999-04-04 10:28:42 +00:00
tprintf.h Added macros __printflike() and __scanflike() to <sys/cdefs.h>. 1998-07-13 06:45:23 +00:00
tty.h I got another batch of suggestions for cosmetic changes from bde. 1998-11-11 10:56:07 +00:00
ttychars.h
ttycom.h follow up to: 1998-12-29 13:06:54 +00:00
ttydefaults.h Map CSTATUS to ^T by default or it never noticed by novice users 1997-08-15 22:43:22 +00:00
ttydev.h
types.h Fix warnings in preparation for adding -Wall -Wcast-qual to the 1999-01-28 00:57:57 +00:00
ucred.h This Implements the mumbled about "Jail" feature. 1999-04-28 11:38:52 +00:00
uio.h Make our v_usecount vnode reference count work identically to the 1998-01-06 05:26:17 +00:00
un.h Fixed missing and unused forward declarations of structs. 1998-05-17 18:17:59 +00:00
unistd.h Changes to the LINUX_THREADS support to only allocate extra memory for 1999-01-07 21:23:50 +00:00
unpcb.h This Implements the mumbled about "Jail" feature. 1999-04-28 11:38:52 +00:00
user.h Enable Linux threads support by default. 1999-01-26 02:38:12 +00:00
utsname.h
vadvise.h
vcmd.h
vlimit.h
vmmeter.h Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> 1999-02-25 06:05:28 +00:00
vnioctl.h
vnode.h Well folks, this is it - The second stage of the removal for build support 1999-04-17 08:36:07 +00:00
vsio.h
wait.h Fix thread/process tracking and differentiation for Linux threads emulation. 1999-03-02 00:28:09 +00:00
wormio.h Add an ioctl to retrieve the next writable address. 1998-03-31 01:56:29 +00:00
xrpuio.h Header file for XRPU devices. 1998-10-24 19:47:29 +00:00