]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoMFC 212338:
jhb [Mon, 20 Sep 2010 18:58:24 +0000 (18:58 +0000)]
MFC 212338:
If autoboot_delay is set to -1, boot immediately without checking for
a keypress to match the behavior of the loader.

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

13 years agoMFC 211888: Simplify the tcp pcblist estimate logic slightly.
jhb [Mon, 20 Sep 2010 18:40:54 +0000 (18:40 +0000)]
MFC 211888: Simplify the tcp pcblist estimate logic slightly.

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

13 years agoMFC r196829:
mav [Mon, 20 Sep 2010 18:20:35 +0000 (18:20 +0000)]
MFC r196829:
Add missing ';'.

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

13 years agoMFC r201148:
mav [Mon, 20 Sep 2010 17:56:03 +0000 (17:56 +0000)]
MFC r201148:
Don't forget to use `void' for sched_balance(). It has no arguments.

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

13 years agoMFC r210055:
gibbs [Mon, 20 Sep 2010 17:39:49 +0000 (17:39 +0000)]
MFC r210055:

Correct logic bug in aicasm's undefined register bit access detection code.

The code in question verifies that all register write operations only change
bits that are defined (in the register definition file) for that effected
register.  The bug effectively disabled this checking.

o Fix the check by testing the opcode against all supported read ("and" based)
  operands.

o Add missing bit definitions to the aic7xxx and aic79xx register definition
  files so that the warning (treated as a fatal error) does not spuriously
  fire.

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

13 years agoMFC r212403:
bz [Mon, 20 Sep 2010 17:03:10 +0000 (17:03 +0000)]
MFC r212403:

  When using pf routing options, properly handle IP fragmentation
  for interfaces with TSO enabled, otherwise one would see an extra
  ICMP unreach, frag needed pre matching packet on lo0.
  This syncs pf code to ip_output.c r162084.

  Submitted by: yongari via mlaier
  Reviewed by:  eri
  Tested by:    kib
PR:           kern/144311

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

13 years agoFix an integer overflow in RLE length parsing when decompressing
cperciva [Mon, 20 Sep 2010 14:58:08 +0000 (14:58 +0000)]
Fix an integer overflow in RLE length parsing when decompressing
corrupt bzip2 data.

Approved by: so (cperciva)
Security: FreeBSD-SA-10:08.bzip2

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

13 years agoMFC r212325: subr_bus: use hexadecimal representation for bit flags
avg [Mon, 20 Sep 2010 11:15:23 +0000 (11:15 +0000)]
MFC r212325: subr_bus: use hexadecimal representation for bit flags

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

13 years agoMFC r212413: bus_add_child: change type of order parameter to u_int
avg [Mon, 20 Sep 2010 07:31:08 +0000 (07:31 +0000)]
MFC r212413: bus_add_child: change type of order parameter to u_int

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

13 years agoMFC r212791:
mm [Mon, 20 Sep 2010 07:23:45 +0000 (07:23 +0000)]
MFC r212791:

Remove duplicate include of <strings.h>

Approved by: delphij (mentor)

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

13 years agoMFC r212213: struct device: widen type of flags and order fields to u_int
avg [Mon, 20 Sep 2010 05:56:09 +0000 (05:56 +0000)]
MFC r212213: struct device: widen type of flags and order fields to u_int

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

13 years agoMFC r212549: acpi_cpu: do not apply P_LVLx_LAT rules to latencies
avg [Mon, 20 Sep 2010 05:39:50 +0000 (05:39 +0000)]
MFC r212549: acpi_cpu: do not apply P_LVLx_LAT rules to latencies
returned by _CST

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

13 years agoMFC r207831: sh(1): Fix "reserved word" vs "keyword" inconsistency.
jilles [Sun, 19 Sep 2010 21:56:41 +0000 (21:56 +0000)]
MFC r207831: sh(1): Fix "reserved word" vs "keyword" inconsistency.
Use "keyword" everywhere, like the output of the 'type' builtin, and only
mention "reserved word" once to say it is the same thing.

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

13 years agoMFC r211621: sh(1): Add a brief summary of arithmetic expressions.
jilles [Sun, 19 Sep 2010 21:38:12 +0000 (21:38 +0000)]
MFC r211621: sh(1): Add a brief summary of arithmetic expressions.

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

13 years agoMFC r212710
np [Sun, 19 Sep 2010 20:22:48 +0000 (20:22 +0000)]
MFC r212710

Fix t3_gate_rx_traffic and t3_open_rx_traffic. Parts of them always operated
on XGMAC0 instead of the specified XGMAC.

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

13 years agoMFC r212419: test(1): Fix markup, ( and ) must be separate arguments
jilles [Sun, 19 Sep 2010 16:15:42 +0000 (16:15 +0000)]
MFC r212419: test(1): Fix markup, ( and ) must be separate arguments
so leave spaces.

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

13 years agoMFC r212418: test(1): Clarify grammar ambiguity and -a/-o vs shell &&/||.
jilles [Sun, 19 Sep 2010 16:13:47 +0000 (16:13 +0000)]
MFC r212418: test(1): Clarify grammar ambiguity and -a/-o vs shell &&/||.

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

13 years agoMFC r212417: sh(1): Remove xrefs for expr(1) and getopt(1).
jilles [Sun, 19 Sep 2010 16:06:32 +0000 (16:06 +0000)]
MFC r212417: sh(1): Remove xrefs for expr(1) and getopt(1).

expr(1) should usually not be used as various forms of parameter expansion
and arithmetic expansion replicate most of its functionality in an easier
way.

getopt(1) should not be used at all in new code. Instead, getopts(1) or
entirely manual parsing should be used.

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

13 years agoMFC r211864,211963,211964,211965, don't mis-handle path names of
brian [Sun, 19 Sep 2010 11:16:49 +0000 (11:16 +0000)]
MFC r211864,211963,211964,211965, don't mis-handle path names of
101 characters beginning with '/'.

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

13 years agoMFC: r212217
rmacklem [Sun, 19 Sep 2010 02:07:30 +0000 (02:07 +0000)]
MFC: r212217
Change the code in ncl_bioread() in the experimental NFS
client to return an error when rabp is not set, so it
behaves the same way as the regular NFS client for this
case. It does not affect NFSv4, since nfs_getcacheblk()
only fails for "intr" mounts and NFSv4 can't use the
"intr" mount option.

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

