harti [Mon, 14 Mar 2005 12:03:30 +0000 (12:03 +0000)]
Split off two function from VarParseLong to handle modifiers and the
actual variable lookup. Consistently rename lengthPtr to consumed.
Update a number of comments to match the code.
phk [Mon, 14 Mar 2005 10:01:29 +0000 (10:01 +0000)]
Currently (almost) all filesystems maintain a local inode hash table
to get from (mount + inode) to vnode. These tables are mostly
copy&pasted from UFS, sized based on desiredvnodes and therefore
quite large (128K-512K). Several filesystems are buggy enough that
they allocate the hash table even before they know if they will
ever be used or not.
Add "vfs_hash", a system wide hash table, which will replace all
the per-filesystem hash-tables.
The fields we add to struct vnode will more or less be saved in
the respective filesystems inodes.
Having one central implementation will save code and will allow us
to justify the complexity of code to dynamically (re)size the hash
at a later point.
jeff [Mon, 14 Mar 2005 09:25:19 +0000 (09:25 +0000)]
- Increment the holdcnt once for each usecount reference. This allows us
to use only the holdcnt to determine whether a vnode may be recycled,
simplifying the V* macros as well as vtryrecycle(), etc.
jeff [Mon, 14 Mar 2005 08:30:31 +0000 (08:30 +0000)]
- We do not have to check the object's ref_count in VSHOULDFREE or
vtryrecycle(). All obj refs also ref the vnode.
- Consistently use v_incr_usecount() to increment the usecount. This will
be more important later.
delphij [Mon, 14 Mar 2005 04:33:13 +0000 (04:33 +0000)]
printf(3) expects that %*s having an int parameter, which generates
warning on 64-bit platforms. Explicitly cast these values to int
to work around this issue, as these values are tend to be small.
iedowse [Mon, 14 Mar 2005 01:03:50 +0000 (01:03 +0000)]
Set the split transaction interrupt C-mask correctly. This is the
final piece needed to make split transaction interrupt pipes work,
which I thought I had already committed.
kientzle [Sun, 13 Mar 2005 23:49:53 +0000 (23:49 +0000)]
Re-unbreak the distfile target.
Also, reduce the WARNS level to 5 since different build environments
end up using different Yacc skeletons. The BSD one does not
predeclare yyparse, the FSF one does, so it's not really possible to
consistently enforce both -Wmissing-prototypes and -Wredundant-decls.
iedowse [Sun, 13 Mar 2005 23:48:17 +0000 (23:48 +0000)]
The EHCI qTD token has a number of error status bits that are not
cleared if the host controller retries the transfer and is successful,
but we were interpreting these bits as indicating a fatal error.
Ignore these error bits, and instead use the HALTED bit to determine
if the transfer failed. Also update the USBD_STALLED detection to
ignore these bits.
pjd [Sun, 13 Mar 2005 16:45:41 +0000 (16:45 +0000)]
When listing all devices (geoms) from the given class, skip geoms without
providers.
This prevents from listing geoms like <name>.sync which can be confusing.
It still allows to show details about it by giving its name when listing.
jeff [Sun, 13 Mar 2005 12:18:25 +0000 (12:18 +0000)]
- The VI_DOOMED flag now signals the end of a vnode's relationship with
the filesystem. Check that rather than VI_XLOCK.
- VOP_INACTIVE should no longer drop the vnode lock.
- The vnode lock is required around calls to vrecycle() and vgone().
jeff [Sun, 13 Mar 2005 12:09:34 +0000 (12:09 +0000)]
- The c_lock in the coda node does not offer any features over the standard
vnode lock. Remove the c_lock and use the vn lock in its place.
- Keep the coda lock functions so that the debugging information is
preserved, but call directly to the vop_std*lock routines for the real
functionality.
jeff [Sun, 13 Mar 2005 12:04:12 +0000 (12:04 +0000)]
- It is not legal to access v_data without the vnode lock or interlock
held. Grab the vnode interlock if LK_INTERLOCK has not been passed in
so that we can inspect v_data in ffs_lock().
jeff [Sun, 13 Mar 2005 12:03:14 +0000 (12:03 +0000)]
- The VI_DOOMED flag now signals the end of a vnode's relationship with
the filesystem. Check that rather than VI_XLOCK.
- Shorten ffs_reload by one step. The old check for an inactive vnode
was slightly racey, and the code which deals with still active vnodes
is not much more expensive.
jeff [Sun, 13 Mar 2005 11:59:14 +0000 (11:59 +0000)]
- In ufs_mknod(), hold the lock across the call to vgone() as that is now
required.
- In ufs_close(), don't do the EAGAIN vrele hack, the top layer now calls
vn_start_write before the lock is acquired as it should.
jeff [Sun, 13 Mar 2005 11:57:39 +0000 (11:57 +0000)]
- Don't drop the lock in ufs_inactive().
- Also in ufs_inactive, don't acquire the vnode interlock where it isn't
strictly needed. Also owning the vnode interlock while calling vprint()
will cause locking assertions to trip.
jeff [Sun, 13 Mar 2005 11:56:28 +0000 (11:56 +0000)]
- Do a vn_start_write in vn_close, we may write if this is the last ref
on an unlinked file. We can't know if this is the case until after we
have the lock.
- Lock the vnode in vn_close, many filesystems had code which was unsafe
without the lock held, and holding it greatly simplifies vgone().
- Adjust vn_lock() to check for the VI_DOOMED flag where appropriate.
jeff [Sun, 13 Mar 2005 11:54:28 +0000 (11:54 +0000)]
- Remove vx_lock, vx_unlock, vx_wait, etc.
- Add a vn_start_write/vn_finished_write around vlrureclaim so we don't do
writing ops without suspending. This could suspend the vlruproc which
should not be a problem under normal circumstances.
- Manually implement VMIGHTFREE in vlrureclaim as this was the only instance
where it was used.
- Acquire a lock before calling vgone() as it now requires it.
- Move the acquisition of the vnode interlock from vtryrecycle() to
getnewvnode() so that if it fails we don't drop and reacquire the
vnode_free_list_mtx.
- Check for a usecount or holdcount at the end of vtryrecycle() in case
someone grabbed a ref while we were recycling. Abort the recycle, and
on the final ref drop this vnode will be placed on the head of the free
list.
- Move the redundant VOP_INACTIVE protection code into the local
vinactive() routine to avoid code bloat.
- Keep the vnode lock held across calls to vgone() in several places.
- vgonel() no longer uses XLOCK, instead callers must hold an exclusive
vnode lock. The VI_DOOMED flag is set to allow other threads to detect
a vnode which is no longer valid. This flag is set until the last
reference is gone, and there are no chances for a new ref. vgonel()
holds this lock across the entire function, which greatly simplifies
logic.
_ Only vfree() in one place in vgone() not three.
- Adjust vget() to check the VI_DOOMED flag prior to waiting on the lock
in the LK_NOWAIT case. In other cases, check after we have slept and
acquired an exlusive lock. This will simulate the old vx_wait()
behavior.
jeff [Sun, 13 Mar 2005 11:44:02 +0000 (11:44 +0000)]
- Get rid of VXLOCK, VXWANT, and vx_*. The vnode lock now protects us
against recycling.
- Modify VSHOULDFREE, VCANRECYCLE, etc. now that certain flags are no
longer important. Remove VMIGHTFREE as it is only used in one place.
iedowse [Sun, 13 Mar 2005 04:07:40 +0000 (04:07 +0000)]
Fix the arrangement of periodic QH tree to give the correct interval
between passes over a QH. Previously the accesses to a QH were
bunched together in time, so the interval was often much longer
than intended. This now appears to match the diagrams in the EHCI
spec, so remove the XXX comment.
kientzle [Sun, 13 Mar 2005 02:53:42 +0000 (02:53 +0000)]
Support extracting entries with pathnames longer than PATH_MAX. In
testing, I've archived and restored dir trees with ~1MB pathnames.
Most formats, of course, have much smaller limits.
kan [Sat, 12 Mar 2005 21:26:53 +0000 (21:26 +0000)]
Allow kernels loaded by pxeboot, which was compiled with LOADER_TFTP_SUPPORT,
to stll be able to mount NFS root as prescribed by DCHP configuration. Since
pxeboot is using TFTP to get to the files, pxeboot can not rely on NFS to
provide it a root directory hande as a side effect. pxeboot has to make RPC
mount call itself.
hrs [Sat, 12 Mar 2005 19:04:03 +0000 (19:04 +0000)]
New release notes:
jail(8) security.jail.chflags_allowed sysctl,
zs driver removed,
ng_ipfw(4) added,
ips(4) crash dump support,
getaddrinfo(3) DNS query order changed,
powerd(8) added, and
RFC derived manual pages replaced.
Update release notes:
acpi_throttle and acpi_perf merged into acpi and
can be disabled via device hints, and
some rewording due to zs driver removal in the entry which
explains uart(4) has been enabled by default on FreeBSD/sparc64.
marius [Sat, 12 Mar 2005 17:06:03 +0000 (17:06 +0000)]
In uart_cpu_getdev_console() when determinig whether we should use
a serial console anyway because input-device is set to keyboard and
output-device is set to screen but no keyboard is plugged in don't
assume that a device node for the input-device alias exists. While
this is true for RS232 keyboards (the node of the SCC and UART
respectively which controls the keyboard doesn't disappear when no
keyboard is plugged in) this assumption breaks for USB keyboards.
It's most likely also not true for PS/2 keyboards but OFW doesn't
reliably switch to a serial console when the potential keyboard is
a PS/2 one which isn't plugged in so this couldn't be verified
properly.
Reported by: Will Andrews <will@csociety.org>, obrien
MFC after: 1 week
rwatson [Sat, 12 Mar 2005 13:39:39 +0000 (13:39 +0000)]
Extend the coverage of the accept and socket mutexes in soisconnected()
so that the socket lock is held over the test-and-set removal of the
accept filter option during connect, and the two socket mutex regions
(transition to connected, perform accept filter) are combined.
rwatson [Sat, 12 Mar 2005 12:57:18 +0000 (12:57 +0000)]
Move the logic implementing retrieval of the SO_ACCEPTFILTER socket option
from uipc_socket.c to uipc_accf.c in do_getopt_accept_filter(), so that it
now matches do_setopt_accept_filter(). Slightly reformulate the logic to
match the optimistic allocation of storage for the argument in advance,
and slightly expand the coverage of the socket lock.
rwatson [Sat, 12 Mar 2005 12:27:47 +0000 (12:27 +0000)]
Part two of post-SMPng cleanup of accept filter registration: perform all
allocation up front before grabbing the socket mutex and doing the
registration work. The result is a lot cleaner.
scottl [Sat, 12 Mar 2005 07:01:53 +0000 (07:01 +0000)]
Guard against an integer underflow that could cause busdma to eat up all
available RAM. This also results in the global bounce page limit being
applied to zones instead of globally.