メンテナンス

手元の7-STABLEをr188913 -> r189424へ更新。vfsやらvmやらがいじられてたはず。
以下、commit log

------------------------------------------------------------------------
r188915 | bms | 2009-02-22 22:34:01 +0900 (Sun, 22 Feb 2009) | 7 lines

MFC:
  Fix a typo which caused ifmcstat's sysctl path
  to print the network-layer endpoint address of the
  group membership, rather than its link-layer mapping
  as intended.
  The KVM path is not affected.

------------------------------------------------------------------------
r188928 | bms | 2009-02-23 04:23:58 +0900 (Mon, 23 Feb 2009) | 2 lines

fix typo!

------------------------------------------------------------------------
r188952 | mav | 2009-02-24 04:52:47 +0900 (Tue, 24 Feb 2009) | 4 lines

MFC rev. 187525 187543 187546 187551 187875 187877 188044 188725

Sync MMC subsystem with HEAD.

------------------------------------------------------------------------
r188953 | mav | 2009-02-24 04:58:35 +0900 (Tue, 24 Feb 2009) | 7 lines

MFC rev. 187876, 188462, 188724

Sync sdhci driver with HEAD:
Add hw.sdhci.debug sysctl to control debug level.
Fix read_ivar prototype.
Add support for interruptless kernel dumping.

------------------------------------------------------------------------
r189008 | gallatin | 2009-02-25 04:41:23 +0900 (Wed, 25 Feb 2009) | 2 lines

MFH r186260: Additional 10GbE media types (10Gbase-LRM, 10Gbase-Twinax*)

------------------------------------------------------------------------
r189010 | gallatin | 2009-02-25 05:16:34 +0900 (Wed, 25 Feb 2009) | 2 lines

MFH r188736 and r188737: Better support for recent Myricom 10GbE NICs

------------------------------------------------------------------------
r189026 | rwatson | 2009-02-25 19:59:56 +0900 (Wed, 25 Feb 2009) | 69 lines

Merge r185747, r185774, r185807, r185849, r185964, r185965, r186051,
r186052 from head to stable/7; note that only the locking fixes and
invariants checking are added from r185747, but not the move to an
rwlock which would modify the kernel binary interface, nor the move
to a non-recursible lock, which is still seeing problem reports in
head.  This corrects, among other things, a deadlock that may occur
when processing incoming ICMP redirects.

r185747:

  - convert radix node head lock from mutex to rwlock
  - make radix node head lock not recursive
  - fix LOR in rtexpunge
  - fix LOR in rtredirect

  Reviewed by:  sam

r185774:

  - avoid recursively locking the radix node head lock
  - assert that it is held if RTF_RNH_LOCKED is not passed

r185807:

  Fix a bug introduced in r185747: rather than dereferencing an
  uninitialized *rt to something undefined, use the fibnum that came in
  as function argument.

  Found with:   Coverity Prevent(tm)
  CID:          4168

r185849:

  fix a reported panic when adding a route and one hit here when deleting
  a route

  - pass RTF_RNH_LOCKED to rtalloc1_fib in 2 cases where the lock is held
  - make sure the rnh lock is held across rt_setgate and rt_getifa_fib

r185964:

  Pass RTF_RNH_LOCKED to rtalloc1 sunce the node head is locked, this
  avoids a recursive lock panic on inet6 detach.

  Reviewed by:  kmacy

r185965:

  RTF_RNH_LOCKED needs to be passed in the flags arg not report,
  apologies to thompsa

r186051:

  in6_addroute is called through rnh_addadr which is always called with
  the radix node head lock held exclusively. Pass RTF_RNH_LOCKED to
  rtalloc so that rtalloc1_fib will not try to re-acquire the lock.

r186052:

  don't acquire lock recursively

Oiginal commits to head were by kmacy, except r185964 by thompsa and
r185807 by bz.

A subset of this is a potential errata patch candidate.

Reviewed by:    bz, kmacy
Tested by:      Pete French <petefrench at ticketswi

------------------------------------------------------------------------
r189029 | rwatson | 2009-02-25 20:18:18 +0900 (Wed, 25 Feb 2009) | 16 lines

Correct a deadlock and a rtentry leak in rt_check():