13 years agoMFC: r212216
rmacklem [Sun, 19 Sep 2010 01:41:49 +0000 (01:41 +0000)]
MFC: r212216
Disable use of the NLM in the experimental NFS client, since
it will crash the kernel because it uses the nfsmount and
nfsnode structures of the regular NFS client.

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

13 years agoBelatedly MFC r210002, r210676, r210812, r210826:
bcr [Sat, 18 Sep 2010 20:50:36 +0000 (20:50 +0000)]
Belatedly MFC r210002, r210676, r210812, r210826:

r210002:
In the example for how to create a VLAN, also include an example of
setting the IP address.  While it is documented earlier in rc.conf(5)
that the '.' in the VLAN name becomes a '_' in rc.conf, this may not be
easy to find when just using rc.conf(5) as reference documentation.

r210676:
Fix a bunch of typos and spelling mistakes.

r210812:
Update references from nonexistent usbconfig(1) to usbconfig(8).

r210826:
Correctly sort usbconfig(8) within the SEE ALSO section.

PR:                         docs/149221
Submitted by:               Lars Hartmann (lars at chaotika dot org)
Help with mergeinfo from:   kib
Reviewed by:                kib, hrs (IPv6 parts that should not be
merged to stable/8)

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

13 years agoMFC r212694:
mm [Sat, 18 Sep 2010 08:45:43 +0000 (08:45 +0000)]
MFC r212694:

Fix kernel panic when moving a file to .zfs/shares
Fix possible loss of correct error return code in ZFS mount

OpenSolaris revisions and Bug IDs:

11824:53128e5db7cf
6863610 ZFS mount can lose correct error return

12079:13822b941977
6939941 problem with moving files in zfs (142901-12)

Approved by: delphij (mentor)
Obtained from: OpenSolaris (Bug ID 68636106939941)

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

13 years agoMFC: r212621
marius [Sat, 18 Sep 2010 08:25:12 +0000 (08:25 +0000)]
MFC: r212621

Use saner nsegments and maxsegsz parameters when creating certain DMA tags;
tags for 1-byte allocations cannot possibly be split across 2 segments and
maxsegsz must not exceed maxsize.

Reviewed by: Hans Petter Selasky

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

13 years agoMFC r212410:
bschmidt [Sat, 18 Sep 2010 08:23:45 +0000 (08:23 +0000)]
MFC r212410:
Fix firmware module dependencies.

malo and mwl use the firmware framework to access firmware images.
Depending on the firmware modules itself is not required and in this
case even wrong because no modules with those names exist.

Pointed out by: brucec

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

13 years agoMFC: r212620
marius [Sat, 18 Sep 2010 08:20:36 +0000 (08:20 +0000)]
MFC: r212620

Remove a KASSERT which will also trigger for perfectly valid combinations
of small maxsize and "large" (including BUS_SPACE_UNRESTRICTED) nsegments
parameters. Generally using a presz of 0 (which indeed might indicate the
use of bogus parameters for DMA tag creation) is not fatal, it just means
that no additional DVMA space will be preallocated.

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

13 years agoMFC: r212619
marius [Sat, 18 Sep 2010 08:18:53 +0000 (08:18 +0000)]
MFC: r212619

Remove redundant raising of the PIL to PIL_TICK as the respective locore
code already did that.

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

13 years agoMFC r212251,212457: make acpi_hp device a child of acpi_wmi
avg [Sat, 18 Sep 2010 07:16:38 +0000 (07:16 +0000)]
MFC r212251,212457: make acpi_hp device a child of acpi_wmi

PR: kern/147858

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

13 years agoMFC r211475:
delphij [Sat, 18 Sep 2010 00:44:55 +0000 (00:44 +0000)]
MFC r211475:

Check return value of dup(), it could be -1 when the system is running
out of file descriptors for instance.

Found with: Coverity Prevent(tm)
CID: 6084

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

13 years agoMFC r212153: Fix UP build.
mdf [Thu, 16 Sep 2010 15:42:11 +0000 (15:42 +0000)]
MFC r212153: Fix UP build.

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

13 years agoMFhead 212256:
glebius [Thu, 16 Sep 2010 15:22:33 +0000 (15:22 +0000)]
MFhead 212256:
  in_delayed_cksum() requires host byte order.

  Reported by:  Alexander Levin <amindomao googlemail.com>

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

13 years agoMFC r212176:
fabient [Thu, 16 Sep 2010 15:21:15 +0000 (15:21 +0000)]
MFC r212176:
When an asm location cannot be resolved to a function the cost
will be spread as small value and then filtered by the threshold.
As a first step solution display the number of event that cannot
be resolved as a valid function location.

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

13 years agoMFhead r210539:
glebius [Thu, 16 Sep 2010 15:19:23 +0000 (15:19 +0000)]
MFhead r210539:
  Document that the "ngtee" action no longer accepts packet, and
  thus don't depend on one_pass flag anymore.

  This is a POLA violation, but it is quite difficult to restore
  the old behavior with new code. Also, the new behavior matches
  behavior of the older "tee" action, and this is more intuitive.

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

13 years agoMFC r212224:
fabient [Thu, 16 Sep 2010 15:15:34 +0000 (15:15 +0000)]
MFC r212224:
 Fix invalid class removal when IAF is not the last class.
 Keep IAF class with 0 PMC and change the alias in libpmc to IAP.

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

13 years agoMFC r212224:
fabient [Thu, 16 Sep 2010 15:14:05 +0000 (15:14 +0000)]
MFC r212224:
 Fix invalid class removal when IAF is not the last class.
 Keep IAF class with 0 PMC and change the alias in libpmc to IAP.

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

13 years agoMFhead r210537:
glebius [Thu, 16 Sep 2010 15:11:17 +0000 (15:11 +0000)]
MFhead r210537:
  Fix operation of "netgraph" action in conjunction with the
  net.inet.ip.fw.one_pass sysctl.

  PR:           kern/148885
  Submitted by: Nickolay Dudorov <nnd mail.nsk.ru>

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

13 years agoAlthough flexible BPF timestamping framework isn't yet merged to stable/8,
glebius [Thu, 16 Sep 2010 15:07:12 +0000 (15:07 +0000)]
Although flexible BPF timestamping framework isn't yet merged to stable/8,
merge from head r209797,r209845 that fix a possible problem.

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

13 years agoMFhead 210533:
glebius [Thu, 16 Sep 2010 15:00:43 +0000 (15:00 +0000)]
MFhead 210533:
  Don't check malloc(M_WAITOK) result.

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

