]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
14 years agoRemove an extra 'S' that snuck in.
kensmith [Wed, 30 Sep 2009 12:53:21 +0000 (12:53 +0000)]
Remove an extra 'S' that snuck in.

Submitted by: danfe
Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197642 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoUpdate description of debugging support.
kensmith [Tue, 29 Sep 2009 19:57:06 +0000 (19:57 +0000)]
Update description of debugging support.

Submitted by: ivoras (but heavily modified)
Pointy hat: me
Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197297
dougb [Tue, 29 Sep 2009 18:44:34 +0000 (18:44 +0000)]
MFC r197297

Add a knob to show 'Starting foo:' messages when faststart is used,
such as at boot time.

MFC 197619

By popular acclaim, enable "Starting foo:" messages by default

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197620 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMention 802.11s D3.03 support.
rpaulo [Tue, 29 Sep 2009 12:20:10 +0000 (12:20 +0000)]
Mention 802.11s D3.03 support.

Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197615 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoUpdate 802.11s mesh support to draft 3.03. This includes a revised frame
rpaulo [Tue, 29 Sep 2009 12:18:23 +0000 (12:18 +0000)]
Update 802.11s mesh support to draft 3.03. This includes a revised  frame
format for peering and changes to the PERR frames.
Note that this is incompatible with the previous code.

Reviewed by: sam
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197614 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197287, r197289, r197351, r197426, r197458, r197459, r197497, r197498,
pjd [Tue, 29 Sep 2009 10:53:06 +0000 (10:53 +0000)]
MFC r197287, r197289, r197351, r197426, r197458, r197459, r197497, r197498,
r197512, r197513, r197514, r197515, r197525:

r197287:

Purge namecache for the file system being rolled back, so it doesn't point at
invalid vnodes after the rollback resulting in EIO errors when trying to access
files which are in the namecache.

Reported by: des

r197289:

Purge file system namecache when receiving incremental stream and rolling back
to it.

r197351:

Purge namecache in the same place OpenSolaris does.

r197426:

Restore BSD behaviour - when creating new directory entry use parent directory
gid to set group ownership and not process gid.

This was overlooked during v6 -> v13 switch.

PR: kern/139076
Reported by: Sean Winn <sean@gothic.net.au>

r197458:

Close race in zfs_zget(). We have to increase usecount first and then
check for VI_DOOMED flag. Before this change vnode could be reclaimed
between checking for the flag and increasing usecount.

r197459:

Before calling vflush(FORCECLOSE) mark file system as unmounted so the
following vnops will fail. This is very important, because without this change
vnode could be reclaimed at any point, even if we increased usecount. The only
way to ensure that vnode won't be reclaimed was to lock it, which would be very
hard to do in ZFS without changing a lot of code. With this change simply
increasing usecount is enough to be sure vnode won't be reclaimed from under
us. To be precise it can still be reclaimed but we won't be able to see it,
because every try to enter ZFS through VFS will result in EIO.

The only function that cannot return EIO, because it is needed for vflush() is
zfs_root(). Introduce ZFS_ENTER_NOERROR() macro that only locks
z_teardown_lock and never returns EIO.

r197497:

Switch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to
be a bit weak and OpenSolaris also switched to fletcher4.

r197498: head/cddl/contrib/opensolaris

Fletcher4 is not the default checksum algorithm.

r197512:

- Don't depend on value returned by gfs_*_inactive(), it doesn't work
  well with forced unmounts when GFS vnodes are referenced.
- Make other preparations to GFS for forced unmounts.

PR: kern/139062
Reported by: trasz

r197513:

Use traverse() function to find and return mount point's vnode instead of
covered vnode when snapshot is already mounted.

r197514:

On lookup error VFS expects *vpp to be set to NULL, be sure to do that.

r197515:

Handle cases where virtual (GFS) vnodes are referenced when doing forced
unmount. In that case we cannot depend on the proper order of invalidating
vnodes, so we have to free resources when we have a chance.

PR: kern/139062
Reported by: trasz

r197525:

Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object.
This completes the fix from r185586.

PR: kern/139059
Reported by: Daniel Braniss <danny@cs.huji.ac.il>
Submitted by: Jaakko Heinonen <jh@saunalahti.fi>
Tested by: Daniel Braniss <danny@cs.huji.ac.il>

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197613 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197395: Improve mxge watchdog routine's ability to reliably reset a failed NIC
gallatin [Mon, 28 Sep 2009 23:48:16 +0000 (23:48 +0000)]
MFC 197395: Improve mxge watchdog routine's ability to reliably reset a failed NIC

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197607 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197341.
tuexen [Mon, 28 Sep 2009 18:32:28 +0000 (18:32 +0000)]
MFC r197341.
Fix errnos.

Approved by: re (bz), rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197582 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197390:
kib [Mon, 28 Sep 2009 11:31:21 +0000 (11:31 +0000)]
MFC r197390:
Remove forward_roundrobin().

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197576 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197401
marius [Fri, 25 Sep 2009 19:59:18 +0000 (19:59 +0000)]
MFC: r197401

- According to Linux, the ALi M5451 can do 31-bit DMA instead of just
  30-bit like the reset of the controllers supported by this driver.
  Actually ALi M5451 can be setup up to generate 32-bit addresses by
  setting the 31st bit via the accompanying ISA bridge, which allows
  it to work in sparc64 machines whose IOMMU require at least 32-bit
  DMA. Even though other architectures would also benefit from 32-bit
  DMA, enabling this bit is limited to sparc64 as bus_dma(9) doesn't
  generally guarantee that a low address of BUS_SPACE_MAXADDR_32BIT
  results in a buffer in the 32-bit range.
- According to Tatsuo YOKOGAWA's ali(4), the the DMA transfer size of
  ALi M5451 is fixed to 64k and in fact using the default size of 4k
  causes the chip to overrun the mapping, triggering uncorrectable
  DMA errors on sparc64.
- The 4DWAVE DX and NX require the recording buffer to be 8-byte
  aligned so adjust the bus_dma_tag_create(9) accordingly.