- In the event that a gateway route has to be looked up, drop the lock
  on 'rt' before reacquiring it 'rt0' in order to avoid deadlock.

- In the event the original route has evaporated or is no longer up
  after the gateway route lookup, call RTFREE() on the gateway route
  before retrying.

This is a potential errata candidate patch.

PR:		kern/130652
Submitted by:	Dmitrij Tejblum <tejblum at yandex-team.ru>
Reviewed by:	bz
Tested by:	Pete French <petefrench at ticketswitch.com>

------------------------------------------------------------------------
r189030 | rwatson | 2009-02-25 20:37:19 +0900 (Wed, 25 Feb 2009) | 9 lines

Merge r179458 from head to stable/7:

  Import rewritten nve device id's, which brings this more
  inline with if_nfe.

  PR:		110883
  Submitted by:	Claudel <regis at claudel dot ch>
  Approved by:	imp (mentor, implicit)

------------------------------------------------------------------------
r189031 | rwatson | 2009-02-25 20:44:03 +0900 (Wed, 25 Feb 2009) | 9 lines

Merge r186825 from head to stable/7:

  Do a lockless read of the audit pipe list before grabbing the audit pipe
  lock in order to avoid the lock acquire hit if the pipe list is very
  likely empty.

  Obtained from:        TrustedBSD Project
  Sponsored by: Apple, Inc.

------------------------------------------------------------------------
r189032 | rwatson | 2009-02-25 21:00:15 +0900 (Wed, 25 Feb 2009) | 21 lines

Merge r184508 from head to stable/7:

  Historically, /dev/auditpipe has allows only whole records to be read via
  read(2), which meant that records longer than the buffer passed to read(2)
  were dropped.  Instead take the approach of allowing partial reads to be
  continued across multiple system calls more in the style of streaming
  character device.

  This means retaining a record on the per-pipe queue in a partially read
  state, so maintain a current offset into the record.  Keep the record on
  the queue during a read, so add a new lock, ap_sx, to serialize removal
  of records from the queue by either read(2) or ioctl(2) requesting a pipe
  flush.  Modify the kqueue handler to return bytes left in the current
  record rather than simply the size of the current record.

  It is now possible to use praudit, which used the standard FILE * buffer
  sizes, to track much larger record sizes from /dev/auditpipe, such as
  very long command lines to execve(2).

  Sponsored by: Apple, Inc.

------------------------------------------------------------------------
r189033 | rwatson | 2009-02-25 21:32:15 +0900 (Wed, 25 Feb 2009) | 7 lines

Merge 3184510 from head to stable/7:

  Since there is no longer the opportunity for record truncation, just
  return 0 if the truncation counter is queried on an audit pipe.

  Sponsored by: Apple, Inc.

------------------------------------------------------------------------
r189034 | rwatson | 2009-02-25 22:17:46 +0900 (Wed, 25 Feb 2009) | 7 lines

Merge r184534 from head to stable/7:

  Allow a single read(2) system call on an audit pipe to retrieve data from
  more than one audit record at a time in order to improve efficiency.

  Sponsored by: Apple, Inc.

------------------------------------------------------------------------
r189035 | rwatson | 2009-02-25 22:21:28 +0900 (Wed, 25 Feb 2009) | 18 lines

Merge r184536 from head to stable/7:

  We only allow a partial read of the first record in an audit pipe
  record queue, so move the offset field from the per-record
  audit_pipe_entry structure to the audit_pipe structure.

  Now that we support reading more than one record at a time, add a
  new summary field to audit_pipe, ap_qbyteslen, which tracks the
  total number of bytes present in a pipe, and return that (minus
  the current offset) via FIONREAD and kqueue's data variable for
  the pending byte count rather than the number of bytes remaining
  in only the first record.

  Add a number of asserts to confirm that these counts and offsets
  following the expected rules.

  Sponsored by: Apple, Inc.

------------------------------------------------------------------------
r189036 | rwatson | 2009-02-25 22:26:30 +0900 (Wed, 25 Feb 2009) | 6 lines

Merge r184540 from head to stable/7:

  Add comment for per-pipe stats.

  Sponsored by: Apple, Inc.