13 years agoMFhead 210529:
glebius [Thu, 16 Sep 2010 14:55:22 +0000 (14:55 +0000)]
MFhead 210529:
  When installing a new ARP entry via 'arp -S', lla_lookup() will
  either find an existing entry, or allocate a new one. In the latter
  case an entry would have flags, that were supplied as argument to
  lla_lookup(). In case of an existing entry, flags aren't modified.

  This lead to losing LLE_PUB and/or LLE_PROXY flags.

  We should apply these flags either in lla_rt_output() or in the
  in.c:in_lltable_lookup(). It seems to me that lla_rt_output() is
  a more correct choice.

  PR:           kern/148784, kern/146539

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

13 years agoMFhead 210500:
glebius [Thu, 16 Sep 2010 14:30:32 +0000 (14:30 +0000)]
MFhead 210500:
  Zero padding fields of netflow records. This helps to reduce
  size of compressed export logs.

  Requested by: Alexey Illarionov <littlesavage orionet.ru>

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

13 years agoMFC r212146:
mav [Thu, 16 Sep 2010 02:47:09 +0000 (02:47 +0000)]
MFC r212146:
Add workaround for SiI3114 and SiI3512 chips bug, which caused sending
R_ERR in response to DMA activate FIS under certain circumstances. This is
recommended fix from chip datasheet. If triggered, this bug most likely
caused write command timeout.

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

13 years agoMFC r212145:
mav [Thu, 16 Sep 2010 02:44:23 +0000 (02:44 +0000)]
MFC r212145:
SATA1.x SiliconImage controllers on power-on reset TFD Status register into
value 0xff. On hot-plug this value confuses ata_generic_reset() device
presence detection logic. As soon as we already know drive presence from
SATA hard reset, hint ata_generic_reset() to wait for device signature
until success or full timeout.

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

13 years agoMFC r212081:
mav [Thu, 16 Sep 2010 02:42:52 +0000 (02:42 +0000)]
MFC r212081:
Increase device reset timeout from 10 to 15 seconds, same as in ahci(4).
Some devices found need about 10-12 seconds to spinup.

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

13 years agoMFC: r212125, r212126
rmacklem [Thu, 16 Sep 2010 01:38:13 +0000 (01:38 +0000)]
MFC: r212125, r212126
Modify lib/libstand/nfs.c to use NFSv3 instead of NFSv2.
This allows the nfs_getrootfh() function to return the
correct file handle size to pxe.c for pxeboot. It also
results in NFSv2 no longer being used by default anywhere
in FreeBSD. If built with OLD_NFSV2 defined, the old
code that predated this patch will be built and NFSv2
will be used. pxe.c is also modified to use this version
of nfs_getrootfh() so that pxeboot will use NFSv3 and
work for non-FreeBSD as well as FreeBSD NFS servers.

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

13 years agoMFC: r212123
rmacklem [Thu, 16 Sep 2010 01:02:53 +0000 (01:02 +0000)]
MFC: r212123
Modify nfs_diskless.c to recognize the environment variable
boot.nfsroot.nfshandlelen and set the diskless root fs to
use NFSv3 and this file handle length when it is set. If
this environment variable is not set, the diskless root fs
will use NFSv2 and the same defaults as before. This fixes
the problem where the diskless nfs root fs had to be on a
FreeBSD server for NFSv3 to work, because it did not know
the correct file handle length and assumed the size used
by FreeBSD.

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

13 years agoMFC: r208459
marius [Wed, 15 Sep 2010 20:40:27 +0000 (20:40 +0000)]
MFC: r208459

Use real atomic operations for sparc64.

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

13 years agoMFC: r210601 (partial), r211071, r211073
marius [Wed, 15 Sep 2010 20:17:18 +0000 (20:17 +0000)]
MFC: r210601 (partial), r211071, r211073

- As it is not possible for sched_bind(9) to context switch with
  td_critnest > 1 when not already running on the desired CPU read the
  TICK counter of the BSP via a direct cross trap request in that case
  instead.
- Provide a STICK based timecounter.

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

13 years agoMFC r212335
emax [Wed, 15 Sep 2010 19:34:18 +0000 (19:34 +0000)]
MFC r212335

Make sure to only pickup hid_input items when parsing input reports.
As it turns out, libusbhid(3) also picks up hic_collection items even
though we explicitly requested hid_input items only.

Tested by: Buganini < buganini at gmail dot com >

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

13 years agoMFC: r211050 (partial)
marius [Wed, 15 Sep 2010 19:27:30 +0000 (19:27 +0000)]
MFC: r211050 (partial)

- Introduce a cpu_ipi_single() function pointer in order to send IPIs
  to single CPUs more efficiently with Cheetah(-class) and Jalapeno CPUs.
- Factor out the Jalapeno support from the Cheetah IPI send functions
  in order to be able to more easily and efficiently implement support
  for more than 32 target CPUs as well as a workaround for Cheetah+
  erratum 25 for the latter.

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

13 years agoAdd missing MFC to r212668 for cddl/compat/opensolaris from r209962.
mm [Wed, 15 Sep 2010 19:20:29 +0000 (19:20 +0000)]
Add missing MFC to r212668 for cddl/compat/opensolaris from r209962.

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

13 years agoMFC: r211049, r211568
marius [Wed, 15 Sep 2010 18:51:14 +0000 (18:51 +0000)]
MFC: r211049, r211568

For CPUs which ignore TD_CV and support hardware unaliasing don't
bother doing page coloring. This results in a small but measurable
performance improvement in buildworld times.

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

13 years agoMFC: r210176
marius [Wed, 15 Sep 2010 18:09:16 +0000 (18:09 +0000)]
MFC: r210176

Allocate proper amount of memory for interrupt names on sparc64 and
sun4v, same as done on other architectures. This removes garbage from
`vmstat -ia` output.

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

13 years agoMFC: r208515
marius [Wed, 15 Sep 2010 17:38:59 +0000 (17:38 +0000)]
MFC: r208515

Fix some whitespace nits.

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

13 years agoMFC r211932, r211947, r211948:
mm [Wed, 15 Sep 2010 16:20:24 +0000 (16:20 +0000)]
MFC r211932, r211947, r211948:

MFC r211932:

Import changes from OpenSolaris that provide
- better ACL caching and speedup of ACL permission checks
- faster handling of stat()
- lowered mutex contention in the read/writer lock (rrwlock)
- several related bugfixes

Detailed information (OpenSolaris onnv changesets and Bug IDs):

9749:105f407a2680
6802734 Support for Access Based Enumeration (not used on FreeBSD)
6844861 inconsistent xattr readdir behavior with too-small buffer