- Unlike the rest of the controllers supported by this driver, the
  ALi M5451 only has 32 hardware channels instead of 64 so limit the
  loop in tr_intr() accordingly. [1]

Submitted by: yongari [1]
Reviewed by: yongari (superset of what is committed)
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197502 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoRemove constraint, requiring request data to fulfill controller's
mav [Fri, 25 Sep 2009 18:07:23 +0000 (18:07 +0000)]
Remove constraint, requiring request data to fulfill controller's
alignment requirements. It is busdma task, to manage proper alignment by
loading data to bounce buffers.

PR: kern/127316
Reviewed by: current@
Tested by: Ryan Rogers
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197495 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev. 197462:
mav [Fri, 25 Sep 2009 18:04:55 +0000 (18:04 +0000)]
MFC rev. 197462:
Do not call BUS_DRIVER_ADDED() for detached buses (attach failed) on
driver load. This fixes crash on atapicam module load on systems, where
some ata channels (usually ata1) was probed, but failed to attach.

Reviewed by:    jhb, imp
Tested by:      many
Approved by:    re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197494 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC rev 197449:
marcel [Fri, 25 Sep 2009 17:48:30 +0000 (17:48 +0000)]
MFC rev 197449:
Don't create more partitions than can fit in the table by checking
that the index is within bounds.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197491 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago- Add missing bus_dmamap_sync(9) calls for the work DMA map. Previously
marius [Fri, 25 Sep 2009 16:45:27 +0000 (16:45 +0000)]
- Add missing bus_dmamap_sync(9) calls for the work DMA map. Previously
  the work area was totally unsynchronized which means this driver only
  had a chance of working on x86 when no bounce buffers were involved,
  which isn't that likely given that support for 64-bit DMA is currently
  broken throughout ata(4).
- Add necessary little-endian conversion of accesses to the work area,
  making this driver work on big-endian hosts. While at it, use the
  alignment-agnostic byte order encoders in order to be on the safe side.
- Clear the reserved member of the SG list entries in order to be on the
  safe side. [1]

Submitted by: yongari [1]
Reviewed by: yongari
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197488 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197415:
jhb [Fri, 25 Sep 2009 15:14:11 +0000 (15:14 +0000)]
MFC 197415:
The elements in the component arrays may be direct Package objects rather
than references to objects.  In that case, simply use the Package directly.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197410:
jhb [Fri, 25 Sep 2009 15:08:26 +0000 (15:08 +0000)]
MFC 197410:
- Split the logic to parse an SMAP entry out into a separate function on
  amd64 similar to i386.  This fixes a bug on amd64 where overlapping
  entries would not cause the SMAP parsing to stop.
- Change the SMAP parsing code to do a sorted insertion into physmap[]
  instead of an append to support systems with out-of-order SMAP entries.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197406:
jhb [Fri, 25 Sep 2009 14:58:00 +0000 (14:58 +0000)]
MFC 197406:
Don't reread the command register to see if enabling I/O or memory
decoding "took".  Other OS's that I checked do not do this and it breaks
some amdpm(4) devices.  Prior to 7.2 we did not honor the error returned
when this failed anyway, so this in effect restores previous behavior.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196990:
brooks [Thu, 24 Sep 2009 21:35:13 +0000 (21:35 +0000)]
MFC r196990:
cr_groups is no longer embedded in struct ucred and is instead stored
in a seperate array.  As such we need to use kvm_read rather than bcopy
to populate the ki_groups field.

This fixes a crash when running ps -ax on a coredump.