------------------------------------------------------------------------
r189037 | rwatson | 2009-02-25 22:30:17 +0900 (Wed, 25 Feb 2009) | 10 lines

Merge r184544 and r184545 from head to stable/7:

  Remove stale comment about filtering in audit pipe ioctl routine: we do
  support filtering now, although we may want to make it more interesting
  in the future.

  Update introductory comment for audit pipes.

  Sponsored by: Apple, Inc.

------------------------------------------------------------------------
r189038 | rwatson | 2009-02-25 22:42:38 +0900 (Wed, 25 Feb 2009) | 6 lines

Merge r184825 from head to stable/7:

  Wrap sx locking of the audit worker sleep lock in macros, update comments.

  Sponsored by: Apple, Inc.

------------------------------------------------------------------------
r189039 | rwatson | 2009-02-25 22:47:09 +0900 (Wed, 25 Feb 2009) | 7 lines

Merge r188122 from head to stable/7:

  Eliminate the local variable 'ape' in audit_pipe_kqread(), as it's only
  used for an assertion that we don't really need anymore.

  Reported by:  Christoph Mallon <christoph dot mallon at gmx dot de>

------------------------------------------------------------------------
r189040 | rwatson | 2009-02-25 23:08:28 +0900 (Wed, 25 Feb 2009) | 5 lines

Merge r183689 from head to stable/7:

  Differentiate pr_usrreqs for stream and datagram UNIX domain sockets, and
  employ soreceive_dgram for the datagram case.

------------------------------------------------------------------------
r189041 | rwatson | 2009-02-25 23:26:16 +0900 (Wed, 25 Feb 2009) | 7 lines

Merge r188123 from head to stable/7:

  Remove written-to but never read local variable 'offset' from
  soreceive_dgram().

  Submitted by: Christoph Mallon <christoph dot mallon at gmx dot de>

------------------------------------------------------------------------
r189042 | rwatson | 2009-02-25 23:48:13 +0900 (Wed, 25 Feb 2009) | 8 lines

Merge 3188124 from head to stable/7:

  Remove local variable 'ddp' from DDP's attach and detach routines; they
  were used only for assertions, and rather than ifdef'ing them
  INVARIANTS and using local variables, just directly access so_pcb.

  Submitted by: Christoph Mallon <christoph dot mallon at gmx dot de>

------------------------------------------------------------------------
r189043 | rwatson | 2009-02-26 00:01:26 +0900 (Thu, 26 Feb 2009) | 8 lines

Merge r188312 from head to stable/7:

  Audit AUE_MAC_EXECVE; currently just the standard AUE_EXECVE arguments
  and not the label.

  Obtained from:        TrustedBSD Project
  Sponsored by: Apple, Inc.

------------------------------------------------------------------------
r189044 | rwatson | 2009-02-26 00:04:30 +0900 (Thu, 26 Feb 2009) | 23 lines

Merge r188485 from head to stable/7:

  Modify fdcopy() so that, during fork(2), it won't copy file descriptors
  from the parent to the child process if they have an operation vector
  of &badfileops.  This narrows a set of races involving system calls that
  allocate a new file descriptor, potentially block for some extended
  period, and then return the file descriptor, when invoked by a threaded
  program that concurrently invokes fork(2).  Similar approches are used
  in both Solaris and Linux, and the wideness of this race was introduced
  in FreeBSD when we moved to a more optimistic implementation of
  accept(2) in order to simplify locking.

  A small race necessarily remains because the fork(2) might occur after
  the finit() in accept(2) but before the system call has returned, but
  that appears unavoidable using current APIs.  However, this race is
  vastly narrower.

  The fix can be validated using the newfileops_on_fork regression test.

  PR:           kern/130348
  Reported by:  Ivan Shcheklein <shcheklein at gmail dot com>
  Reviewed by:  jhb, kib

------------------------------------------------------------------------
r189056 | emaste | 2009-02-26 05:56:27 +0900 (Thu, 26 Feb 2009) | 4 lines

MFC r177490 - diff reduction w/ head.

  Use linker set to collection all target operations.

------------------------------------------------------------------------
r189075 | jhb | 2009-02-27 00:59:22 +0900 (Fri, 27 Feb 2009) | 7 lines