9866:ddc5f1d8eb4e
6848431 zfs with rstchown=0 or file_chown_self privilege allows user to "take" ownership

9981:b4907297e740
6775100 stat() performance on files on zfs should be improved
6827779 rrwlock is overly protective of its counters

10143:d2d432dfe597
6857433 memory leaks found at: zfs_acl_alloc/zfs_acl_node_alloc
6860318 truncate() on zfsroot succeeds when file has a component of its path set without access permission

10232:f37b85f7e03e
6865875 zfs sometimes incorrectly giving search access to a dir

10250:b179ceb34b62
6867395 zpool_upgrade_007_pos testcase panic'd with BAD TRAP: type=e (#pf Page fault)

10269:2788675568fd
6868276 zfs_rezget() can be hazardous when znode has a cached ACL

10295:f7a18a1e9610
6870564 panic in zfs_getsecattr

MFC r211947:

Move ZUT_OBJS in the same place that is used in vendor code.

MFC r211948:

Return NULL pointer instead of B_FALSE as it is done in the vendor code.

Approved by: delphij (mentor)
Obtained from: OpenSolaris (multiple Bug IDs)

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

13 years agoMFC r211931:
mm [Wed, 15 Sep 2010 16:14:38 +0000 (16:14 +0000)]
MFC r211931:

Update ZFS metaslab code from OpenSolaris.
This provides a noticeable write speedup, especially on pools with
less than 30% of free space.

Detailed information (OpenSolaris onnv changesets and Bug IDs):

11146:7e58f40bcb1c
6826241 Sync write IOPS drops dramatically during TXG sync
6869229 zfs should switch to shiny new metaslabs more frequently

11728:59fdb3b856f6
6918420 zdb -m has issues printing metaslab statistics

12047:7c1fcc8419ca
6917066 zfs block picking can be improved

Approved by: delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6826241686922969184206917066)

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

13 years agoMFC r210398:
mm [Wed, 15 Sep 2010 16:10:38 +0000 (16:10 +0000)]
MFC r210398:

Enable fake resolving of SMB RIDs by using nulldomain and UID_NOBODY
- fixes panics when Solaris/OpenSolaris pools that contain files
uploaded with the SMB protocol are accessed

Enable seting/unsetting the sharesmb property (dummy action)
- allows users who import pools from Solaris/Opensolaris to unset
the sharesmb property and get rid of annoying messages

PR: kern/145778, kern/148709
Approved by: pjd, delphij (mentor))

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

13 years agoMFC r209962, r211970-r211972, r212050, r212605, r212611
mm [Wed, 15 Sep 2010 16:05:40 +0000 (16:05 +0000)]
MFC r209962, r211970-r211972, r212050, r212605, r212611

MFC r209962:

Merge ZFS version 15 and almost all OpenSolaris bugfixes referenced
in Solaris 10 updates 141445-09 and 142901-14.

Detailed information:
(OpenSolaris revisions and Bug IDs, Solaris 10 patch numbers)

7844:effed23820ae
6755435 zfs_open() and zfs_close() needs to use ZFS_ENTER/ZFS_VERIFY_ZP (141445-01)

7897:e520d8258820
6748436 inconsistent zpool.cache in boot_archive could panic a zfs root filesystem upon boot-up (141445-01)

7965:b795da521357
6740164 zpool attach can create an illegal root pool (141909-02)

8084:b811cc60d650
6769612 zpool_import() will continue to write to cachefile even if altroot is set (N/A)

8121:7fd09d4ebd9c
6757430 want an option for zdb to disable space map loading and leak tracking (141445-01)

8129:e4f45a0bfbb0
6542860 ASSERT: reason != VDEV_LABEL_REMOVE||vdev_inuse(vd, crtxg, reason, 0) (141445-01)

8188:fd00c0a81e80
6761100 want zdb option to select older uberblocks (141445-01)

8190:6eeea43ced42
6774886 zfs_setattr() won't allow ndmp to restore SUNWattr_rw (141445-01)

8225:59a9961c2aeb
6737463 panic while trying to write out config file if root pool import fails (141445-01)

8227:f7d7be9b1f56
6765294 Refactor replay (141445-01)

8228:51e9ca9ee3a5
6572357 libzfs should do more to avoid mnttab lookups (141909-01)
6572376 zfs_iter_filesystems and zfs_iter_snapshots get objset stats twice (141909-01)

8241:5a60f16123ba
6328632 zpool offline is a bit too conservative (141445-01)
6739487 ASSERT: txg <= spa_final_txg due to scrub/export race (141445-01)
6767129 ASSERT: cvd->vdev_isspare, in spa_vdev_detach() (141445-01)
6747698 checksum failures after offline -t / export / import / scrub (141445-01)
6745863 ZFS writes to disk after it has been offlined (141445-01)
6722540 50% slowdown on scrub/resilver with certain vdev configurations (141445-01)
6759999 resilver logic rewrites ditto blocks on both source and destination (141445-01)
6758107 I/O should never suspend during spa_load() (141445-01)
6776548 codereview(1) runs off the page when faced with multi-line comments (N/A)
6761406 AMD errata 91 workaround doesn't work on 64-bit systems (141445-01)

8242:e46e4b2f0a03
6770866 GRUB/ZFS should require physical path or devid, but not both (141445-01)

8269:03a7e9050cfd
6674216 "zfs share" doesn't work, but "zfs set sharenfs=on" does (141445-01)
6621164 $SRC/cmd/zfs/zfs_main.c seems to have a syntax error in the translation note (141445-01)
6635482 i18n problems in libzfs_dataset.c and zfs_main.c (141445-01)
6595194 "zfs get" VALUE column is as wide as NAME (141445-01)
6722991 vdev_disk.c: error checking for ddi_pathname_to_dev_t() must test for NODEV (141445-01)
6396518 ASSERT strings shouldn't be pre-processed (141445-01)

8274:846b39508aff
6713916 scrub/resilver needlessly decompress data (141445-01)

8343:655db2375fed
6739553 libzfs_status msgid table is out of sync (141445-01)
6784104 libzfs unfairly rejects numerical values greater than 2^63 (141445-01)
6784108 zfs_realloc() should not free original memory on failure (141445-01)

8525:e0e0e525d0f8
6788830 set large value to reservation cause core dump (141445-01)
6791064 want sysevents for ZFS scrub (141445-01)
6791066 need to be able to set cachefile on faulted pools (141445-01)
6791071 zpool_do_import() should not enable datasets on faulted pools (141445-01)
6792134 getting multiple properties on a faulted pool leads to confusion (141445-01)