Reported by: brucec
Tested by: brucec
MFC after: 3 days
Approved by: re@ (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197474 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197269:
brooks [Thu, 24 Sep 2009 21:32:56 +0000 (21:32 +0000)]
MFC r197269:
Allocate space for the group array in a static credential used in
the quota code.  One case was correctly handled in r194498, but
this one was missed.

PR: kern/138657
Tested by: PR submitter
MFC after: 3 days
Approved by: re@ (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197473 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197259
sepotvin [Thu, 24 Sep 2009 20:43:08 +0000 (20:43 +0000)]
MFC r197259

The buffer returned by fgetln is not a "C" string and might not be NUL
terminated. Make sure that it is before using it.

Reviewed by:    marck@
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197322 and r197374
nyan [Thu, 24 Sep 2009 15:34:18 +0000 (15:34 +0000)]
MFC: r197322 and r197374

  Revision: 197322
  Log:
    Correct BIOS header sanitizing on pc98.

  Revision: 197374
  Log:
    Disable a check on a disk size because it's too strict.  This change is
    to avoid using incorrect geometry.

   It seems that this is the same problem in g_part_bsd_read()@g_part_bsd.c.

   Reviewed by: rink

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197457 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197445:
attilio [Thu, 24 Sep 2009 08:35:17 +0000 (08:35 +0000)]
MFC r197445:
Let fall down in the hard path (thus handling shared waiters wakeup
correctly) for the shared waiters also in the rwlock held in shared mode
as well, fixing possible deadlocks.

Please note that this is a special condition as we want this fix in
before RC2 as we assume it is critical and so it has been handled
as an instant-merge.  For the STABLE_7 branch, 1 week before the MFC
is assumed.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197452 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197350:
jhb [Wed, 23 Sep 2009 15:56:09 +0000 (15:56 +0000)]
MFC 197350:
Re-remove the IBM0057 ID used for PS/2 mouse controllers.  The asl for the
61p includes the hotkey device as IBM0068 and the mouse as IBM0057 similar
to other systems.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197440 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197348:
kib [Wed, 23 Sep 2009 13:49:41 +0000 (13:49 +0000)]
MFC r197348:
For a.out and pre-8 ELF binaries, allow the mmap of zero length.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197431 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197368
marius [Wed, 23 Sep 2009 10:12:58 +0000 (10:12 +0000)]
MFC: r197368

- Update the list of known-working machines based on feedback for 7.2.
- Update the V440 entry regarding added support for the on-board NICs
  in 8.0.

Approved by: re (kib), blackend

git-svn-id: svn://svn.freebsd.org/base/stable/8@197427 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197190:
rpaulo [Tue, 22 Sep 2009 20:31:32 +0000 (20:31 +0000)]
MFC 197190:
 Make the sudden motion sensor work on older models and add a bit of
 debugging.

 Submitted by: Christoph Langguth <christoph at rosenkeller.org>

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197417 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoAdd missing mergeinfo for MFC of r196588.
blackend [Mon, 21 Sep 2009 06:47:00 +0000 (06:47 +0000)]
Add missing mergeinfo for MFC of r196588.

Pointy Hat: blackend
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197378 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197364
qingli [Sun, 20 Sep 2009 17:46:56 +0000 (17:46 +0000)]
MFC r197364

A wrong variable is used when setting up the interface
address route, which broke source address selection in
some code paths.

Submitted by: noted by bz
Reviewed by: hrs
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMove mergeinfo for 197260-197263 up to sys/.
jhb [Sat, 19 Sep 2009 15:48:59 +0000 (15:48 +0000)]
Move mergeinfo for 197260-197263 up to sys/.

Approved by: re (mergeinfo blanket)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197329 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197099: pci(4): don't perform maximum register number check
avg [Sat, 19 Sep 2009 08:13:10 +0000 (08:13 +0000)]
MFC r197099: pci(4): don't perform maximum register number check

Different sub-kinds of PCI buses may have different rules and
thus it is up for the bus backends to do proper input checks.
For example, PCIe allows configuration register numbers < 0x1000,
while for PCI proper the limit is 0x100.
And, in fact, the buses already do the checks.

Reviewed by: jhb
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197080
nwhitehorn [Sat, 19 Sep 2009 01:49:36 +0000 (01:49 +0000)]
MFC r197080

Add a few SCSI controllers to GENERIC that can be found in Powermacs.
This allows installation onto SCSI disks as shipped, for example,
as an option with the Powermac G3.

PR: powerpc/138543
Reviewed by: grehan
Approved by: re (kib)
Obtained from: sparc64

git-svn-id: svn://svn.freebsd.org/base/stable/8@197321 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196993
nwhitehorn [Sat, 19 Sep 2009 01:48:12 +0000 (01:48 +0000)]
MFC r196993

Remove some debugging (KTR_VERBOSE) that crept into ppc GENERIC long ago
and is present on no other architectures by default.

Reviewed by: grehan
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge change r197208 from head to stable/8:
ken [Fri, 18 Sep 2009 20:35:05 +0000 (20:35 +0000)]
Merge change r197208 from head to stable/8:

Fix some instances where CAM rescans get hung up or take a long time to
complete.

Also, allow xpt_rescan() to rescan a LUN instead of a full bus.

Sponsored by: Copan Systems, Inc.
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r197156
nyan [Thu, 17 Sep 2009 14:12:21 +0000 (14:12 +0000)]
MFC: r197156

  MFi386:

  Move the loader's entry point to 0x200000.  This change is also needed
  for pc98.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197282 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoGet ready for 8.0-RC1 builds.
kensmith [Thu, 17 Sep 2009 14:05:06 +0000 (14:05 +0000)]
Get ready for 8.0-RC1 builds.

Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC revs 197129,197130,197132:
bms [Thu, 17 Sep 2009 13:41:59 +0000 (13:41 +0000)]
MFC revs 197129,197130,197132:
 Fixes to mcast userland API.
--
  Fix an API issue in leave processing for IPv4 multicast groups.
   * Do not assume that the group lookup performed by imo_match_group()
     is valid when ifp is NULL in this case.
   * Instead, return EADDRNOTAVAIL if the ifp cannot be resolved for the
     membership we are being asked to leave.

  Caveat user:
   * The way IPv4 multicast memberships are implemented in the inpcb layer
     at the moment, has the side-effect that struct ip_moptions will
     still hold the membership, under the old ifp, until ip_freemoptions()
     is called for the parent inpcb.
   * The underlying issue is: the inpcb layer does not get notification
     of ifp being detached going away in a thread-safe manner.
     This is non-trivial to fix.
--
  Fix an obvious logic error in the IPv4 multicast leave processing,
  where the filter mode vector was not updated correctly after the leave.
--
  Tighten input checking in inp_join_group():
   * Don't try to use the source address, when its family is unspecified.
   * If we get a join without a source, on an existing inclusive
     mode group, this is an error, as it would change the filter mode.

  Fix a problem with the handling of in_mfilter for new memberships:
   * Do not rely on imf being NULL; it is explicitly initialized to a
     non-NULL pointer when constructing a membership.
   * Explicitly initialize *imf to EX mode when the source address
     is unspecified.
  This fixes a problem with in_mfilter slot recycling in the join path.
--
  Don't allow joins w/o source on an existing group.
  This is almost always pilot error.

  We don't need to check for group filter UNDEFINED state at t1,
  because we only ever allocate filters with their groups, so we
  unconditionally reject such calls with EINVAL.
  Trying to change the active filter mode w/o going through IP_MSFILTER
  is also disallowed.

  Deals with the case described in PR 137164 upfront, cumulative
  with the fix in svn rev 197132 which only calls imo_match_source()
  if the source address family was not unspecified.
--

Revision 197136 has a text conflict, however it is a comment only change.

PR: 137164, 138689, 138690, 138691
Submitted by: Stef Walter (with fixups)
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197280 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197077: pci: remove definitions of duplicate constants
avg [Thu, 17 Sep 2009 12:41:27 +0000 (12:41 +0000)]
MFC r197077: pci: remove definitions of duplicate constants

Suggested by: jhb
Reviewed by: jhb
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197270 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197176:
zec [Thu, 17 Sep 2009 11:03:37 +0000 (11:03 +0000)]
MFC r197176:

  Lock the ifnet list while iterating over it.

  Submitted by: julian
  MFC after:    3 days

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197267 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196962: Fix /usr/bin/unzip: A bug deep in libarchive's read-ahead logic
kientzle [Thu, 17 Sep 2009 06:31:59 +0000 (06:31 +0000)]
MFC r196962: Fix /usr/bin/unzip: A bug deep in libarchive's read-ahead logic
(incorrect handling of zero-length reads before the copy buffer is
allocated) is masked by the iso9660 taster.  Tar and cpio both enable
that taster so were protected from the bug; unzip is susceptible.

This both fixes the bug and updates the test harness to exercise
this case.

Submitted by: Ed Schouten diagnosed the bug and drafted a patch
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge rev 197263:
scottl [Thu, 17 Sep 2009 05:30:55 +0000 (05:30 +0000)]
Merge rev 197263:

- Enable MSI support (MSIX support was already present)
- Performance improvements

Approved by: re
Obtained from: Yahoo!

git-svn-id: svn://svn.freebsd.org/base/stable/8@197265 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMerge r197260, r197261, r197262
scottl [Thu, 17 Sep 2009 05:27:32 +0000 (05:27 +0000)]
Merge r197260, r197261, r197262

- Prevent a panic on modern controllers by increasing CISS_MAX_PHYSTGT to 256
- Fix MSI and PERFORMANT interrupt programming.  Fixes hang on boot.
- Fix locking bugs in ioctl handler

Most of this has been soaking at Yahoo for several months, if not longer.  The
quick MFC is due to the impending 8.0-RC1 build.

Approved by: re
Obtained from: Yahoo!

git-svn-id: svn://svn.freebsd.org/base/stable/8@197264 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197257:
tuexen [Wed, 16 Sep 2009 14:47:50 +0000 (14:47 +0000)]
MFC 197257:
Fix a bug reported by Daniel Mentz:
When authenticating DATA chunks some DATA chunks
might get stuck when the MTU gets decreased via
an ICMP message.

Approved by: re, rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoFixes two bugs:
tuexen [Wed, 16 Sep 2009 13:44:12 +0000 (13:44 +0000)]
Fixes two bugs:
1) A lock issue, if we ever had to try again
   we would double lock the INP lock.
2) We were allowing (at wrap) associd 0... which really
   we cannot allow since 0 normally means in most socket
   API calls that we are wishing to effect something on
   the INP not TCB.