MFC: Add support for "superpages" on amd64 and i386.  This includes adding the
superpage reservation system to the machine-independent VM system as well as
changes to the pmap code for amd64 and i386 to support superpages.

Reviewed by:	alc
Tested by:	ps

------------------------------------------------------------------------
r189079 | jhb | 2009-02-27 03:46:22 +0900 (Fri, 27 Feb 2009) | 2 lines

MFC: Sort getopt options alphabetically.

------------------------------------------------------------------------
r189080 | jhb | 2009-02-27 03:54:24 +0900 (Fri, 27 Feb 2009) | 3 lines

MFC: Add a new ioctl to fetch details about an individual BAR of a device
and add support for displaying BAR details via a new pciconf flag.

------------------------------------------------------------------------
r189081 | jhb | 2009-02-27 03:55:55 +0900 (Fri, 27 Feb 2009) | 2 lines

MFC: Don't clear the attribute cache of a file when it is closed.

------------------------------------------------------------------------
r189088 | jhb | 2009-02-27 05:38:37 +0900 (Fri, 27 Feb 2009) | 5 lines

MFC: Add a stub for pmap_align_superpage() on machines that don't (yet)
implement pmap-level support for superpages.

Pointy hat to:	jhb

------------------------------------------------------------------------
r189107 | jhb | 2009-02-28 00:25:47 +0900 (Sat, 28 Feb 2009) | 6 lines

Catch up to the 6GB KVA changes.  The original superpages patches on 7
were tested prior to the MFC of the 6GB KVA changes, and I failed to do
an extra sanity check yesterday.  This should fix the pmap_init() panics.

Pointy hat to:	jhb

------------------------------------------------------------------------
r189144 | trasz | 2009-02-28 19:24:57 +0900 (Sat, 28 Feb 2009) | 11 lines

MFC r186184:

Get rid of dead_sim.  There is no way to make it work - any attempt
to actually use it would panic on mtx operation, as dead_sim doesn't
have a proper mutex.  Even if it had a properly initialized mutex,
it wouldn't have properly locked and owned one.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189145 | trasz | 2009-02-28 19:27:46 +0900 (Sat, 28 Feb 2009) | 14 lines

MFC r186185:

Add SIM refcounting.  This is slightly different from what DragonFly
does - in DragonFly, it's cam_sim_release() what actually frees the
SIM; cam_sim_free does nothing more than calling cam_sim_release().
Here, we drain in cam_sim_free, waiting for refcount to drop to zero.
We cannot do the same think DragonFly does, because after cam_sim_free
returns, client would destroy the sim->mtx, and CAM would trip over
an initialized mutex.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189146 | trasz | 2009-02-28 19:29:55 +0900 (Sat, 28 Feb 2009) | 9 lines

MFC r186318:

Move mtx_assert lower, when we can be sure that the pointer
to the mutex is valid.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189147 | trasz | 2009-02-28 19:33:00 +0900 (Sat, 28 Feb 2009) | 8 lines

MFC r186319:

Periph driver fixes, second try.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189148 | trasz | 2009-02-28 19:35:30 +0900 (Sat, 28 Feb 2009) | 9 lines

MFC r186320:

Fix cam_sim_free() wakeup condition and add mtx_asserts.

Submitted by:	Christoph Mallon
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189149 | trasz | 2009-02-28 19:38:32 +0900 (Sat, 28 Feb 2009) | 10 lines

MFC r186905:
Make "kldunload atapicam" return EBUSY instead of deadlocking when a device
created by atapicam is being kept opened or mounted.  This is probably just
a temporary solution until we invent something better.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Reported by:	Jaakko Heinonen

------------------------------------------------------------------------
r189151 | trasz | 2009-02-28 19:40:52 +0900 (Sat, 28 Feb 2009) | 11 lines

MFC r187028:

Don't call destroy_dev(9) with a mutex held.  While here, shuffle
things around so the periph destructors look alike.  Based on a patch
by Jaakko Heinonen.

Submitted by:	Jaakko Heinonen
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189152 | trasz | 2009-02-28 19:43:10 +0900 (Sat, 28 Feb 2009) | 10 lines

MFC r187243:

Add missing 'break' statement.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3927

------------------------------------------------------------------------
r189154 | trasz | 2009-02-28 19:45:31 +0900 (Sat, 28 Feb 2009) | 10 lines

MFC r187244:

Remove unused variable.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3665

------------------------------------------------------------------------
r189155 | trasz | 2009-02-28 19:48:11 +0900 (Sat, 28 Feb 2009) | 10 lines

MFC r187245:

Fix use after free.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3712

------------------------------------------------------------------------
r189156 | trasz | 2009-02-28 19:50:59 +0900 (Sat, 28 Feb 2009) | 10 lines

MFC r187247.

Add missing 'break' statement.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		3667

------------------------------------------------------------------------
r189157 | trasz | 2009-02-28 19:53:20 +0900 (Sat, 28 Feb 2009) | 10 lines

MFC r187649:

Guard against NULL pointer dereference.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		130

------------------------------------------------------------------------
r189158 | trasz | 2009-02-28 19:59:48 +0900 (Sat, 28 Feb 2009) | 10 lines

MFC r187650:

Guard against NULL pointer dereference.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		1847

------------------------------------------------------------------------
r189159 | trasz | 2009-02-28 20:03:24 +0900 (Sat, 28 Feb 2009) | 10 lines

MFC r187651:

Don't leak memory when alloc fails.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Found with:	Coverity Prevent(tm)
CID:		2908

------------------------------------------------------------------------
r189160 | trasz | 2009-02-28 20:09:27 +0900 (Sat, 28 Feb 2009) | 8 lines

MFC r187652:

Protect against NULL pointer dereference.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189161 | trasz | 2009-02-28 20:11:38 +0900 (Sat, 28 Feb 2009) | 9 lines

MFC r188345:

Remove an overzealous check.

Submitted by:	das
Reviewed by:	scottl
Approved by:	rwatson (mentor, implicit)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189162 | trasz | 2009-02-28 20:16:57 +0900 (Sat, 28 Feb 2009) | 12 lines

MFC r186188:

Implement g_vfs_orphan().  Without it, the filesystem never closes
the device, which means refcount on periph drivers never drops,
which means cam_sim_free() never returns, which results in umass
sleeping there ad infinitum.

Submitted by:	pjd
Reviewed by:	scottl, pjd
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189163 | trasz | 2009-02-28 20:19:02 +0900 (Sat, 28 Feb 2009) | 9 lines

MFC r187053:

Prevent a panic that happens on SMP machines when removing a disk with
many writes queued up.

Reviewed by:	phk, scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189164 | trasz | 2009-02-28 20:20:37 +0900 (Sat, 28 Feb 2009) | 6 lines

MFC r188916:

Fix a typo and add manpage links to geom(4).

Approved by:	rwatson (mentor)

------------------------------------------------------------------------
r189165 | trasz | 2009-02-28 20:22:09 +0900 (Sat, 28 Feb 2009) | 6 lines

MFC r188917:

Mention disk_gone() in disk(9).

Approved by:	rwatson (mentor)

------------------------------------------------------------------------
r189210 | scottl | 2009-03-01 15:46:39 +0900 (Sun, 01 Mar 2009) | 2 lines

Merge r186891: Retry TEST UNIT READY if needed.

------------------------------------------------------------------------
r189211 | scottl | 2009-03-01 15:57:25 +0900 (Sun, 01 Mar 2009) | 2 lines

Merge 188570: Fix tag negotiation for pseudo-scsi devices and subsystems.

------------------------------------------------------------------------
r189212 | scottl | 2009-03-01 16:00:52 +0900 (Sun, 01 Mar 2009) | 2 lines

Merge 188670: Instrument the probe state machine

------------------------------------------------------------------------
r189213 | scottl | 2009-03-01 16:02:16 +0900 (Sun, 01 Mar 2009) | 2 lines

Merge 188688: GCC bogon.

------------------------------------------------------------------------
r189214 | scottl | 2009-03-01 16:03:35 +0900 (Sun, 01 Mar 2009) | 2 lines

Merge 188671: Fix negotiation for imperfect SCSI and pseudo-SCSI devices.