8547:bcc7b46e5ff7
6792884 Vista clients cannot access .zfs (141445-01)

8632:36ef517870a3
6798384 It can take a village to raise a zio (141445-01)

8636:7e4ce9158df3
6551866 deadlock between zfs_write(), zfs_freesp(), and zfs_putapage() (141909-01)
6504953 zfs_getpage() misunderstands VOP_GETPAGE() interface (141909-01)
6702206 ZFS read/writer lock contention throttles sendfile() benchmark (141445-01)
6780491 Zone on a ZFS filesystem has poor fork/exec performance (141445-01)
6747596 assertion failed: DVA_EQUAL(BP_IDENTITY(&zio->io_bp_orig), BP_IDENTITY(zio->io_bp))); (141445-01)

8692:692d4668b40d
6801507 ZFS read aggregation should not mind the gap (141445-01)

8697:e62d2612c14d
6633095 creating a filesystem with many properties set is slow (141445-01)

8768:dfecfdbb27ed
6775697 oracle crashes when overwriting after hitting quota on zfs (141909-01)

8811:f8deccf701cf
6790687 libzfs mnttab caching ignores external changes (141445-01)
6791101 memory leak from libzfs_mnttab_init (141445-01)

8845:91af0d9c0790
6800942 smb_session_create() incorrectly stores IP addresses (N/A)
6582163 Access Control List (ACL) for shares (141445-01)
6804954 smb_search - shortname field should be space padded following the NULL terminator (N/A)
6800184 Panic at smb_oplock_conflict+0x35() (N/A)

8876:59d2e67b4b65
6803822 Reboot after replacement of system disk in a ZFS mirror drops to grub> prompt (141445-01)

8924:5af812f84759
6789318 coredump when issue zdb -uuuu poolname/ (141445-01)
6790345 zdb -dddd -e poolname coredump (141445-01)
6797109 zdb: 'zdb -dddddd pool_name/fs_name inode' coredump if the file with inode was deleted (141445-01)
6797118 zdb: 'zdb -dddddd poolname inum' coredump if I miss the fs name (141445-01)
6803343 shareiscsi=on failed, iscsitgtd failed request to share (141445-01)

9030:243fd360d81f
6815893 hang mounting a dataset after booting into a new boot environment (141445-01)

9056:826e1858a846
6809691 'zpool create -f' no longer overwrites ufs infomation (141445-01)

9179:d8fbd96b79b3
6790064 zfs needs to determine uid and gid earlier in create process (141445-01)

9214:8d350e5d04aa
6604992 forced unmount + being in .zfs/snapshot/<snap1> = not happy (141909-01)
6810367 assertion failed: dvp->v_flag & VROOT, file: ../../common/fs/gfs.c, line: 426 (141909-01)

9229:e3f8b41e5db4
6807765 ztest_dsl_dataset_promote_busy needs to clean up after ENOSPC (141445-01)

9230:e4561e3eb1ef
6821169 offlining a device results in checksum errors (141445-01)
6821170 ZFS should not increment error stats for unavailable devices (141445-01)
6824006 need to increase issue and interrupt taskqs threads in zfs (141445-01)

9234:bffdc4fc05c4
6792139 recovering from a suspended pool needs some work (141445-01)
6794830 reboot command hangs on a failed zfs pool (141445-01)

9246:67c03c93c071
6824062 System panicked in zfs_mount due to NULL pointer dereference when running btts and svvs tests (141909-01)

9276:a8a7fc849933
6816124 System crash running zpool destroy on broken zpool (141445-03)

9355:09928982c591
6818183 zfs snapshot -r is slow due to set_snap_props() doing txg_wait_synced() for each new snapshot (141445-03)

9391:413d0661ef33
6710376 log device can show incorrect status when other parts of pool are degraded (141445-03)

9396:f41cf682d0d3 (part already merged)
6501037 want user/group quotas on ZFS (141445-03)
6827260 assertion failed in arc_read(): hdr == pbuf->b_hdr (141445-03)
6815592 panic: No such hold X on refcount Y from zfs_znode_move (141445-03)
6759986 zfs list shows temporary %clone when doing online zfs recv (141445-03)

9404:319573cd93f8
6774713 zfs ignores canmount=noauto when sharenfs property != off (141445-03)

9412:4aefd8704ce0
6717022 ZFS DMU needs zero-copy support (141445-03)

9425:e7ffacaec3a8
6799895 spa_add_spares() needs to be protected by config lock (141445-03)
6826466 want to post sysevents on hot spare activation (141445-03)
6826468 spa 'allowfaulted' needs some work (141445-03)
6826469 kernel support for storing vdev FRU information (141445-03)
6826470 skip posting checksum errors from DTL regions of leaf vdevs (141445-03)
6826471 I/O errors after device remove probe can confuse FMA (141445-03)
6826472 spares should enjoy some of the benefits of cache devices (141445-03)

9443:2a96d8478e95
6833711 gang leaders shouldn't have to be logical (141445-03)

9463:d0bd231c7518
6764124 want zdb to be able to checksum metadata blocks only (141445-03)

9465:8372081b8019
6830237 zfs panic in zfs_groupmember() (141445-03)

9466:1fdfd1fed9c4
6833162 phantom log device in zpool status (141445-03)

9469:4f68f041ddcd
6824968 add ZFS userquota support to rquotad (141445-03)

9470:6d827468d7b5
6834217 godfather I/O should reexecute (141445-03)

9480:fcff33da767f
6596237 Stop looking and start ganging (141909-02)

9493:9933d599bc93
6623978 lwb->lwb_buf != NULL, file ../../../uts/common/fs/zfs/zil.c, line 787, function zil_lwb_commit (141445-06)

9512:64cafcbcc337
6801810 Commit of aligned streaming rewrites to ZIL device causes unwanted disk reads (N/A)

9515:d3b739d9d043
6586537 async zio taskqs can block out userland commands (142901-09)

9554:787363635b6a
6836768 zfs_userspace() callback has no way to indicate failure (N/A)

9574:1eb6a6ab2c57
6838062 zfs panics when an error is encountered in space_map_load() (141909-02)

9583:b0696cd037cc
6794136 Panic BAD TRAP: type=e when importing degraded zraid pool. (141909-03)

9630:e25a03f552e0
6776104 "zfs import" deadlock between spa_unload() and spa_async_thread() (141445-06)

9653:a70048a304d1
6664765 Unable to remove files when using fat-zap and quota exceeded on ZFS filesystem (141445-06)