Approved by: re, rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197256 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197049:
kib [Wed, 16 Sep 2009 13:24:37 +0000 (13:24 +0000)]
MFC r197049:
Calculate the amount of bytes to copy for select filedescriptor masks
taking into account size of fd_set for the current process ABI.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196531-196534,196536
raj [Wed, 16 Sep 2009 12:07:58 +0000 (12:07 +0000)]
MFC r196531-196534,196536

Clean up Marvell platform code.

Introduce SheevaPlug support.

   - The device is based on Marvell 88F6281 system on chip.
   - More info about the platform at http://www.plugcomputer.org

   - To build the FreeBSD kernel:
     make buildkernel TARGET_ARCH=arm KERNCONF=SHEEVAPLUG

   - Installation notes at: http://wiki.freebsd.org/FreeBSDMarvell

Submitted by: Michal Hajduk
Approved by: re (kib)
Obtained from: Semihalf

git-svn-id: svn://svn.freebsd.org/base/stable/8@197251 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197227
qingli [Tue, 15 Sep 2009 22:46:06 +0000 (22:46 +0000)]
MFC r197227

Self pointing routes are installed for configured interface addresses
and address aliases. After an interface is brought down and brought
back up again, those self pointing routes disappeared. This patch
ensures after an interface is brought back up, the loopback routes
are reinstalled properly.

Reviewed by: bz
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@197239 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197225
qingli [Tue, 15 Sep 2009 22:37:17 +0000 (22:37 +0000)]
MFC r197225

This patch enables the node to respond to ARP requests for
configured proxy ARP entries.

Reviewed by: bz
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@197238 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197210, 197212, 197235
qingli [Tue, 15 Sep 2009 22:25:19 +0000 (22:25 +0000)]
MFC r197210, 197212, 197235

The bootp code installs an interface address and the nfs client
module tries to install the same address again. This extra code
is removed, which was discovered by the removal of a call to
in_ifscrub() in r196714. This call to in_ifscrub is put back here
because the SIOCAIFADDR command can be used to change the prefix
length of an existing alias.

r197235 reverts file nfs_vfsops.c

Reviewed by: kmacy
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@197237 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoecorde merge for MFC of r197224, done in r197228.
attilio [Tue, 15 Sep 2009 20:28:29 +0000 (20:28 +0000)]
ecorde merge for MFC of r197224, done in r197228.

Requested by: kib
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197233 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoRecord merge for MFC of r197223, done in r197226.
attilio [Tue, 15 Sep 2009 20:21:10 +0000 (20:21 +0000)]
Record merge for MFC of r197223, done in r197226.

Requested by: kib
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197232 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196714
qingli [Tue, 15 Sep 2009 19:58:33 +0000 (19:58 +0000)]
MFC r196714

This patch fixes the following issues:

- Routing messages are not generated when adding and removing
  interface address aliases.
- Loopback route installed for an interface address alias is
  not deleted from the routing table when that address alias
  is removed from the associated interface.
- Function in_ifscrub() is called extraneously.

Reviewed by: gnn, kmacy, sam
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@197231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r196588
blackend [Tue, 15 Sep 2009 19:56:35 +0000 (19:56 +0000)]
MFC: r196588

Log:
  Update some comments to match the removal of the docset compilation
  during the release build.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197230 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197203
qingli [Tue, 15 Sep 2009 19:38:29 +0000 (19:38 +0000)]
MFC r197203

Previously local end of point-to-point interface is not reachable
within the system that owns the interface. Packets destined to
the local end point leak to the wire towards the default gateway
if one exists. This behavior is changed as part of the L2/L3
rewrite efforts. The local end point is now reachable within the
system. The inpcb code needs to consider this fact during the
address selection process.