------------------------------------------------------------------------
r189215 | scottl | 2009-03-01 16:06:44 +0900 (Sun, 01 Mar 2009) | 2 lines

Merge 186396: Fix comment

------------------------------------------------------------------------
r189217 | scottl | 2009-03-01 16:16:50 +0900 (Sun, 01 Mar 2009) | 2 lines

Fix mergeinfo for cam_xpt.c

------------------------------------------------------------------------
r189218 | scottl | 2009-03-01 16:22:46 +0900 (Sun, 01 Mar 2009) | 2 lines

Merge 176204: Fix typo

------------------------------------------------------------------------
r189219 | scottl | 2009-03-01 16:24:26 +0900 (Sun, 01 Mar 2009) | 2 lines

Merge 188395: Fix "invalid periph name" error condition.

------------------------------------------------------------------------
r189224 | trasz | 2009-03-01 19:51:34 +0900 (Sun, 01 Mar 2009) | 32 lines

MFC r174937 by imp.

Reviewed by:	imp
Approved by:	rwatson (mentor)

Original commit log:

A partial solution to some of the 'pull the umass device with a
mounted FS' problems.  These are more along the lines of 'avoiding an
avoidable panic' than a complete solution to removable devices.  We
now close the barn door after the horse has gotten lose and has been
hit by a truck, as it were.  The barn no longer catches fire in this
case, but the horse is still dead :-).

The vfs_bio.c fix causes us not to put a failed write back into the
dirty pool if the error returned was ENXIO.  In that case, the buffer
is treated like any other clean buffer that's being retured.  ENXIO
means the device isn't there anymore and will never be there again in
the future, so retrying is futile.

The vfs_mount.c fix treats 'ENXIO' as success for unmounting a file
system.  If the device is gone, retrying later won't help and we'll
never be able to unmount the device.

These two are part of a larger patch set submitted by the author.  The
other patches will be forth coming.  I added comments to these two
patches.

Submitted by: Henrik Gulbrandsen
Reviewed by: phk@
PR: usb/46176 (partial)

------------------------------------------------------------------------
r189226 | trasz | 2009-03-01 20:02:37 +0900 (Sun, 01 Mar 2009) | 14 lines

MFC r186194:

According to phk@, VOP_STRATEGY should never, _ever_, return
anything other than 0.  Make it so.  This fixes
"panic: VOP_STRATEGY failed bp=0xc320dd90 vp=0xc3b9f648",
encountered when writing to an orphaned filesystem.  Reason
for the panic was the following assert:
KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp));
at vfs_bio:bufstrategy().

Reviewed by:	scottl, phk
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189227 | trasz | 2009-03-01 20:11:14 +0900 (Sun, 01 Mar 2009) | 9 lines

MFC r186911:

Don't panic with "vinvalbuf: dirty bufs" when the mounted device that was
being written to goes away.

Reviewed by:	kib, scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189228 | trasz | 2009-03-01 20:17:38 +0900 (Sun, 01 Mar 2009) | 10 lines

MFC r187199:

Turn a "panic: non-decreasing id" into an error printf.  This seems
to be caused by a metadata corruption that occurs quite often after
unplugging a pendrive during write activity.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189229 | trasz | 2009-03-01 20:20:35 +0900 (Sun, 01 Mar 2009) | 16 lines

MFC r188240:

When a device containing mounted UFS filesystem disappears, the type
of devvp becomes VBAD, which UFS incorrectly interprets as snapshot
vnode, which in turns causes panic.  Fix it by replacing '!= VCHR'
with '== VREG'.

With this fix in place, you should no longer be able to panic the system
by removing a device with an UFS filesystem mounted from it - assuming
you don't use softupdates.

Reviewed by:	kib
Tested by:	pho
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189235 | luigi | 2009-03-01 23:57:33 +0900 (Sun, 01 Mar 2009) | 6 lines

document the possibility of hardwiring kenv/getenv values;
remove duplicate isa and npx entries;
remove DEVICE_POLLING
add tap, bpf devices;
add re and nfe drivers

------------------------------------------------------------------------
r189236 | trasz | 2009-03-02 00:01:00 +0900 (Mon, 02 Mar 2009) | 9 lines

MFC r187894.  Note that r188501 should be merged too.

