phk [Thu, 31 Mar 2005 12:19:44 +0000 (12:19 +0000)]
Explicitly hold a reference to the cdev we have just cloned. This
closes the race where the cdev was reclaimed before it ever made it
back to devfs lookup.
harti [Thu, 31 Mar 2005 11:35:56 +0000 (11:35 +0000)]
Almost complete rewrite of the archive code (except for the Makefile parsing
part). Archive handling was broken at least since the move from BSD ar/ranlib
to GNU binutils because of the different archive format. This rewrite fixes
this by making make to carry around the defines for all formats (it supports)
so it can support all of them independent of the actually used one. The
supported formats are: traditional BSD (this seems to come from V7 at least,
short names only and __.SYMDEF), BSD4.4 (long names with #1/ and __.SYMDEF)
and SysV (extra name table and //). The only format not supported are broken
traditional archives where the member names are truncated to 15 characters.
Errors in the archive are not ignored anymore, but cause make to stop with
an error message. The command line option -A causes these errors to become
non-fatal. This is almost compatible with previous usage except for the
error message printed in any case.
Use a type-safe intrusive list for the archive cache.
Reviewed by: Max Okumoto <okumoto@ucsd.edu> (without new error handling)
njl [Thu, 31 Mar 2005 06:11:04 +0000 (06:11 +0000)]
Remove check of numpst to allow more K8 variants to attach. The other
checks, including cpuid_is_k7(), will catch CPUs that really don't support
this method.
Submitted by: Bruno Ducrot
Tested by: Jari Kirma (kirma cs.hut.fi)
jeff [Thu, 31 Mar 2005 05:22:45 +0000 (05:22 +0000)]
- Disable vfs shared locks by default. They must be specifically enabled
on filesystems which safely support them. It appears that many
network filesystems specifically are not shared lock safe.
jeff [Thu, 31 Mar 2005 05:21:17 +0000 (05:21 +0000)]
- Set LK_NOSHARE for snapshot locks. snapshots require exclusive only
access.
- Remove the hack from ffs_lock() to implement LK_NOSHARE in a ffs
specific way.
jeff [Thu, 31 Mar 2005 04:25:59 +0000 (04:25 +0000)]
- Remove apause(). It makes no sense with our present mutex implementation
since simply unlocking a mutex does not ensure that one of the waiters
will run and acquire it. We're more likely to reacquire the mutex
before anyone else has a chance. It has also bit me three times now, as
it's not safe to drop the interlock before sleeping in many cases.
peter [Wed, 30 Mar 2005 22:57:41 +0000 (22:57 +0000)]
Checkpoint today's tidy-up of the WIP disassembler. It now agrees with
objdump --disassemble when disassembling itself in userland. I've added
the cmovCC instruction group and tweaked a bunch of size sensitive array
indexes to either fix my mistakes and/or force it to work by any means
necessary.
I'm committing this because it is usable enough to see what is going on
when single stepping via ddb.
It might still tell lies, but its lies will be far more subtle now. I'm
not sure that this is a good thing or not.
peter [Wed, 30 Mar 2005 22:52:27 +0000 (22:52 +0000)]
Commit my checkpoint of db_disasm.c that I hacked to understand some amd64
instructions as it was when I dropped it back in May 31, 2003. I'm
committing this as an intermediate stage because back then I thought I
understood what I was doing with this file.
sam [Wed, 30 Mar 2005 20:20:49 +0000 (20:20 +0000)]
o fix bug where rate wouldn't lift off lowest setting when operating as
an ap in 11g with protection enabled
o correct rate selection when operating in 11g with protection when no
packets have been sent yet (from John Bicket)
o track api change to get first descriptor and use it to collect the frame
length for calculating the state bin
o add more debugging and shuffle some existing debugging to give more info
o bump version to distinguish bug fixes
sam [Wed, 30 Mar 2005 20:17:18 +0000 (20:17 +0000)]
rev rate control api to pass the both the first+last tx descriptors
to the rate control module for tx complete processing; this enables
rate control algorithms to extract the packet length for xmits that
require multiple descriptors
sam [Wed, 30 Mar 2005 20:13:08 +0000 (20:13 +0000)]
o extend cts to cover packet burst when operating in 11g w/ protection
o check current channel parameters, not shadow state, for acm policy
on data frames
wpaul [Wed, 30 Mar 2005 16:22:48 +0000 (16:22 +0000)]
Fix a possible mutex leak in KeSetTimerEx(): if timer is NULL, we
bail out without releasing the dispatcher lock. Move the lock acquisition
after the pointer test to avoid this.
harti [Wed, 30 Mar 2005 15:18:58 +0000 (15:18 +0000)]
Make the structure for handling the input stack local to the parse
module. The only module accessing it (the current line number) was the
condition module, so pass the current line number as a function argument.
Centralize the pushing of new input sources into one function
ParsePushInput() and rename the function handling the popping from ParseEOF()
to ParsePopInput(). Make the entire thing a little bit clearer, by holding
the current input source in the top element of the stack instead of
using extra variables for this. Use a type-safe intrusive list for the
input stack.
harti [Wed, 30 Mar 2005 15:14:22 +0000 (15:14 +0000)]
Fix a bug introduced in a previous commit: ParseModifier() consumes
characters so it is not safe to move around code from
before it to after it. This should fix problems with building the
documentation.
sos [Wed, 30 Mar 2005 12:03:40 +0000 (12:03 +0000)]
This is the much rumoured ATA mkIII update that I've been working on.
o ATA is now fully newbus'd and split into modules.
This means that on a modern system you just load "atapci and ata"
to get the base support, and then one or more of the device
subdrivers "atadisk atapicd atapifd atapist ataraid".
All can be loaded/unloaded anytime, but for obvious reasons you
dont want to unload atadisk when you have mounted filesystems.
o The device identify part of the probe has been rewritten to fix
the problems with odd devices the old had, and to try to remove
so of the long delays some HW could provoke. Also probing is done
without the need for interrupts, making earlier probing possible.
o SATA devices can be hot inserted/removed and devices will be created/
removed in /dev accordingly.
NOTE: only supported on controllers that has this feature:
Promise and Silicon Image for now.
On other controllers the usual atacontrol detach/attach dance is
still needed.
o Support for "atomic" composite ATA requests used for RAID.
o ATA RAID support has been rewritten and and now supports these
metadata formats:
"Adaptec HostRAID"
"Highpoint V2 RocketRAID"
"Highpoint V3 RocketRAID"
"Intel MatrixRAID"
"Integrated Technology Express"
"LSILogic V2 MegaRAID"
"LSILogic V3 MegaRAID"
"Promise FastTrak"
"Silicon Image Medley"
"FreeBSD PseudoRAID"
o Update the ioctl API to match new RAID levels etc.
o Update atacontrol to know about the new RAID levels etc
NOTE: you need to recompile atacontrol with the new sys/ata.h,
make world will take care of that.
NOTE2: that rebuild is done differently from the old system as
the rebuild is now done piggybacked on read requests to the
array, so atacontrol simply starts a background "dd" to rebuild
the array.
o The reinit code has been worked over to be much more robust.
o The timeout code has been overhauled for races.
o Support of new chipsets.
o Lots of fixes for bugs found while doing the modulerization and
reviewing the old code.
Missing or changed features from current ATA:
o atapi-cd no longer has support for ATAPI changers. Todays its
much cheaper and alot faster to copy those CD images to disk
and serve them from there. Besides they dont seem to be made
anymore, maybe for that exact reason.
o ATA RAID can only read metadata from all the above metadata formats,
not write all of them (Promise and Highpoint V2 so far). This means
that arrays can be picked up from the BIOS, but they cannot be
created from FreeBSD. There is more to it than just the missing
write metadata support, those formats are not unique to a given
controller like Promise and Highpoint formats, instead they exist
for several types, and even worse, some controllers can have
different formats and its impossible to tell which one.
The outcome is that we cannot reliably create the metadata of those
formats and be sure the controller BIOS will understand it.
However write support is needed to update/fail/rebuild the arrays
properly so it sits fairly high on the TODO list.
o So far atapicam is not supported with these changes. When/if this
will change is up to the maintainer of atapi-cam so go there for
questions.
HW donated by: Webveveriet AS
HW donated by: Frode Nordahl
HW donated by: Yahoo!
HW donated by: Sentex
Patience by: Vife and my boys (and even the cats)
glebius [Wed, 30 Mar 2005 11:44:43 +0000 (11:44 +0000)]
When several carp interfaces are attached to Ethernet interface,
carp_carpdev_state_locked() is called every time carp interface is attached.
The first call backs up flags of the first interface, and the second
call backs up them again, erasing correct values.
To solve this, a carp_sc_state_locked() function is introduced. It is
called when interface is attached to parent, instead of calling
carp_carpdev_state_locked. carp_carpdev_state_locked() calls
carp_sc_state_locked() for each sc in chain.
joerg [Wed, 30 Mar 2005 09:33:10 +0000 (09:33 +0000)]
Support VTOC volume names. This can be useful to distinguish multiple
disks in a system. Solaris' format(1m) displays the volume names in
the disk overview.
iedowse [Wed, 30 Mar 2005 08:32:41 +0000 (08:32 +0000)]
Use the usb_callout_* API instead of timeout()/untimeout() in order
to avoid a race condition that can cause the ukbd timeout routine
to run after the keyboard has detached.
dfr [Wed, 30 Mar 2005 08:28:26 +0000 (08:28 +0000)]
When allocating TLS and DTV, make sure that any unused slots in the DTV
are initialised to zero. When freeing TLS, don't attempt to free DTV
slots which were not used.
Pointed out by: Joerg Sonnenberger
X-MFC-After: After the branch, probably
alc [Wed, 30 Mar 2005 05:40:02 +0000 (05:40 +0000)]
Eliminate (now) unnecessary acquisition and release of the global page
queues lock in vm_object_backing_scan(). Updates to the page's PG_BUSY
flag and busy field are synchronized by the containing object's lock.
Testing the page's hold_count and wire_count in vm_object_backing_scan()'s
OBSC_COLLAPSE_NOWAIT case is unnecessary. There is no reason why the held
or wired pages cannot be migrated to the shadow object.
das [Wed, 30 Mar 2005 03:02:16 +0000 (03:02 +0000)]
Eliminate v_id and v_ddid. This changes struct vnode, so all
filesystem modules must be recompiled. (Since struct vnode has
already changed in 6-CURRENT, there's little advantage to leaving
the unused fields around.)
das [Wed, 30 Mar 2005 03:01:36 +0000 (03:01 +0000)]
Eliminate v_id and v_ddid. The name cache now holds references to
vnodes whose names it caches, so we no longer need a `generation
number' to tell us if a referenced vnode is invalid. Replace the use
of the parent's v_id in the hash function with the address of the
parent vnode.
das [Wed, 30 Mar 2005 02:59:32 +0000 (02:59 +0000)]
Merge kern___cwd() and vn_fullpath(), which were virtually identical,
except for places where people forget to update one of them. We now
collect only one set of stats for both of these routines. Other
changes in this commit include:
- Start acquiring Giant again in vn_fullpath(), since it is required
when crossing a mount point.
- Expand the scope of the cache lock to avoid dropping it and
picking it up again for every pathname component. This also
makes it trivial to avoid races in stats collection.
- Assert that nc_dvp == v_dd for directories instead of returning
an error to userland when this is not true. AFAIK, it should
always be true when v_dd is non-null.
- For vn_fullpath(), handle the first (non-directory) vnode
separately.
glebius [Tue, 29 Mar 2005 13:43:09 +0000 (13:43 +0000)]
- Don't free mbuf, passed to interface output method if the latter
returns error. In this case mbuf has already been freed. [1]
- Remove redundant declaration.
PR: kern/78893 [1]
Submitted by: Liang Yi [1]
Reviewed by: sam
MFC after: 1 day
jeff [Tue, 29 Mar 2005 13:16:38 +0000 (13:16 +0000)]
- Remove wantparent, it is no longer necessary. An assert in vfs_lookup.c
prevents any callers from doing a modifying op without
LOCKPARENT or WANTPARENT. It wasn't even properly used in the CREATE
or DELETE cases.
jeff [Tue, 29 Mar 2005 13:09:42 +0000 (13:09 +0000)]
- Remove wantparent, it is no longer necessary. An assert in vfs_lookup.c
prevents any callers from doing a modifying op without
LOCKPARENT or WANTPARENT.
jeff [Tue, 29 Mar 2005 13:04:00 +0000 (13:04 +0000)]
- Remove wantparent, it is no longer necessary. An assert in vfs_lookup.c
prevents any callers from doing a DELETE or RENAME without locking
the parent.
jeff [Tue, 29 Mar 2005 12:59:06 +0000 (12:59 +0000)]
- Move the logic that locks and refs the new vnode from vfs_cache_lookup()
to cache_lookup(). This allows us to acquire the vnode interlock before
dropping the cache lock. This protects the vnodes identity until we
have locked it.
tobez [Tue, 29 Mar 2005 11:44:17 +0000 (11:44 +0000)]
Adds sha256 support. While it is a good idea to also add sha384 and
sha512, I did not do that since it is not entirely clear where "the one
true place" to hold their implementations is going to be. Sha256 is
different since mtree already links against libmd.
Make recommended procedure for integrity checking in the manpage
consistent.
Fix a bug with -f spec1 -f spec2 comparison, which prevented
test/tes03.sh from running successfully.
phk [Tue, 29 Mar 2005 11:26:14 +0000 (11:26 +0000)]
We don't need no major numbers
We don't need a mknod(2) call
No tricky install documentation
Kernel leave them dev_t alone
Hey Kernel leave them cdevsw alone
All in all it's just another struct in src/sys
All in all you're just another struct in src/sys
jeff [Tue, 29 Mar 2005 10:07:15 +0000 (10:07 +0000)]
- Set cn_lkflags to LK_SHARED in the LOOKUP_SHARED case so that we only
acquire shared locks on intermediate directories.
- For the LASTCN, we may have to LK_UPGRADE the parent directory before
we lookup the last component.
- Acquire VFS_ROOT and dp locks based on the cn_lkflag.
jeff [Tue, 29 Mar 2005 10:02:48 +0000 (10:02 +0000)]
- Dont clear OWEINACT in vbusy(), we still owe an inactive call if someone
vhold()s us.
- Avoid an extra mutex acquire and release in the common case of vgonel()
by checking for OWEINACT at the start of the function.
- Fix the case where we set OWEINACT in vput(). LK_EXCLUPGRADE drops our
shared lock if it fails.