9688:127be1845343
6841321 zfs userspace / zfs get userused@ doesn't work on mounted snapshot (N/A)
6843069 zfs get userused@S-1-... doesn't work (N/A)

9873:8ddc892eca6e
6847229 assertion failed: refcount_count(&tx->tx_space_written) + delta <= tx->tx_space_towrite in dmu_tx.c (141445-06)

9904:d260bd3fd47c
6838344 kernel heap corruption detected on zil while stress testing (141445-06)

9951:a4895b3dd543
6844900 zfs_ioc_userspace_upgrade leaks (N/A)

10040:38b25aeeaf7a
6857012 zfs panics on zpool import (141445-06)

10000:241a51d8720c
6848242 zdb -e no longer works as expected (N/A)

10100:4a6965f6bef8
6856634 snv_117 not booting: zfs_parse_bootfs: error2 (141445-07)

10160:a45b03783d44
6861983 zfs should use new name <-> SID interfaces (N/A)
6862984 userquota commands can hang (141445-06)

10299:80845694147f
6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (N/A)

10302:a9e3d1987706
6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (fix lint) (N/A)

10575:2a8816c5173b (partial merge)
6882227 spa_async_remove() shouldn't do a full clear (142901-14)

10800:469478b180d9
6880764 fsync on zfs is broken if writes are greater than 32kb on a hard crash and no log attached (142901-09)
6793430 zdb -ivvvv assertion failure: bp->blk_cksum.zc_word[2] == dmu_objset_id(zilog->zl_os) (N/A)

10801:e0bf032e8673 (partial merge)
6822816 assertion failed: zap_remove_int(ds_next_clones_obj) returns ENOENT (142901-09)

10810:b6b161a6ae4a
6892298 buf->b_hdr->b_state != arc_anon, file: ../../common/fs/zfs/arc.c, line: 2849 (142901-09)

10890:499786962772
6807339 spurious checksum errors when replacing a vdev (142901-13)

11249:6c30f7dfc97b
6906110 bad trap panic in zil_replay_log_record (142901-13)
6906946 zfs replay isn't handling uid/gid correctly (142901-13)

11454:6e69bacc1a5a
6898245 suspended zpool should not cause rest of the zfs/zpool commands to hang (142901-10)

11546:42ea6be8961b (partial merge)
6833999 3-way deadlock in dsl_dataset_hold_ref() and dsl_sync_task_group_sync() (142901-09)

MFC r211970:

Fix 'zfs allow' (maybe not only) returning:

        cannot access dataset system/usr/home: Operation not supported

by including libzfs_impl.h. What libzfs_impl.h does is to redefine ioctl() to
be compatible with OpenSolaris. More specifically OpenSolaris returns ENOMEM
when buffer is too small and sets field zc_nvlist_dst_size to the size that
will be big enough for the data. In FreeBSD case ioctl() doesn't copy data
structure back in case of a failure. We work-around it in kernel and libzfs by
returning 0 from ioctl() and always checking if zc_nvlist_dst_size hasn't
changed. For this work-around to work in pyzfs we need this compatible ioctl()
which is implemented in libzfs_impl.h.

MFC r211971:

Print errors on stderr.

MFC r211972:

Give user a hint what to do when /usr/lib/zfs/pyzfs.py is missing.

MFC r212050:

When upgrading a pool which contain root file system, give user a hint that
he should update boot code.

MFC r212605:

Add missing vop_vector zfsctl_ops_shares
Add missing locks around VOP_READDIR and VOP_GETATTR with z_shares_dir

MFC r212611:

Remove duplicated VFS_HOLD due to a mismerge.

Approved by: delphij (mentor)
Obtained from: OpenSolaris (multiple Bug IDs), Perforce (pjd)

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

13 years agoMFC r212115:
mdf [Wed, 15 Sep 2010 15:53:05 +0000 (15:53 +0000)]
MFC r212115:

Fix a bug with sched_affinity() where it checks td_pinned of another
thread in a racy manner, which can lead to attempting to migrate a
thread that is pinned to a CPU.  Instead, have sched_switch() determine
which CPU a thread should run on if the current one is not allowed.

KASSERT in sched_bind() that the thread is not yet pinned to a CPU.

KASSERT in sched_switch() that only migratable threads or those moving
due to a sched_bind() are changing CPUs.

Note that this is direct commit as ipi_cpu() only exists in CURRENT.

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

13 years agoMFC r212363:
nwhitehorn [Wed, 15 Sep 2010 13:45:06 +0000 (13:45 +0000)]
MFC r212363:

Reorder statistics tracking and table lock acquisitions already in place
to avoid race conditions updating the PVO statistics.

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

13 years agoMFC r211967,212044,212278,212322,212331:
nwhitehorn [Wed, 15 Sep 2010 13:43:43 +0000 (13:43 +0000)]
MFC r211967,212044,212278,212322,212331:

Fix a variety of race conditions and errors in VSID allocation in both
the 32 and 64-bit PMAP modules, some dating back to the original PMAP
import from NetBSD. This fixes a variety of potential crashes and memory
corruption bugs, especially on SMP systems under heavy load.

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

13 years agoMFC r212317 & r212412
sanpei [Wed, 15 Sep 2010 11:04:02 +0000 (11:04 +0000)]
MFC r212317 & r212412
Add Buffalo (Melco Inc.) LUA3-U2-ATX
Add Planex UE-200TX-G

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

13 years agoMFC r211874:
andre [Wed, 15 Sep 2010 09:38:01 +0000 (09:38 +0000)]
MFC r211874:

  Use timestamp modulo comparison macro for automatic receive buffer
  scaling to correctly handle wrapping of ticks value.

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

13 years agoMFC r209064: Remove unused assignment.
avg [Wed, 15 Sep 2010 08:24:19 +0000 (08:24 +0000)]
MFC r209064: Remove unused assignment.

Original commit by jkim.

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

13 years agoMFC r209055: Fix a possible dereference of null pointer.
avg [Wed, 15 Sep 2010 08:18:20 +0000 (08:18 +0000)]
MFC r209055: Fix a possible dereference of null pointer.

Original commit by jkim.

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

13 years agoMFC r211762: zfs arc_reclaim_thread: no need to call arc_reclaim_needed
avg [Wed, 15 Sep 2010 08:03:23 +0000 (08:03 +0000)]
MFC r211762: zfs arc_reclaim_thread: no need to call arc_reclaim_needed
when resetting needfree

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