Make sure the cdev doesn't go away while the filesystem is still mounted.
Otherwise dev2udev() could return garbage.

Reviewed by:	kib
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation

------------------------------------------------------------------------
r189237 | luigi | 2009-03-02 00:03:08 +0900 (Mon, 02 Mar 2009) | 5 lines

sync the build script with the version in -current.
The most relevant changes are the building of libraries
in the --init call, and the ability to use /boot/loader
(on by default) which seems to be necessary for large kernels.

------------------------------------------------------------------------
r189239 | scottl | 2009-03-02 01:24:57 +0900 (Mon, 02 Mar 2009) | 2 lines

Merge 181381: Update SCSI opcodes and ASCs from t10.org.

------------------------------------------------------------------------
r189240 | scottl | 2009-03-02 01:26:38 +0900 (Mon, 02 Mar 2009) | 2 lines

Merge 181791: SCSI_DELAY is specified in milliseconds.

------------------------------------------------------------------------
r189241 | scottl | 2009-03-02 01:28:17 +0900 (Mon, 02 Mar 2009) | 2 lines

Merge 186371: Fix refcount locking in cd, pass, and sg periphs.

------------------------------------------------------------------------
r189242 | scottl | 2009-03-02 01:31:35 +0900 (Mon, 02 Mar 2009) | 2 lines

Merge 182433: Fix locking mistake in the da driver.

------------------------------------------------------------------------
r189243 | scottl | 2009-03-02 01:41:48 +0900 (Mon, 02 Mar 2009) | 3 lines

Merge 188844: Fix pseudo-scsi parameters so that more than one i/o can
be queued at a time.

------------------------------------------------------------------------
r189244 | scottl | 2009-03-02 01:43:45 +0900 (Mon, 02 Mar 2009) | 3 lines

Merge 188845: Fix pseudo-scsi parameters so that more than 2 commands
will be queued to the device at once.

------------------------------------------------------------------------
r189246 | scottl | 2009-03-02 01:50:46 +0900 (Mon, 02 Mar 2009) | 3 lines

Merge 188840: Add DDF metadata support, found commonly on motherboards with
Adaptec branding.  For Entertainment Purposes Only!

------------------------------------------------------------------------
r189253 | scottl | 2009-03-02 07:37:34 +0900 (Mon, 02 Mar 2009) | 3 lines

Merge 186882: Implement kern.cam.cd.retry_count to aid with disk-
recovery tools.

------------------------------------------------------------------------
r189255 | rwatson | 2009-03-02 07:48:18 +0900 (Mon, 02 Mar 2009) | 22 lines

Merge r187686 from head to stable/7:

  When a statically linked binary is executed (or at least, one without
  an interpreter definition in its program header), set the auxiliary
  ELF argument AT_BASE to 0 rather than to the address that we would
  have mapped the interpreter at if there had been one.

  The ELF ABI specifications appear to be ambiguous as to the desired
  behavior in this situation, as they define AT_BASE as the base address
  of the interpreter, but do not mention what to do if there is none.
  On Solaris, AT_BASE will be set to the base address of the static
  binary if there is no interpreter, and on Linux, AT_BASE is set to 0.
  We go with the Linux semantics as they are of more immediate utility
  and allow the early runtime environment to know that the kernel has
  not mapped an interpreter, but because AT_PHDR points at the ELF
  header for the running binary, it is still possible to retrieve all
  required mapping information when the process starts should it be
  required.  Either approach would be preferable to our current behavior
  of passing a pointer to an unmapped region of user memory as AT_BASE.

  Sponsored by:	Google

------------------------------------------------------------------------
r189258 | rwatson | 2009-03-02 08:17:51 +0900 (Mon, 02 Mar 2009) | 8 lines

Merge r188313 from head to stable/7:

  Change various routines that are responsible for transforming audit
  event IDs based on arguments to return au_event_t rather than int.

  Obtained from:        TrustedBSD Project
  Sponsored by: Apple, Inc.

------------------------------------------------------------------------
r189259 | rwatson | 2009-03-02 08:32:27 +0900 (Mon, 02 Mar 2009) | 8 lines