Reviewed by: bz
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/stable/8@197229 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197224:
attilio [Tue, 15 Sep 2009 19:24:18 +0000 (19:24 +0000)]
MFC r197224:
Use explicit int values for the device states in order to allow, if
necessary, in the future, adds of new states without breaking ABI
between revisions.

Please note that this is a special condition as we want this fix in
before RC1 as we assume it is critical and so it has been handled
as an instant-merge.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197228 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197223:
attilio [Tue, 15 Sep 2009 19:14:25 +0000 (19:14 +0000)]
MFC r197223:
Fix sched_switch_migrate() by assuming locks cannot be shared and a
deadlock between 3 different threads by acquiring both runqueue locks
when doing the migration.

Please note that this is a special condition as we want this fix in
before RC1 as we assume it is critical and so it has been handled
as an instant-merge.  For the STABLE_7 branch, 1 week before the MFC
is assumed.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197226 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196888:
kib [Tue, 15 Sep 2009 12:51:22 +0000 (12:51 +0000)]
MFC r196888:
The clear_remove() and clear_inodedeps() call vn_start_write(NULL, &mp,
V_NOWAIT) on the non-busied mount point. Unmount might free ufs-specific
mp data, causing ffs_vgetf() to access freed memory.

Busy mountpoint before dropping softdep lk.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197218:
pjd [Tue, 15 Sep 2009 12:21:06 +0000 (12:21 +0000)]
MFC r197218:

We believe ZFS is ready for production use. Remove a warning about it being
experimental. :)

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197221 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197219:
pjd [Tue, 15 Sep 2009 12:19:34 +0000 (12:19 +0000)]
MFC r197219:

Forced unmounts work just fine in my tests under heavy load. There might
still be a problem, but it isn't worth a warning.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197220 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196822, r196823, r196824:
pjd [Tue, 15 Sep 2009 11:23:59 +0000 (11:23 +0000)]
MFC r196822, r196823, r196824:

Remove 'ad:' prefix from disk serial number. We don't want serial number
to change when we reconnect the disk in a way that it is accessible through
CAM for example.

Discussed with: trasz

Simplify g_disk_ident_adjust() function and allow any printable character
in serial number.