13 years agoMFC r212501:
kib [Wed, 15 Sep 2010 07:30:27 +0000 (07:30 +0000)]
MFC r212501:
Add DF_1_LOADFLTR.

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

13 years agoMFC r212499:
kib [Wed, 15 Sep 2010 07:28:31 +0000 (07:28 +0000)]
MFC r212499:
Fix typo.

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

13 years agoMFC: r212043
rmacklem [Tue, 14 Sep 2010 01:28:05 +0000 (01:28 +0000)]
MFC: r212043
Add a null_remove() function to nullfs, so that the v_usecount
of the lower level vnode is incremented to greater than 1 when
the upper level vnode's v_usecount is greater than one. This
is necessary for the NFS clients, so that they will do a silly
rename of the file instead of actually removing it when the
file is still in use. It is "racy", since the v_usecount is
incremented in many places in the kernel with
minimal synchronization, but an extraneous silly rename is
preferred to not doing a silly rename when it is required.
The only other file systems that currently check the value
of v_usecount in their VOP_REMOVE() functions are nwfs and
smbfs. These file systems choose to fail a remove when the
v_usecount is greater than 1 and I believe will function
more correctly with this patch, as well.

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

13 years agoMFC r212296
emax [Tue, 14 Sep 2010 00:32:29 +0000 (00:32 +0000)]
MFC r212296

Do not request SDP attributes using ranges.
Apparently some devices do not like it.

Tested by: Buganini < buganini at gmail dot com >

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

13 years agoMFC r211213:
kib [Mon, 13 Sep 2010 20:29:09 +0000 (20:29 +0000)]
MFC r211213:
The buffers b_vflags field is not always properly protected by
bufobj lock. If b_bufobj is not NULL, then bufobj lock should be
held when manipulating the flags. Not doing this sometimes leaves
BV_BKGRDINPROG to be erronously set, causing softdep' getdirtybuf() to
stuck indefinitely in "getbuf" sleep, waiting for background write to
finish which is not actually performed.

Add BO_LOCK() in the cases where it was missed.

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

13 years agoMFC 212263.
gjb [Mon, 13 Sep 2010 17:30:29 +0000 (17:30 +0000)]
MFC 212263.

Fix typo in bsdcpio(1).

Approved by: keramida (mentor)

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

13 years agoMFC 212269.
gjb [Mon, 13 Sep 2010 17:27:43 +0000 (17:27 +0000)]
MFC 212269.

Add ECONNRESET to connect(2).

Approved by: keramida (mentor)

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

13 years agoMFC r209053:
mdf [Mon, 13 Sep 2010 17:18:49 +0000 (17:18 +0000)]
MFC r209053:

Add INVARIANTS checking that numfreebufs values are sane.  Also add a
per-buf flag to catch if a buf is double-counted in the free count.
This code was useful to debug an instance where a local patch at Isilon
was incorrectly managing numfreebufs for a new buf state.

Requested by: Kostic Belousov

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

13 years agoRegen
kib [Mon, 13 Sep 2010 08:49:51 +0000 (08:49 +0000)]
Regen

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

13 years agoMFC r211998:
kib [Mon, 13 Sep 2010 08:49:08 +0000 (08:49 +0000)]
MFC r211998:
Make the syscalls reserved for AFS usable by OpenAFS port.

The 'NOTSTATIC' flag is removed on merge, since corresponding functionality
is not implemented in the RELENG_8.

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

13 years agoMFC r212436:
jamie [Mon, 13 Sep 2010 00:42:07 +0000 (00:42 +0000)]
MFC r212436:

  Don't exit kern_jail_set without freeing options when enforce_statfs
  has an illegal value.

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

13 years agoMFC 212241.
gjb [Sun, 12 Sep 2010 18:37:34 +0000 (18:37 +0000)]
MFC 212241.

Note that jail_list should contain alphanumeric characters only.

PR: 150098
Approved by: keramida (mentor)

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

13 years agoMFC r212008, 212028, 212210: Vendor update to version 3.80.06.003 to
delphij [Sun, 12 Sep 2010 06:19:35 +0000 (06:19 +0000)]
MFC r212008, 212028, 212210: Vendor update to version 3.80.06.003 to
fix panic with ZFS under heavy I/O load.

PR:             kern/149968
Submitted by:   LSI (Tom Couch)
Reported by:    Kai Kockro <kkockro web de>
Tested by:      Kai Kockro, jpaetzel

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

13 years agoMFC r211157, r211193, r212265, r212266: make it possible to load carp(4) as
will [Sat, 11 Sep 2010 22:02:36 +0000 (22:02 +0000)]
MFC r211157, r211193, r212265, r212266: make it possible to load carp(4) as
a kld using function pointer hooks and {pf_,ip,ip6}proto_{un,}register().

Reviewed by: bz
Approved by: ken (mentor)

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

13 years agoRemove unused variable 'idle' which mistakenly got merged in r212472.
brucec [Sat, 11 Sep 2010 21:52:40 +0000 (21:52 +0000)]
Remove unused variable 'idle' which mistakenly got merged in r212472.

Approved by: rrs (mentor)

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

13 years agoMerge r212162 from head:
gavin [Sat, 11 Sep 2010 18:50:33 +0000 (18:50 +0000)]
Merge r212162 from head:

  Correct spelling mistake, int -> into

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

13 years agoMFC r211415:
brucec [Sat, 11 Sep 2010 14:34:16 +0000 (14:34 +0000)]
MFC r211415:

Add -m and -M options to control the minimum and maximum frequency.

PR: bin/145063
Submitted by: Boris Kochergin <spawk at acm.poly.edu>
Approved by: rrs (mentor)

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

13 years agoMFC r211419:
brucec [Sat, 11 Sep 2010 14:26:18 +0000 (14:26 +0000)]
MFC r211419:

Since top displays the uptime including seconds, there is no need to add 30
onto it, which may have been used for rounding purposes in other utilities.

PR: bin/147934
Submitted by: Janne Snabb <snabb at epipe.com>
Approved by: rrs (mentor)

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

13 years agoMFC r206909:
brucec [Sat, 11 Sep 2010 14:18:30 +0000 (14:18 +0000)]
MFC r206909:

It's not necessary to reset the chip every time an input overflow event
occurs. In addition, the delay when programming the short cable fix
should be 100us, not 100ms.

PR: kern/64556
Approved by: rrs (mentor)

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

13 years agoMFC r212214: sh: Get rid of some magic numbers.
jilles [Sat, 11 Sep 2010 12:51:01 +0000 (12:51 +0000)]
MFC r212214: sh: Get rid of some magic numbers.

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