Merge r188315 from head to stable/7:

  Set the lower bound on queue size for an audit pipe to 1 instead of 0,
  as an audit pipe with a queue length of 0 is less useful.

  Obtained from:        TrustedBSD Project
  Sponsored by:         Apple, Inc.

------------------------------------------------------------------------
r189281 | vanhu | 2009-03-03 01:55:19 +0900 (Tue, 03 Mar 2009) | 8 lines

MFC: Remove remain <= MHLEN restriction in m_makespace(),
which caused assert with big packets

PR:		kern/124609
Submitted by:	fabien.thomas@netasq.com
Approved by:	gnn(mentor)
Obtained from:	NetBSD

------------------------------------------------------------------------
r189297 | mav | 2009-03-03 16:56:42 +0900 (Tue, 03 Mar 2009) | 4 lines

MFC rev. 186079, 188829, 188922, 188959.

Sync with HEAD.

------------------------------------------------------------------------
r189299 | mav | 2009-03-03 17:14:43 +0900 (Tue, 03 Mar 2009) | 10 lines

MFC rev. 188700, 188731, 188733.

Make core dumping to ad not to freeze even if interrupts, not disabled
for some reason (noticed on SMP), stealing our events.

ata_interrupt() does not need to return anything. It is not it's business
to report request completion, expecially when it is not reliable.

PR:		kern/114370, kern/115801

------------------------------------------------------------------------
r189307 | jhb | 2009-03-04 01:56:15 +0900 (Wed, 04 Mar 2009) | 4 lines

MFC: Use a clean slate of register state when executing hardware interrupt
handlers to avoid leaking values into the upper 16-bits of general purpose
registers when executing these routines.

------------------------------------------------------------------------
r189334 | yongari | 2009-03-04 10:50:00 +0900 (Wed, 04 Mar 2009) | 2 lines

Enable ale(4) in GENERIC.

------------------------------------------------------------------------
r189370 | netchild | 2009-03-05 05:26:39 +0900 (Thu, 05 Mar 2009) | 7 lines

MFC r188572:
  Fix an edge-case of the linux readdir: We need the size of a linux dirent
  structure, not the size of a pointer to it.

  PR:		131099
  Submitted by:	Andreas Kies <andikies@gmail.com>

------------------------------------------------------------------------
r189375 | jhb | 2009-03-05 06:38:16 +0900 (Thu, 05 Mar 2009) | 3 lines

MFC: Handle an additional layer of nesting for kernel modules to make it
easier to compile 8.x kernels with modules on 7.

------------------------------------------------------------------------
r189393 | luigi | 2009-03-05 16:42:47 +0900 (Thu, 05 Mar 2009) | 14 lines

Merge a couple of changes from HEAD, plus fix a potential warning.
In detail:
+ we used SYSCTL_LONG to show a 64-bit variable. For the time being
  just remove the variable from the list of sysctl-exported values.
  Unfortunately our SYSCTL macros do not do proper type checking
  of the arguments so we might have some more bugs of this kind
  across the codebase;

+ fw_debug has not been used for ages, so remove it;

+ gcc 4.2.4 tells me that src_ip.s_addr may be not initialized,
  so make sure it is.
  I need to check what is the status of this field in head.

------------------------------------------------------------------------
r189402 | jhb | 2009-03-06 00:46:41 +0900 (Fri, 06 Mar 2009) | 2 lines

MFC: Don't throw away the upper 32-bits of the HT MSI address window.

------------------------------------------------------------------------
r189413 | emax | 2009-03-06 02:54:28 +0900 (Fri, 06 Mar 2009) | 5 lines

MFC r183057

Add missing prototypes for uuid_enc,dec_le,be() functions.
Pointy hat goes to me.

------------------------------------------------------------------------
r189414 | emax | 2009-03-06 03:03:46 +0900 (Fri, 06 Mar 2009) | 13 lines

MFC r187938
Add btpand(8) daemon from NetBSD. This daemon provides support for
Bluetooth Network Access Point (NAP), Group Ad-hoc Network (GN) and
Personal Area Network User (PANU) profiles.

MFC r188013
Fix client mode. Pick up service availability changes.

MFC r188014
Hook up btpand(8) to the build

Obtained from:	NetBSD

------------------------------------------------------------------------