Joerg Sonnenberger [Wed, 17 May 2006 19:22:32 +0000 (19:22 +0000)]
Use localhost instead of 127.0.0.1, since IPv6 should work as well.
Matthew Dillon [Wed, 17 May 2006 18:30:22 +0000 (18:30 +0000)]
Pass the process (p) instead of the vnode (p->p_tracep) to the kernel tracing
API functions. This allows the vnode ref to be consolidated into one place.
Matthew Dillon [Wed, 17 May 2006 17:47:58 +0000 (17:47 +0000)]
Remove the (unused) copy-on-write support for a vnode's VM object. This
support originally existed to support the badly implemented and severely
hacked ENABLE_VFS_IOOPT I/O optimization which was removed long ago.
This also removes a bunch of cross-module pollution in UFS.
Sascha Wildner [Wed, 17 May 2006 14:41:48 +0000 (14:41 +0000)]
Document MAKEOBJDIRPREFIX.
Submitted-by: Trevor Kendall <trevorjk@gmail.com>
Sascha Wildner [Wed, 17 May 2006 14:25:47 +0000 (14:25 +0000)]
Per default, restrict recursive queries to 127.0.0.1.
Submitted-by: Gary <gary@velocity-servers.net>
OK-by: corecode, joerg
Sascha Wildner [Wed, 17 May 2006 14:06:37 +0000 (14:06 +0000)]
Remove isinff and isnanf prototypes. Our isinf and isnan functions are
type-variadic. Also remove the isinff(3) manpage I added yesterday
(I had just looked at the prototypes).
Pointed-out-by: joerg
Sascha Wildner [Wed, 17 May 2006 01:44:24 +0000 (01:44 +0000)]
Add isinff(3) manpage.
Matthew Dillon [Tue, 16 May 2006 18:20:32 +0000 (18:20 +0000)]
Attempt to interlock races between the buffer cache and VM backing store
that might cause new buffers to be instantiated beyond the new file EOF
during a truncate operation.
Truncate the VM object size before attempting to flush the pages and buffers
in order to prevent new VM pages from being created beyond EOF during the
flush. Add an extra pass on the buffer cache after truncation to make sure
the buffers have been cleaned out. Generate a warning to the console if
buffers are found during the extra pass.
If an old buffer were left intact during a truncate, then a re-extension of
the file or directory could have resulted in granting access to the old
buffer which might have had an incorrect cached block number translation
(vs the new block allocated by the extension of the file or directory),
causing new data to be written to the wrong disk block and resulting in
file or directory corruption. The regular file truncation/extension
code had other checks in it prior to this patch so if this problem could
occur at all before it would have been in the directory code.
There is a small chance that this race was related to reported
ufs: dirbad panics. The M.O. matches but unfortunately there is still
no smoking gun.
Matthew Dillon [Tue, 16 May 2006 18:09:20 +0000 (18:09 +0000)]
Remove vnode lock assertions that are no longer used. Remove the
IS_LOCKING_VFS() macro. All VFS's are required to be locking VFSs now.
Simon Schubert [Tue, 16 May 2006 16:26:08 +0000 (16:26 +0000)]
Enable TCP wrappers in sshd.
Reported-by: Yiorgos Adamopoulos <adamo@central.tee.gr>
Sepherosa Ziehau [Tue, 16 May 2006 14:24:06 +0000 (14:24 +0000)]
Add a commant, which warns atomic_cmpset_int() is a !I386_CPU function
Suggested-by: joerg
Sepherosa Ziehau [Tue, 16 May 2006 12:34:15 +0000 (12:34 +0000)]
Put atomic_cmpset_int() into central place. This function was defined and
used in many places.
Reviewed-by: dillon
OK: davidxu
Sascha Wildner [Sun, 14 May 2006 18:07:29 +0000 (18:07 +0000)]
Remove all traces of umapfs and associated stuff.
Discussed-with: dillon
[forced commit to correct message]
Sascha Wildner [Sun, 14 May 2006 18:00:05 +0000 (18:00 +0000)]
/tmp/umap.msg
Matthew Dillon [Sun, 14 May 2006 17:28:36 +0000 (17:28 +0000)]
cbb_probe() assumes that the subclass field is unique. This patch further
qualifies the check to verify that the device belongs to the bus class as
well before claiming the device.
Submitted-by: Chuck Tuffli <ctuffli@gmail.com>
Sepherosa Ziehau [Sun, 14 May 2006 01:28:54 +0000 (01:28 +0000)]
Nuke duplicated header files, which restores `buildworld'
Matthew Dillon [Sat, 13 May 2006 05:10:42 +0000 (05:10 +0000)]
Remove mount_umap.
Matthew Dillon [Fri, 12 May 2006 22:26:47 +0000 (22:26 +0000)]
Most of the fields in vnodeop_desc have been unused for a while now.
Remove them.
Matthew Dillon [Fri, 12 May 2006 22:07:23 +0000 (22:07 +0000)]
UMAPFS has been disabled (and non-working) for a long time. Scrap it
entirely.
Sascha Wildner [Fri, 12 May 2006 14:05:39 +0000 (14:05 +0000)]
Fix spelling and remove hard sentence break.
Sascha Wildner [Fri, 12 May 2006 07:43:56 +0000 (07:43 +0000)]
Remove Alpha specific header file.
YONETANI Tomokazu [Fri, 12 May 2006 01:56:11 +0000 (01:56 +0000)]
Merge revisions 1.38,1.41 of eval.c from FreeBSD:
PR 28852
sh -e behaviour was incorrect when && and || statements where used in
"if" clauses.
revision 1.41 is a fix to a bug in 1.38 that subshells could lose
a non-zero status.
dfly problem reported-by: Johannes Hofmann <Johannes.Hofmann at gmx.de>
OK'ed: dillon@, joerg@
Matthew Dillon [Thu, 11 May 2006 19:50:29 +0000 (19:50 +0000)]
Fix three bugs in the last commit and document special cases. Tighten
up the count calculation. The code now passes the /usr/src/test/lockf
system test.
* F_UNLCK wasn't being handled properly in certain cases, resulting in a
panic.
* The 'next' pointer was not bring properly adjusted when removing an
element (brange) other then the current element in the scan, resulting
in a posix lock error.
* The first and last matches were not always being properly merged with
the created range, resulting in a positive count panic.
Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
Matthew Dillon [Thu, 11 May 2006 16:44:43 +0000 (16:44 +0000)]
Recognize the cpu ident for additional VIA processors.
Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD
Sascha Wildner [Thu, 11 May 2006 08:23:20 +0000 (08:23 +0000)]
* Remove the following obsolete options from the system:
AAC_COMPAT_LINUX
ACPI_MAX_THREADS
AVM_A1_PCI
CD9660_ROOT
CPU_UPGRADE_HW_CACHE
DEBUG_LINUX
DEBUG_TOKENS
DPT_ALLOW_MEMIO
IDE_DELAY
INVARIANT_SUPPORT
KERNFS
MFS_ROOT
MFS_ROOT_SIZE
NTIMECOUNTER
OLTR_NO_BULLSEYE_MAC
OLTR_NO_HAWKEYE_MAC
OLTR_NO_TMS_MAC
UGEN_DEBUG
UHCI_DEBUG
UHID_DEBUG
UHUB_DEBUG
UKBD_DEBUG
ULPT_DEBUG
UMASS_DEBUG
UMS_DEBUG
VM_KMEM_SIZE
VM_KMEM_SIZE_MAX
VM_KMEM_SIZE_SCALE
* Add numerous options to LINT
* Fix typo in options: TWA_FLASH_FIREWARE -> TWA_FLASH_FIRMWARE
* Fix typo in dgb.c: opt_depricated.h -> opt_deprecated.h
* Fix some minor manpage issues
Jeffrey Hsu [Thu, 11 May 2006 00:52:03 +0000 (00:52 +0000)]
Correct test for fragmented packet.
Sascha Wildner [Wed, 10 May 2006 15:18:29 +0000 (15:18 +0000)]
Sync with FreeBSD.
Sascha Wildner [Tue, 9 May 2006 07:18:39 +0000 (07:18 +0000)]
Comment out references to cnw(4). It's unlikely that we'll import it.
Matthew Dillon [Mon, 8 May 2006 18:45:53 +0000 (18:45 +0000)]
Split kern/vfs_journal.c. Leave the low level journal support code in
kern/vfs_journal.c and move all the mount-based journaling code and
journaling VNOPS to kern/vfs_jops.c. This is in preparation for utilizing
the core journaling protocol for userland VFS support.
Matthew Dillon [Mon, 8 May 2006 00:38:59 +0000 (00:38 +0000)]
Rewrite the POSIX locking code. It was becomming impossible to track
down bugs in the previous version due to code complexity (in particular
a large number of undocumented short cuts and gotos), and general lack of
documentation.
The new code uses a more straightforward method for managing the lock list
and is far better documented. Basically the conflict space is ranged,
if no conflict occurs the new lock is inserted, overlaps are clipped or
removed, and finally a quick optimization to check for and collapse
compatible adjacent locks.
Matthew Dillon [Mon, 8 May 2006 00:30:41 +0000 (00:30 +0000)]
Add a little program that allows one to test posix range locks.
Matthew Dillon [Sun, 7 May 2006 19:17:18 +0000 (19:17 +0000)]
Remove the internal F_FLOCK flag. Either F_POSIX or F_FLOCK must be set,
so just use F_POSIX to indicate whether its a posix style lock or an flock
style lock.
Matthew Dillon [Sun, 7 May 2006 00:51:11 +0000 (00:51 +0000)]
lockmgr_kernproc() wasn't checking whether the lockholder as already
LK_KERNTHREAD, resulting in a panic in certain situations.
Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
Matthew Dillon [Sun, 7 May 2006 00:24:58 +0000 (00:24 +0000)]
Recode the streamid selector. The streamid was faked before. Do it for
real now, guarenteeing that parallel transactions will have unique stream
identifiers.
In addition, while not required, streamid calculations are such that non
parallel transactions will have a tendancy to use the same id, so someone
observing the streamid's in a journaling stream can easily pick out when
parallel transactions occur.
Matthew Dillon [Sun, 7 May 2006 00:24:02 +0000 (00:24 +0000)]
We have to use pmap_extract() here. If we lose a race against page
table cleaning pmap_kextract() could choke on a missing page directory.
Matthew Dillon [Sun, 7 May 2006 00:23:08 +0000 (00:23 +0000)]
We have to use pmap_extract() here. pmap_kextract() will choke on a missing
page directory and the user memory hasn't been touched yet.
Matthew Dillon [Sun, 7 May 2006 00:22:37 +0000 (00:22 +0000)]
We have to use pmap_extract here, pmap_kextract will choke if the page
directory is missing and the user memory has not been touched.
Matthew Dillon [Sat, 6 May 2006 23:53:34 +0000 (23:53 +0000)]
Fix a null pointer indirection, the VM fault rate limiting code only
applies to processes.
Matthew Dillon [Sat, 6 May 2006 18:48:53 +0000 (18:48 +0000)]
Remove the thread argument from all mount->vfs_* function vectors,
replacing it with a ucred pointer when applicable. This cleans up a
considerable amount of VFS function code that previously delved into
the process structure to get the cred, though some code remains.
Get rid of the compatibility thread argument for hpfs and nwfs. Our
lockmgr calls are now mostly compatible with NetBSD (which doesn't use a
thread argument either).
Get rid of some complex junk in fdesc_statfs() that nobody uses.
Remove the thread argument from dounmount() as well as various other
filesystem specific procedures (quota calls primarily) which no longer
need it due to the lockmgr, VOP, and VFS cleanups. These cleanups also
have the effect of making the VFS code slightly less dependant on the
calling thread's context.
Sascha Wildner [Sat, 6 May 2006 17:39:29 +0000 (17:39 +0000)]
Fix .Os and a .Xr. Expand HISTORY a bit.
Matthew Dillon [Sat, 6 May 2006 16:33:26 +0000 (16:33 +0000)]
Remove the thread argument from ext2_quotaoff(), ext2_flushfiles(),
ext2_mountfs(), and ext2_reload().
Matthew Dillon [Sat, 6 May 2006 16:20:19 +0000 (16:20 +0000)]
Remove the thread argument from ffs_flushfiles(), ffs_mountfs(),
softdep_flushfiles(), ffs_reload(), ufs_quotaon(), and ufs_quotaoff().
Matthew Dillon [Sat, 6 May 2006 16:01:21 +0000 (16:01 +0000)]
Remove the thread_t argument from nfs_rslock() and nfs_rsunlock().
Matthew Dillon [Sat, 6 May 2006 06:38:39 +0000 (06:38 +0000)]
The fdrop() procedure no longer needs a thread argument, remove it.
Matthew Dillon [Sat, 6 May 2006 03:16:44 +0000 (03:16 +0000)]
Add some ifioctl() td -> ucred changes that were missed.
Matthew Dillon [Sat, 6 May 2006 02:43:15 +0000 (02:43 +0000)]
The thread/proc pointer argument in the VFS subsystem originally existed
for... well, I'm not sure *WHY* it originally existed when most of the
time the pointer couldn't be anything other then curthread or curproc or
the code wouldn't work. This is particularly true of lockmgr locks.
Remove the pointer argument from all VOP_*() functions, all fileops functions,
and most ioctl functions.
Matthew Dillon [Fri, 5 May 2006 21:27:58 +0000 (21:27 +0000)]
Remove the thread_t argument from vfs_busy() and vfs_unbusy(). Passing a
thread_t to these functions has always been questionable at best.
Matthew Dillon [Fri, 5 May 2006 21:15:11 +0000 (21:15 +0000)]
Simplify vn_lock(), VOP_LOCK(), and VOP_UNLOCK() by removing the thread_t
argument. These calls now always use the current thread as the lockholder.
Passing a thread_t to these functions has always been questionable at best.
Matthew Dillon [Fri, 5 May 2006 20:15:02 +0000 (20:15 +0000)]
Remove the thread pointer argument to lockmgr(). All lockmgr() ops use the
current thread.
Move the lockmgr code in BUF_KERNPROC to lockmgr_kernproc(). This code
allows the lock owner to be set to a special value so any thread can unlock
the lock and is required for B_ASYNC I/O so biodone() can release the lock.
Matthew Dillon [Fri, 5 May 2006 16:35:11 +0000 (16:35 +0000)]
Remove VOP_BWRITE(). This function provided a way for a VFS to override
the bwrite() function and was used *only* by NFS in order to allow NFS to
handle the B_NEEDCOMMIT flag as part of NFSv3's 2-phase commit operation.
However, over time, the handling of this flag was moved to the strategy code.
Additionally, the kernel now fully supports the redirtying of buffers
during an I/O (which both softupdates and NFS need to be able to do).
The override is no longer needed. All former calls to VOP_BWRITE() now
simply call bwrite().
Matthew Dillon [Fri, 5 May 2006 16:15:56 +0000 (16:15 +0000)]
Cleanup procedure prototypes, get rid of extra spaces in pointer decls.
Sepherosa Ziehau [Fri, 5 May 2006 14:53:41 +0000 (14:53 +0000)]
correct "polling" support
Sascha Wildner [Fri, 5 May 2006 09:28:05 +0000 (09:28 +0000)]
Remove unused label.
Matthew Dillon [Thu, 4 May 2006 18:32:23 +0000 (18:32 +0000)]
Block devices generally truncate the size of I/O requests which go past EOF.
This is exactly what we want when manually reading or writing a block device
such as /dev/ad0s1a, but is not desired when a VFS issues I/O ops on
filesystem buffers. In such cases, any EOF condition must be considered an
error.
Implement a new filesystem buffer flag B_BNOCLIP, which getblk() and friends
automatically set. If set, block devices are guarenteed to return an error
if the I/O request is at EOF or would otherwise have to be clipped to EOF.
Block devices further guarentee that b_bcount will not be modified when this
flag is set.
Adjust all block device EOF checks to use the new flag, and clean up the code
while I'm there. Also, set b_resid in a couple of degenerate cases where
it was not being set.
YONETANI Tomokazu [Thu, 4 May 2006 08:00:59 +0000 (08:00 +0000)]
Don't forget to replicate b_cmd, which has been split off of b_flags.
Matthew Dillon [Wed, 3 May 2006 20:44:49 +0000 (20:44 +0000)]
- Clarify the definitions of b_bufsize, b_bcount, and b_resid.
- Remove unnecessary assignments based on the clarified fields.
- Add additional checks for premature EOF.
b_bufsize is only used by buffer management entities such as getblk() and
other vnode-backed buffer handling procedures. b_bufsize is not required
for calls to vn_strategy() or dev_dstrategy(). A number of other subsystems
use it to track the original request size.
b_bcount is the I/O request size, but b_bcount() is allowed to be truncated
by the device chain if the request encompasses EOF (such as on a raw disk
device). A caller which needs to record the original buffer size verses
the EOF-truncated buffer can compare b_bcount after the I/O against a
recorded copy of the original request size. This copy can be recorded in
b_bufsize for unmanaged buffers (malloced or getpbuf()'d buffers).
b_resid is always relative to b_bcount, not b_bufsize. A successful read
that is truncated to the device EOF will thus have a b_resid of 0 and a
truncated b_bcount.
Matthew Dillon [Wed, 3 May 2006 19:57:54 +0000 (19:57 +0000)]
Document the handling of a file holes in ufs_strategy() and clean up
the code flow a little.
Matthew Dillon [Wed, 3 May 2006 16:34:16 +0000 (16:34 +0000)]
Invert a mistaken test. Set b_resid to 0 if B_ERROR is not set.
Matthew Dillon [Wed, 3 May 2006 15:20:43 +0000 (15:20 +0000)]
Remove the accounting argument from lf_create_range() and lf_destroy_range().
Integrate p_numposixlocks counting into lf_count_change(). Calculate the
correct delta when changing flags on existing locks.
Matthew Dillon [Wed, 3 May 2006 15:18:38 +0000 (15:18 +0000)]
Minor cleanup, plus initialize a few additional fields in the proc
structure so we don't get bitten by them in the future.
Matthew Dillon [Wed, 3 May 2006 15:08:43 +0000 (15:08 +0000)]
Add a missing ohci_waitintr() call that allows polled operation of
bulk transfers to have a chance of working. Kernel crash dumps
to umass() work with this change.
Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: FreeBSD PR:usb/93720
Matthew Dillon [Wed, 3 May 2006 06:28:01 +0000 (06:28 +0000)]
Fix a biodone/AR_WAIT case. b_cmd was not getting set to BUF_CMD_DONE,
causing ATA-RAID to timeout.
Reported-by: Stefan Krueger, YONETANI Tomokazu
Matthew Dillon [Tue, 2 May 2006 22:52:24 +0000 (22:52 +0000)]
Fix an information disclosure issue on AMD cpus. The x87 debug registers,
in particular the last instruction and last data pointers, are not restored
by fxrstor() if there was no pending exception. Add some dummy FP
instructions (about ~7ns) to 'clean' the registers so a process has no
visibility into another process's FP state.
Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: FreeBSD
Security-Advistory: FreeBSD-SA-06:14.fpu
Matthew Dillon [Tue, 2 May 2006 21:30:43 +0000 (21:30 +0000)]
Fix a bug in close(). When a descriptor is closed, all process leaders
sharing that descriptor table must clear any related POSIX locks. The
code was looping through all the leaders but passing the wrong process
pointer to VOP_ADVLOCK, resulting in an assertion panic later on in exit1().
Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
Matthew Dillon [Tue, 2 May 2006 19:21:50 +0000 (19:21 +0000)]
The wrong pointer was being used to calculate the page offset, leading
to a vmapbuf() assertion. This bug was introduced in a recent commit.
Matthew Dillon [Tue, 2 May 2006 16:12:01 +0000 (16:12 +0000)]
- Add workarounds for dropped interrupts on VIA and ATI controllers.
- Include more vendor IDs.
Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: FreeBSD/NetBSD
Matthew Dillon [Tue, 2 May 2006 16:08:44 +0000 (16:08 +0000)]
Plug memory leak in umass.
Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: FreeBSD/NetBSD
Matthew Dillon [Mon, 1 May 2006 16:56:01 +0000 (16:56 +0000)]
Supply a stack pointer for a pure thread context so backtrace works.
Otherwise the 'back' command on a paniced kernel thread may get confused.
Matthew Dillon [Mon, 1 May 2006 16:27:35 +0000 (16:27 +0000)]
32bit from 64bit value fixup.
fixed a bug comparing sav->key_auth and SADB_AALG_NONE. [From KAME]
Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4
Matthew Dillon [Mon, 1 May 2006 16:26:54 +0000 (16:26 +0000)]
more strict sanity check for ESP tail. [From KAME]
Fix IPv6 error statistics being recorded as IPv4.
m_cat() may free the mbuf on 2nd arg, so m_pkthdr manipulation
has to happen before the call to m_cat(). [May not apply.]
Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4
Matthew Dillon [Mon, 1 May 2006 16:26:29 +0000 (16:26 +0000)]
Fix fencepost error causing creation of 0-length mbufs when
the boundary between header and data fell on the boundary
between two mbufs.
Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4
Matthew Dillon [Mon, 1 May 2006 16:26:09 +0000 (16:26 +0000)]
32bit from 64bit value fixup. Fix typo.
Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4
Matthew Dillon [Mon, 1 May 2006 16:25:41 +0000 (16:25 +0000)]
m_cat() may free the mbuf on 2nd arg, so m_pkthdr manipulation
has to happen before the call to m_cat(). [May not apply.]
Fix IPv6 error statistics being recorded as IPv4.
Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4
Matthew Dillon [Mon, 1 May 2006 16:24:43 +0000 (16:24 +0000)]
Plug xform memory leaks. Don't re-initialize an xform for an SA that
already has one.
Add a missing 'break;'
Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD4
Sascha Wildner [Mon, 1 May 2006 09:22:14 +0000 (09:22 +0000)]
Fix kldstat option.
Sascha Wildner [Mon, 1 May 2006 09:06:33 +0000 (09:06 +0000)]
Remove ports(7) reference and reword.
Sascha Wildner [Mon, 1 May 2006 02:06:40 +0000 (02:06 +0000)]
Document recently added devices.
Submitted-by: Gary <gary@velocity-servers.net>
Sascha Wildner [Mon, 1 May 2006 01:32:11 +0000 (01:32 +0000)]
Add missing #includes.
Matthew Dillon [Sun, 30 Apr 2006 20:23:26 +0000 (20:23 +0000)]
Remove buf->b_saveaddr, assert that vmapbuf() is only called on pbuf's. Pass
the user pointer and length to vmapbuf() rather then having it try to pull
the information out of the buffer. vmapbuf() is now responsible for setting
b_data, b_bufsize, and b_bcount.
Also fix a bug in cam_periph_mapmem(). The procedure was failing to unmap
earlier vmapped bufs if later vmapbuf() calls in the loop failed.
Matthew Dillon [Sun, 30 Apr 2006 18:52:37 +0000 (18:52 +0000)]
The pbuf subsystem now initializes b_kvabase and b_kvasize at startup and
no longer reinitializes these fields in initpbuf().
Users of getpbuf() may no longer modify b_kvabase or b_kvasize. b_data may
still be modified.
Sascha Wildner [Sun, 30 Apr 2006 18:46:39 +0000 (18:46 +0000)]
Add some missing manual pages.
Taken-from: FreeBSD
Matthew Dillon [Sun, 30 Apr 2006 18:25:37 +0000 (18:25 +0000)]
Remove b_xflags. Fold BX_VNCLEAN and BX_VNDIRTY into b_flags as
B_VNCLEAN and B_VNDIRTY. Remove BX_AUTOCHAINDONE and recode the
swap pager to use one of the caller data fields in the BIO instead.
Matthew Dillon [Sun, 30 Apr 2006 17:22:18 +0000 (17:22 +0000)]
Replace the the buffer cache's B_READ, B_WRITE, B_FORMAT, and B_FREEBUF
b_flags with a separate b_cmd field. Use b_cmd to test for I/O completion
as well (getting rid of B_DONE in the process). This further simplifies
the setup required to issue a buffer cache I/O.
Remove a redundant header file, bus/isa/i386/isa_dma.h and merge any
discrepancies into bus/isa/isavar.h.
Give ISADMA_READ/WRITE/RAW their own independant flag definitions instead of
trying to overload them on top of B_READ, B_WRITE, and B_RAW. Add a
routine isa_dmabp() which takes a struct buf pointer and returns the ISA
dma flags associated with the operation.
Remove the 'clear_modify' argument to vfs_busy_pages(). Instead,
vfs_busy_pages() asserts that the buffer's b_cmd is valid and then uses
it to determine the action it must take.
Sepherosa Ziehau [Sun, 30 Apr 2006 02:02:06 +0000 (02:02 +0000)]
Add NetGear FA-511 support
Obtained-from: FreeBSD
Tested-by: Andrew Thompson <andrew@hijacked.us>
Matthew Dillon [Sat, 29 Apr 2006 22:19:26 +0000 (22:19 +0000)]
Bring in SHA256 support from FreeBSD.
Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD
Matthew Dillon [Sat, 29 Apr 2006 22:05:21 +0000 (22:05 +0000)]
Bring in some fixes from NetBSD:
- Avoid NULL pointer dereference (ehci.c)
- Abort quickly if we don't have a buffer in all the cases. (uhci.c)
- Only do the software reset if we are dying, like we do in ohci and
ehci (uhci.c)
Submitted-by: Gary <gary@velocity-servers.net>
Taken-from: NetBSD
Sascha Wildner [Fri, 28 Apr 2006 20:16:26 +0000 (20:16 +0000)]
Fix typo.
Sascha Wildner [Fri, 28 Apr 2006 18:23:45 +0000 (18:23 +0000)]
Never generate external references for __cursig().
For what it's worth, this fixes buildkernel with -O0.
__inline-clue-by: joerg
Sascha Wildner [Fri, 28 Apr 2006 16:45:34 +0000 (16:45 +0000)]
Move the error check into the else clause because it only applies there.
Matthew Dillon [Fri, 28 Apr 2006 16:34:02 +0000 (16:34 +0000)]
Get rid of pbgetvp() and pbrelvp(). Instead fold the B_PAGING flag directly
into getpbuf() (the only type of buffer that pbgetvp() could be called on
anyway). Change related b_flags assignments from '=' to '|='.
Get rid of remaining depdendancies on b_vp. vn_strategy() now relies solely
on the vp passed to it as an argument. Remove buffer cache code that sets
b_vp for anonymous pbuf's.
Add a stopgap 'vp' argument to vfs_busy_pages(). This is only really needed
by NFS and the clustering code do to the severely hackish nature of the
NFS and clustering code.
Fix a bug in the ext2fs inode code where vfs_busy_pages() was being called
on B_CACHE buffers. Add an assertion to vfs_busy_pages() to panic if it
encounters a B_CACHE buffer.
Matthew Dillon [Fri, 28 Apr 2006 16:06:50 +0000 (16:06 +0000)]
Remove non-existant variable from debugging message.
Reported-by: Sascha Wildner <saw@online.de>
Matthew Dillon [Fri, 28 Apr 2006 06:13:56 +0000 (06:13 +0000)]
Get rid of the remaining buffer background bitmap code. It's been turned
off for a while, and it represents a fairly severe hack to the buffer
cache code that just complicates further development.
Matthew Dillon [Fri, 28 Apr 2006 00:24:46 +0000 (00:24 +0000)]
Remove the buffer cache's B_PHYS flag. This flag was originally used as
part of a severe hack to treat buffers containing 'user' addresses
differently, in particular by using b_offset instead of b_blkno. Now that
buffer cache buffers only HAVE b_offset (b_*blkno is gone for good), there
is literally no difference between B_PHYS I/O and non-B_PHYS I/O once
the buffer has been handed off to the device.
Matthew Dillon [Fri, 28 Apr 2006 00:13:23 +0000 (00:13 +0000)]
Fix a bug in the POSIX locking code. The system could lose track of
range locks due to a bad flags assignment, resulting in odd operation and/or
an assertion at process exit. Fix the flags assignment.
Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
Matthew Dillon [Thu, 27 Apr 2006 23:28:37 +0000 (23:28 +0000)]
Move most references to the buffer cache array (buf[]) to kern/vfs_bio.c.
Implement a procedure which scans all buffers, called scan_all_buffers().
Cleanup unused debugging code referencing buf[].
Matthew Dillon [Thu, 27 Apr 2006 17:23:14 +0000 (17:23 +0000)]
Get rid of libcr, the idea(s) behind it are not really applicable anymore
now that libc_r is properly linked against libc.
Sascha Wildner [Thu, 27 Apr 2006 16:01:33 +0000 (16:01 +0000)]
grrr...fix reverse chronological order
Sascha Wildner [Thu, 27 Apr 2006 15:49:57 +0000 (15:49 +0000)]
Update HISTORY section for preadv and pwritev.
Sascha Wildner [Thu, 27 Apr 2006 15:36:00 +0000 (15:36 +0000)]
Add documentation for the new preadv(2) and pwritev(2) system calls.
Submitted-by: Chuck Tuffli <ctuffli@gmail.com>
Sascha Wildner [Thu, 27 Apr 2006 10:25:34 +0000 (10:25 +0000)]
Signals are described in signal(3).