13 years agoMFC r211940:
kib [Sat, 11 Sep 2010 06:38:34 +0000 (06:38 +0000)]
MFC r211940:
Test the poll(2) return value.

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

13 years agoMFC: r211953
rmacklem [Sat, 11 Sep 2010 02:00:27 +0000 (02:00 +0000)]
MFC: r211953
Add acquisition of a reference count on nfsv4root_lock in the
nfsd_recalldelegation() function, since this function is called
by nfsd threads when they are handling NFSv2 or NFSv3 RPCs, where
no reference count would have been acquired.

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

13 years agoMFC: r211951
rmacklem [Sat, 11 Sep 2010 01:08:16 +0000 (01:08 +0000)]
MFC: r211951
The timer routine in the experimental NFS server did not acquire
the correct mutex when checking nfsv4root_lock. Although this
could be fixed by adding mutex lock/unlock calls, zack.kirsch at
isilon.com suggested a better fix that uses a non-blocking
acquisition of a reference count on nfsv4root_lock. This fix
allows the weird NFSLOCKSTATE(); NFSUNLOCKSTATE(); synchronization
to be deleted. This patch applies this fix.

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

13 years agoMFC r211194, r211229, r212058, r212063: memguard(9) rewrite
mdf [Fri, 10 Sep 2010 17:26:41 +0000 (17:26 +0000)]
MFC r211194, r211229, r212058, r212063: memguard(9) rewrite

r211194:

Rework memguard(9) to reserve significantly more KVA to detect
use-after-free over a longer time.  Also release the backing pages of
a guarded allocation at free(9) time to reduce the overhead of using
memguard(9).  Allow setting and varying the malloc type at run-time.
Add knobs to allow:

 - randomly guarding memory
 - adding un-backed KVA guard pages to detect underflow and overflow
 - a lower limit on the size of allocations that are guarded

r211229:

Fix compile.  It seemed better to have memguard.c include opt_vm.h in
case future compile-time knobs were added that it wants to use.
Also add include guards and forward declarations to vm/memguard.h.

r212058:

The realloc case for memguard(9) will copy too many bytes when
reallocating to a smaller-sized allocation.  Fix this issue.

r212063:

Have memguard(9) crash with an easier-to-debug message on double-free.

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

13 years agoMFC r211861:
nwhitehorn [Fri, 10 Sep 2010 15:33:26 +0000 (15:33 +0000)]
MFC r211861:

pmap_mapdev() does not appear to actually need GIANT to be held here,
and asserting that is held breaks drm.

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

13 years agoMFC r211941:
kib [Fri, 10 Sep 2010 12:55:36 +0000 (12:55 +0000)]
MFC r211941:
Recalcule the return value in pollout().

PR: kern/143029
Tested by: John Plevyak <jplevyak apache org>

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

13 years agoMFC:
imp [Fri, 10 Sep 2010 03:52:05 +0000 (03:52 +0000)]
MFC:
    r212169: Allow / in the NANO_DEVICE
    r209225: Allow boot.config to have different values than just -h.
    r209210: Allow population of /cfg and /data.  Begin the move to
making all slice creation overrideable too, but there's a few
problems doing that for the duplicated partitions (s1 and s2), so
just comment that it needs work.
    r209209: Create a make.conf.  not needed for runtime, but some ports
want to spam it at compile or install time.
    r209207: make these convenience functions more convenient by accepting
all args, not just the first.  makes mechanical conversion of old
style more forgiving.
    r207436: Fix typo in usage message.  Add -n to the list of valid arguments.
    r206276: Fix comment about NANO_ARCH.  It can be set now.  Also add
a warning about how it confuses TARGET and TARGET_ARCH and the need
to separate the two out into independent variables.

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

13 years agoMFC: r207979
brueffer [Thu, 9 Sep 2010 21:26:55 +0000 (21:26 +0000)]
MFC: r207979

Build the ixgbe(4) and mwlfw(4) modules by default.

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

13 years agoMFC r212155:
bz [Thu, 9 Sep 2010 06:43:18 +0000 (06:43 +0000)]
MFC r212155:
  MFp4 CH=183052 183053 183258:

    In protosw we define pr_protocol as short, while on the wire
    it is an uint8_t.  That way we can have "internal" protocols
    like DIVERT, SEND or gaps for modules (PROTO_SPACER).
    Switch ipproto_{un,}register to accept a short protocol number(*)
    and do an upfront check for valid boundries. With this we
    also consistently report EPROTONOSUPPORT for out of bounds
    protocols, as we did for proto == 0.  This allows a caller
    to not error for this case, which is especially important
    if we want to automatically call these from domain handling.

    (*) the functions have been without any in-tree consumer
    since the initial introducation, so this is considered save.

    Implement ip6proto_{un,}register() similarly to their legacy IP
    counter parts to allow modules to hook up dynamically.

  Reviewed by: philip, will

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

13 years agoMFC r211283:
zec [Wed, 8 Sep 2010 14:22:35 +0000 (14:22 +0000)]
MFC r211283:

  When moving an ethernet ifnet from one vnet to another, destroy the
  associated ng_ether netgraph node in the current vnet, and create a
  new one in the target vnet.

  Reviewed by:  julian

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

13 years agoMFC r208744:
zec [Wed, 8 Sep 2010 14:21:12 +0000 (14:21 +0000)]
MFC r208744:

  Virtualize the IPv4 multicast routing code.

  Submitted by: iprebeg
  Reviewed by:  bms, bz, Pavlin Radoslavov

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

13 years agoMFC r208743:
zec [Wed, 8 Sep 2010 14:19:33 +0000 (14:19 +0000)]
MFC r208743:

  Provide a macro for registering a virtualized sysctl handler for
  VNET opaque data.

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

13 years agoMFC r212234:
kib [Wed, 8 Sep 2010 09:53:50 +0000 (09:53 +0000)]
MFC r212234:
Document "show cdev" command.

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

13 years agoMFC r212233:
kib [Wed, 8 Sep 2010 09:51:03 +0000 (09:51 +0000)]
MFC r212233:
Document MAKEDEV_ETERNAL.

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

13 years agoMFC r212087:
ed [Wed, 8 Sep 2010 08:03:08 +0000 (08:03 +0000)]
MFC r212087:

  Remove reference to device minor numbers in psm(4) man page.

  The number returned by stat(2) is generated automatically, so it is not
  possible to deduce whether the device is blocking or not.

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