Discussed with: trasz
Obtained from: Wheel Sp. z o.o. (http://www.wheel.pl)

Make serial numbers of daX disks visible by GEOM.

No objections from: scottl
Obtained from: Wheel Sp. z o.o. (http://www.wheel.pl)

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197217 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197039, r197040:
pjd [Tue, 15 Sep 2009 11:20:23 +0000 (11:20 +0000)]
MFC r197039, r197040:

Fix usecount leak in mknod(2) on file system exported over NFS.

While I'm here, correct typo in comment.

Reviewed by: kan, kib
Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197216 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196456,r196457,r196458,r196662,r196702,r196703,r196919,r196927,r196928,
pjd [Tue, 15 Sep 2009 11:13:40 +0000 (11:13 +0000)]
MFC r196456,r196457,r196458,r196662,r196702,r196703,r196919,r196927,r196928,
r196943,r196944,r196947,r196950,r196953,r196954,r196965,r196978,r196979,
r196980,r196982,r196985,r196992,r197131,r197133,r197150,r197151,r197152,
r197153,r197167,r197172,r197177,r197200,r197201:

r196456:
- Give minclsyspri and maxclsyspri real values (consulted with kmacy).
- Honour 'pri' argument for thread_create().

r196457:
Set priority of vdev_geom threads and zvol threads to PRIBIO.

r196458:
- Hide ZFS kernel threads under zfskern process.
- Use better (shorter) threads names:
'zvol:worker zvol/tank/vol00' -> 'zvol tank/vol00'
'vdev:worker da0' -> 'vdev da0'

r196662:
Add missing mountpoint vnode locking.
This fixes panic on assertion with DEBUG_VFS_LOCKS and vfs.usermount=1 when
regular user tries to mount dataset owned by him.

r196702:
Remove empty directory.

r196703:
Backport the 'dirtying dbuf' panic fix from newer ZFS version.

Reported by: Thomas Backman <serenity@exscape.org>

r196919:
bzero() on-stack argument, so mutex_init() won't misinterpret that the
lock is already initialized if we have some garbage on the stack.

PR: kern/135480
Reported by: Emil Mikulic <emikulic@gmail.com>

r196927:
Changing provider size is not really supported by GEOM, but doing so when
provider is closed should be ok.
When administrator requests to change ZVOL size do it immediately if ZVOL
is closed or do it on last ZVOL close.

PR: kern/136942
Requested by: Bernard Buri <bsd@ask-us.at>

r196928:
Teach zdb(8) how to obtain GEOM provider size.

PR: kern/133134
Reported by: Philipp Wuensche <cryx-freebsd@h3q.com>

r196943:
- Avoid holding mutex around M_WAITOK allocations.
- Add locking for mnt_opt field.

r196944:
Don't recheck ownership on update mount. This will eliminate LOR between
vfs_busy() and mount mutex. We check ownership in vfs_domount() anyway.

Noticed by: kib
Reviewed by: kib

r196947:
Defer thread start until we set priority.

Reviewed by: kib

r196950:
Fix detection of file system being shared. Now zfs unshare/destroy/rename
command will properly remove exported file systems.

r196953:
When snapshot mount point is busy (for example we are still in it)
we will fail to unmount it, but it won't be removed from the tree,
so in that case there is no need to reinsert it.

Reported by: trasz

r196954:
If we have to use avl_find(), optimize a bit and use avl_insert() instead of
avl_add() (the latter is actually a wrapper around avl_find() + avl_insert()).
Fix similar case in the code that is currently commented out.

r196965:
Fix reference count leak for a case where snapshot's mount point is updated.

r196978:
Call ZFS_EXIT() after locking the vnode.

r196979:
On FreeBSD we don't have to look for snapshot's mount point,
because fhtovp method is already called with proper mount point.

r196980:
When we automatically mount snapshot we want to return vnode of the mount point
from the lookup and not covered vnode. This is one of the fixes for using .zfs/
over NFS.

r196982:
We don't export individual snapshots, so mnt_export field in snapshot's
mount point is NULL. That's why when we try to access snapshots over NFS
use mnt_export field from the parent file system.

r196985:
Only log successful commands! Without this fix we log even unsuccessful
commands executed by unprivileged users. Action is not really taken, but it is
logged to pool history, which might be confusing.

Reported by: Denis Ahrens <denis@h3q.com>

r196992:
Implement __assert() for Solaris-specific code. Until now Solaris code was
using Solaris prototype for __assert(), but FreeBSD's implementation.
Both take different arguments, so we were either core-dumping in assert()
or printing garbage.

Reported by: avg

r197131:
Tighten up the check for race in zfs_zget() - ZTOV(zp) can not only contain
NULL, but also can point to dead vnode, take that into account.

PR: kern/132068
Reported by: Edward Fisk <7ogcg7g02@sneakemail.com>, kris
Fix based on patch from: Jaakko Heinonen <jh@saunalahti.fi>

r197133:
- Protect reclaim with z_teardown_inactive_lock.
- Be prepared for dbuf to disappear in zfs_reclaim_complete() and check if
  z_dbuf field is NULL - this might happen in case of rollback or forced
  unmount between zfs_freebsd_reclaim() and zfs_reclaim_complete().
- On forced unmount wait for all znodes to be destroyed - destruction can be
  done asynchronously via zfs_reclaim_complete().

r197150:
There is a bug where mze_insert() can trigger an assert() of inserting
the same entry twice. This bug is not fixed yet, but leads to situation
where when try to access corrupted directory the kernel will panic.
Until the bug is properly fixed, try to recover from it and log that it
happened.

Reported by: marck
OpenSolaris bug: 6709336

r197151:
Be sure not to overflow struct fid.

r197152:
Extend scope of the z_teardown_lock lock for consistency and "just in case".

r197153:
When zfs.ko is compiled with debug, make sure that znode and vnode point at
each other.

r197167:
Work-around READDIRPLUS problem with .zfs/ and .zfs/snapshot/ directories
by just returning EOPNOTSUPP. This will allow NFS server to fall back to
regular READDIR.
Note that converting inode number to snapshot's vnode is expensive operation.
Snapshots are stored in AVL tree, but based on their names, not inode numbers,
so to convert inode to snapshot vnode we have to interate over all snalshots.
This is not a problem in OpenSolaris, because in their READDIRPLUS
implementation they use VOP_LOOKUP() on d_name, instead of VFS_VGET() on
d_fileno as we do.

PR: kern/125149
Reported by: Weldon Godfrey <wgodfrey@ena.com>
Analysis by: Jaakko Heinonen <jh@saunalahti.fi>

r197172:
Add missing \n.

Reported by: marck

r197177:
Support both case: when snapshot is already mounted and when it is not yet
mounted.

r197200:
Modify mount(8) to skip MNT_IGNORE file systems by default, just like df(1)
does. This is not POLA violation, because there is no single file system in the
base that use MNT_IGNORE currently, although ZFS snapshots will be mounted with
MNT_IGNORE after next commit.

Reviewed by: kib

r197201:
- Mount ZFS snapshots with MNT_IGNORE flag, so they are not visible in regular
  df(1) and mount(8) output. This is a bit smilar to OpenSolaris and follows
  ZFS route of not listing snapshots by default with 'zfs list' command.
- Add UPDATING entry to note that ZFS snapshots are no longer visible in
  mount(8) and df(1) output by default.

Reviewed by: kib

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197215 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoFix botched mergeinfo.
jhb [Mon, 14 Sep 2009 17:49:59 +0000 (17:49 +0000)]
Fix botched mergeinfo.

Approved by: re (kib, bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197199 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 197062:
jhb [Mon, 14 Sep 2009 16:13:12 +0000 (16:13 +0000)]
MFC 197062:
Don't malloc a buffer while holding the prison0 mutex.  Instead, use a loop
where we figure out the hostname length under the lock, malloc the buffer
with the lock dropped, then recheck the length under the lock and loop again
if the buffer is now too small.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197194 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197048:
rmacklem [Mon, 14 Sep 2009 15:16:17 +0000 (15:16 +0000)]
MFC r197048:
Add LK_NOWITNESS to the vn_lock() calls done on newly created nfs
vnodes, since these nodes are not linked into the mount queue and,
as such, the vn_lock() cannot cause a deadlock so LORs are harmless.

Suggested by: kib
Approved by: re (kensmith), kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197192 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196921:
kib [Mon, 14 Sep 2009 11:01:15 +0000 (11:01 +0000)]
MFC r196921:
Do not decrement pfs_vncache_entries for the vnode that was not in the
pfs_vncache list.

Approved by: re (bz)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197188 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196652: Fix the problem that the entry broke into two lines
ume [Sun, 13 Sep 2009 17:01:34 +0000 (17:01 +0000)]
MFC r196652: Fix the problem that the entry broke into two lines
with multi-byte AM/PM date format.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197169 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196651: AM/PM date format for ja_JP.eucJP and ja_JP.SJIS were
ume [Sun, 13 Sep 2009 17:00:21 +0000 (17:00 +0000)]
MFC r196651: AM/PM date format for ja_JP.eucJP and ja_JP.SJIS were
localized by r193869.  However, ja_JP.UTF-8 wasn't.  So, reflect it
to ja_JP.UTF-8 as well.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197168 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196475:
ume [Sun, 13 Sep 2009 11:34:33 +0000 (11:34 +0000)]
MFC r196475:
 - Add AS lookup functionality to traceroute6(8) as well.
 - Support for IPv6 transport for AS lookup.
 - Introduce $RA_SERVER to set whois server.
 - Support for 4 byte ASN.
 - ANSIfy function declaration in as.c.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197158 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196929: Suppress an options line when no bit is on.
ume [Sun, 13 Sep 2009 11:31:25 +0000 (11:31 +0000)]
MFC r196929: Suppress an options line when no bit is on.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197157 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196889:
nork [Sun, 13 Sep 2009 10:04:08 +0000 (10:04 +0000)]
MFC r196889:
Change 'dev.cpu.N.temperature', sysctl I (degC) to IK (Kelvin),
to match acpi_thermal(4) and amdtemp(4).

Approved by: re (rwatson)
Reviewed by: rpaulo
Suggested by: ume

git-svn-id: svn://svn.freebsd.org/base/stable/8@197149 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196861:
kib [Sat, 12 Sep 2009 18:16:46 +0000 (18:16 +0000)]
MFC r196861:
Handle zero size for posix_memalign. Return NULL or unique address
according to the 'V' option.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197127 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197046:
kib [Sat, 12 Sep 2009 18:11:48 +0000 (18:11 +0000)]
MFC r197046:
As was done in r196643 for i386 and amd64, swap the start/end virtual
addresses in pmap_invalidate_cache_range().

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197126 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196610:
tuexen [Sat, 12 Sep 2009 18:08:44 +0000 (18:08 +0000)]
MFC 196610:
Fix a bug where vlan interfaces are not supported by SCTP.

Approved by: re, rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197125 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197031:
kib [Sat, 12 Sep 2009 18:05:57 +0000 (18:05 +0000)]
MFC r197031:
Unlock the image vnode around the call of pmc PMC_FN_PROCESS_EXEC hook.
The hook calls vn_fullpath(9), that should not be executed with a vnode
lock held.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197124 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197030:
kib [Sat, 12 Sep 2009 18:02:57 +0000 (18:02 +0000)]
MFC r197030:
In vfs_mark_atime(9), be resistent against reclaimed vnodes.
Assert that neccessary locks are taken, since vop might not be called.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197123 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoThis fixes a bug where the value set by SCTP_PARTIAL_DELIVERY_POINT
tuexen [Sat, 12 Sep 2009 17:58:15 +0000 (17:58 +0000)]
This fixes a bug where the value set by SCTP_PARTIAL_DELIVERY_POINT
was not honored, if the socket buffer size was not 4 times that large.
MFC of 196509.

Approved by: re, rrs (mentor)`

git-svn-id: svn://svn.freebsd.org/base/stable/8@197122 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoThis fixes kern/138516, an mbuf leak in both the em
jfv [Fri, 11 Sep 2009 16:53:12 +0000 (16:53 +0000)]
This fixes kern/138516, an mbuf leak in both the em
and igb driver, when a transmit fails the packet/mbuf
was not being requeued. Thanks to those that pointed
this problem out.

Approved by:  re

git-svn-id: svn://svn.freebsd.org/base/stable/8@197093 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196932:
syrinx [Fri, 11 Sep 2009 15:07:36 +0000 (15:07 +0000)]
MFC r196932:

When joining a multicast group, the inp_lookup_mcast_ifp call
does a KASSERT that the group address is multicast, so the
check if this is indeed true and eventually return a EINVAL if not,
should be done before calling inp_lookup_mcast_ifp. This fixes a kernel
crash when calling setsockopt (sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,...)
with invalid group address.

Reviewed by: bms
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197089 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196942:
kensmith [Fri, 11 Sep 2009 13:46:28 +0000 (13:46 +0000)]
MFC r196942:
> Bring the layout of package-split.py more in line with where we're going
> with packages on the release media.  It looks like we'll be putting just
> the doc packages on the new "memory stick" image as well as disc1.  There
> will be no other packages on the CDROM-sized media.  The DVD sized media
> will include the doc packages plus whatever other packages we decide to
> make part of the release.
>
> This commit just brings the basic structure in line with being able to
> do this.  We still need to discuss with various people exactly which
> packages will be included on the DVD.
>
> If the environement variable "PKG_DVD" is set a tree suitable for the
> DVD media is generated.  Otherwise a tree suitable for the "memory stick"
> and disc1 is generated.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197088 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196966:
kib [Fri, 11 Sep 2009 12:56:13 +0000 (12:56 +0000)]
MFC r196966:
Lock Giant around vn_open_cred().
Remove innocent unnecessary call to NDFREE().

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197087 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMove mergeinfo for 196772 up to sys/.
jhb [Thu, 10 Sep 2009 14:24:11 +0000 (14:24 +0000)]
Move mergeinfo for 196772 up to sys/.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197068 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoRemove extra debugging support that is turned on for head but turned off
kensmith [Thu, 10 Sep 2009 14:04:00 +0000 (14:04 +0000)]
Remove extra debugging support that is turned on for head but turned off
for stable branches:

- shift to MALLOC_PRODUCTION
- turn off automatic crash dumps
- Remove kernel debuggers, INVARIANTS*[1], WITNESS* from
  GENERIC kernel config files[2]

[1] INVARIANTS* left on for ia64 by request marcel
[2] sun4v was left as-is

Reviewed by: marcel, kib
Approved by: re (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197065 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196920:
kib [Thu, 10 Sep 2009 12:42:36 +0000 (12:42 +0000)]
MFC r196920:
insmntque_stddtr() clears vp->v_data and resets vp->v_op to
dead_vnodeops before calling vgone(). Revert r189706 and corresponding
part of the r186560.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197060 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196916:
attilio [Thu, 10 Sep 2009 11:27:07 +0000 (11:27 +0000)]
MFC r196916:
Fix a list overrun.

Sponsored by: Sandvine Incorporated
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197058 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196887:
kib [Wed, 9 Sep 2009 13:28:18 +0000 (13:28 +0000)]
MFC r196887:
In fhopen, vfs_ref() the mount point while vnode is unlocked, to prevent
vn_start_write(NULL, &mp) from operating on potentially freed or reused
struct mount *.

Remove unmatched vfs_rel() in cleanup.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197041 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC of r196581 r196582 r197000
edwin [Wed, 9 Sep 2009 12:19:43 +0000 (12:19 +0000)]
MFC of r196581 r196582 r197000
Import of tzdata 2009k, 2009l and 2009m

- Changes in Mauritius and Bangladesh
- No leapsecond at the end of December 2009

- Egypt will go to Wintertime on 21 August 2009

- Samoa will go in DST on 4 October 2009 till 28 March 2010
- Palestine will go back from DST on 4 September 2009

Approved by: re (kostik)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197038 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoUse traditional td_unusedX names for the padding members.
kib [Wed, 9 Sep 2009 10:31:09 +0000 (10:31 +0000)]
Use traditional td_unusedX names for the padding members.

Suggested by: julian
Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197028 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoAdaptive spinning for locking primitives, in read-mode, have some tuning
attilio [Wed, 9 Sep 2009 09:34:13 +0000 (09:34 +0000)]
Adaptive spinning for locking primitives, in read-mode, have some tuning
SYSCTLs which are inappropriate for a daily use of the machine (mostly
useful only by a developer which wants to run benchmarks on it).
Remove them before the release as long as we do not want to ship with
them in.

Now that the SYSCTLs are gone, instead than use static storage for some
constants, use real numeric constants in order to avoid eventual compiler
dumbiness and the risk to share a storage (and then a cache-line) among
CPUs when doing adaptive spinning together.

Pleasse note that the sys/linker_set.h inclusion in lockmgr and sx lock
support could have been gone, but re@ preferred them to be in order to
minimize the risk of problems on future merging.

Please note that this patch is not a MFC, but an 'edge case' as commit
directly to stable/8, which creates a diverging from HEAD.

Tested by:      Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197024 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196772:
attilio [Wed, 9 Sep 2009 09:17:31 +0000 (09:17 +0000)]
MFC r196772:
fix adaptive spinning in lockmgr by using correctly GIANT_RESTORE and
continue statement and improve adaptive spinning for sx lock by just
doing once GIANT_SAVE.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@197023 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMake LRO turned off uncategorically for devices
jfv [Tue, 8 Sep 2009 23:25:39 +0000 (23:25 +0000)]
Make LRO turned off uncategorically for devices
attached to the bridge, rather than just in the case
when some device cannot do TSO. Customer tests have
shown that even when all devices can do TSO that LRO
will cause problems when bridging.

Approved by:  re

git-svn-id: svn://svn.freebsd.org/base/stable/8@196997 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 196745:
jhb [Tue, 8 Sep 2009 21:50:34 +0000 (21:50 +0000)]
MFC 196745:
Don't attempt to bind the current thread to the CPU an IRQ is bound to
when removing an interrupt handler from an IRQ during shutdown.  During
shutdown we are already bound to CPU 0 and this was triggering a panic.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196996 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196835:
jamie [Tue, 8 Sep 2009 19:18:02 +0000 (19:18 +0000)]
MFC r196835:
  Allow a jail's name to be the same as its jid (which is the default if
  no name is specified), and let a numeric name specify the jid for a new
  jail when the jid isn't otherwise set.  Still disallow other numeric
  names.

Reviewed by: zec
Approved by: re (kib), bz (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196989 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196730:
kib [Tue, 8 Sep 2009 15:31:23 +0000 (15:31 +0000)]
MFC r196730:
Remove the altkstacks, instead instantiate threads with kernel stack
allocated with the right size from the start. For the thread that has
kernel stack cached, verify that requested stack size is equial to the
actual, and reallocate the stack if sizes differ.

Introduce separate kernel stack cache that keeps some limited amount of
preallocated kernel stacks to lower the latency of thread allocation.

Not a merge: instead of removing td_altkstack* members of struct thread,
replace them with placeholders to keep struct thread layout on the
stable branch.

Also, record r196640, r196644 and r196648 as merged.

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196977 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196692:
kib [Tue, 8 Sep 2009 14:43:42 +0000 (14:43 +0000)]
MFC r196692:
Make the mnt_writeopcount and mnt_secondary_writes counters,
used by the suspension code, not greater then mnt_ref reference
counter value.

MFC r196733:
Fix mount reference leak when V_XSLEEP is specified to vn_start_write().

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196974 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196717:
sam [Mon, 7 Sep 2009 16:41:18 +0000 (16:41 +0000)]
MFC r196717:
    fix beacon timers on resume in sta mode so raoming works

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196940 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196785:
sam [Mon, 7 Sep 2009 16:33:27 +0000 (16:33 +0000)]
MFC r196785:
    correct timeout for doing NOL processing; need a ticks-relative value

Approved by: re (kensmith)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196939 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196579:
pjd [Mon, 7 Sep 2009 16:25:09 +0000 (16:25 +0000)]
MFC r196579:

Fix an obvious topology lock leak.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196937 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196787
remko [Mon, 7 Sep 2009 14:10:55 +0000 (14:10 +0000)]
MFC r196787

  Do the first step in removing lukemftpd from the base system. Disconnect
  it from the build.

  If you are using the FTP daemon, please consider using the port ftp/tnftpd
  which is the same FTP server, but newer and might have more/better
  functionality.

  This results in us providing only one ftp daemon by default.

  Reviewed by:        bz
  Approved by:        imp (mentor, implicit)
  MFC after:        3 days
  Silence from:        obrien

Approved by: re (kib), imp (mentor, implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196926 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196831:
mav [Sun, 6 Sep 2009 14:05:01 +0000 (14:05 +0000)]
MFC r196831:
Add to `camcontrol cmd` support for sending arbitrary ATA commands.

It could be used for broad range of tasks, such as configuring drive
power management, caching, security and any other features and tasks,
not supported by existing drivers.

Approved by: re (ATA-CAM blanket)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196892 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC of r196477
julian [Sun, 6 Sep 2009 06:05:23 +0000 (06:05 +0000)]
MFC of r196477
 Don't delete copies of nthread_create(9) we find inthe filesystem.
 we now link it to kproc_create(9), it's new name.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196876 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f