]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
11 years agoMFC r249883:
mm [Sun, 28 Apr 2013 07:48:53 +0000 (07:48 +0000)]
MFC r249883:
Respect the enoent_ok flag if reporting error for holding an non-existing
snapshot.

Related illumos ZFS issue:
  3699 zfs hold or release of a non-existent snapshot does not output error

Reported by: Steven Hartland <smh@FreeBSD.org>

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

11 years agoMerge r249903 from head:
glebius [Sat, 27 Apr 2013 07:00:31 +0000 (07:00 +0000)]
Merge r249903 from head:
  Fix couple of mbuf leaks in incoming ARP processing.

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

11 years agoMFC r249849:
mav [Sat, 27 Apr 2013 06:09:13 +0000 (06:09 +0000)]
MFC r249849:
Move hptmv and mpt drivers shutdown a bit later to the SHUTDOWN_PRI_LAST
stage of shutdown_post_sync.  That should allow CAM to do final cache flush
at the SHUTDOWN_PRI_DEFAULT without using polling magic.

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

11 years agoMFC r248783
bryanv [Sat, 27 Apr 2013 01:48:09 +0000 (01:48 +0000)]
MFC r248783

Add missing space

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

11 years agoMFC r249233: mqueue,ksem,shm: Fix race condition with setting UF_EXCLOSE.
jilles [Fri, 26 Apr 2013 21:07:27 +0000 (21:07 +0000)]
MFC r249233: mqueue,ksem,shm: Fix race condition with setting UF_EXCLOSE.

POSIX mqueue, compatibility ksem and POSIX shm create a file descriptor that
has close-on-exec set. However, they do this incorrectly, leaving a window
where a thread may fork and exec while the flag has not been set yet. The
race is easily reproduced on a multicore system with one thread doing
shm_open and close and another thread doing posix_spawnp and waitpid.

Set UF_EXCLOSE via falloc()'s flags argument instead. This also simplifies
the code.

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

11 years agoMFC r248803: btowc(3), isblank(3): Correct prototypes for _l variants.
jilles [Fri, 26 Apr 2013 16:09:10 +0000 (16:09 +0000)]
MFC r248803: btowc(3), isblank(3): Correct prototypes for _l variants.

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

11 years agoMFC r249471: libc: Fix typo in French translation.
jilles [Fri, 26 Apr 2013 16:05:43 +0000 (16:05 +0000)]
MFC r249471: libc: Fix typo in French translation.

PR: kern/177704
Submitted by: martymac

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

11 years agoMFC remainder of r249802 (eadler) to fix build:
gjb [Fri, 26 Apr 2013 11:57:05 +0000 (11:57 +0000)]
MFC remainder of r249802 (eadler) to fix build:

- sl_find does not modify 'name'
- make the prototype of sl_find match NetBSD

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

11 years agoMFC r249787:
mm [Fri, 26 Apr 2013 07:00:49 +0000 (07:00 +0000)]
MFC r249787:
The zfs synctask code restructuring introduced a new bug that makes it
impossible to set quota and reservation on pools lower than version 22.
Problem has been reported and a solution discussed with vendor.

Illumos ZFS issues:
  3739 cannot set zfs quota or reservation on pool version < 22

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reported by: Steve Wills <swills@FreeBSD.org>

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

11 years agoMFC r249631
ache [Fri, 26 Apr 2013 01:56:58 +0000 (01:56 +0000)]
MFC r249631

Attempt to mitigate poor initialization of arc4 by one-shot
reinitialization from yarrow right after good entropy is harvested.

Approved by:    secteam (delphij)

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

11 years agoMFC r249802:
eadler [Fri, 26 Apr 2013 00:47:22 +0000 (00:47 +0000)]
MFC r249802:
- sl_find does not modify 'name'
- make the prototype of sl_find match NetBSD

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

11 years agoMFC r249801:
eadler [Fri, 26 Apr 2013 00:45:00 +0000 (00:45 +0000)]
MFC r249801:
Switch from K&R prototypes to modern C

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

11 years agoMFC r249349
sbruno [Thu, 25 Apr 2013 17:02:22 +0000 (17:02 +0000)]
MFC r249349

Repair camcontrol output and use CAM defined values for string sizes

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

11 years agoMFC of r249848
rrs [Thu, 25 Apr 2013 11:25:24 +0000 (11:25 +0000)]
MFC of r249848

PR: 174749, 157796

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

11 years agoRecord sendmail 8.14.7 upgrade
gshapiro [Thu, 25 Apr 2013 02:24:24 +0000 (02:24 +0000)]
Record sendmail 8.14.7 upgrade

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

11 years agoMFC: Minor changes to force commit these files so new freebsd*.cf files are
gshapiro [Thu, 25 Apr 2013 01:46:20 +0000 (01:46 +0000)]
MFC: Minor changes to force commit these files so new freebsd*.cf files are
     built to use the new sendmail-8.14.7/cf tree.

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

11 years agoMFC: Update for sendmail 8.14.7
gshapiro [Thu, 25 Apr 2013 01:44:00 +0000 (01:44 +0000)]
MFC: Update for sendmail 8.14.7

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

11 years agoMFC: Merge sendmail 8.14.7
gshapiro [Thu, 25 Apr 2013 01:42:54 +0000 (01:42 +0000)]
MFC: Merge sendmail 8.14.7

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

11 years agoMFC r248690, r248706, 248708, r248752:
pfg [Wed, 24 Apr 2013 20:10:52 +0000 (20:10 +0000)]
MFC r248690, r248706, 248708, r248752:
Dtrace: merge new functions from Illumos.

This covers illumos issues:

1455 DTrace tracemem() should take an optional size argument
1451 DTrace needs toupper()/tolower() subroutines
1457 lltostr() D subroutine should take an optional base
1694 Add type-aware print() action
3511 dtrace.c erroneously checks for memory alignment on amd64

This includes an enhanced print() described here:

http://dtrace.org/blogs/eschrock/2011/10/26/your-mdb-fell-into-my-dtrace/

This change bumps the DT_VERS_* number to 1.9.0 in
accordance to what is done in illumos.

Illumos Revisions: 13457:571b0355c2e3
13458:5e394d8db762
13459:c3454574dd1a
13501:c3a7090dbc16
13483:f413e6c5d297

Reference:
https://www.illumos.org/issues/1455
https://www.illumos.org/issues/1451
https://www.illumos.org/issues/1457
https://www.illumos.org/issues/1560
https://www.illumos.org/issues/1694
https://www.illumos.org/issues/3511

Tested by: Fabian Keil
Obtained from: Illumos

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

11 years agoMFC r249346:
mav [Wed, 24 Apr 2013 19:36:40 +0000 (19:36 +0000)]
MFC r249346:
Create controller-level DMA tag, handling range of supported addresses.
That simplifies logic for channels and gives the bus information about what
device actually allocated the tag.

Submitted by: jhb

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

11 years agoMFC r248704:
mav [Wed, 24 Apr 2013 19:33:37 +0000 (19:33 +0000)]
MFC r248704:
Read Asynchronous Notification statuses only if Port Multiplier or ATAPI
device are connected. ATA disks are not using ANs, while the extra register
read operation is quite expensive.

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

11 years agoMFC r248698:
mav [Wed, 24 Apr 2013 19:24:53 +0000 (19:24 +0000)]
MFC r248698:
Depending on combination of running commands (NCQ/non-NCQ) try to avoid
extra read from PxCI/PxSACT registers.  If only NCQ commands are running, we
don't really need PxCI.  If only non-NCQ commands are running we don't need
PxSACT.  Mixed set may happen only on controllers with FIS-based switching
when port multiplier is attached, and then we have to read both registers.

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

11 years agoMFC r248687:
mav [Wed, 24 Apr 2013 19:22:19 +0000 (19:22 +0000)]
MFC r248687:
No need to erase all 64 bytes of CFIS area if we never use more then 16.

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

11 years agoMFC r227101:
eadler [Wed, 24 Apr 2013 12:47:30 +0000 (12:47 +0000)]
MFC r227101:
Add static keywords to variables and functions where possible in games/.

This allows us to detect unused functions and variables and allows the
compiler to do a better job at optimisation.

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

11 years agoMFC r249281: Add FreeBSD 8.4.
pluknet [Wed, 24 Apr 2013 10:18:56 +0000 (10:18 +0000)]
MFC r249281: Add FreeBSD 8.4.

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

11 years agoMerge unmerged commits to fortune(1)
eadler [Wed, 24 Apr 2013 04:21:19 +0000 (04:21 +0000)]
Merge unmerged commits to fortune(1)

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

11 years agoUpdate error messages when processing the INDEX file to display the given
dteske [Tue, 23 Apr 2013 22:45:03 +0000 (22:45 +0000)]
Update error messages when processing the INDEX file to display the given
path rather than a static string. This makes the error messages consistent
with the rest of the functions which already do the same thing (assumed to
be an oversight or r47055, 13+ years ago). A direct commit to stable/9.

Reviewed by: eadler
MFC after: 3 days

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

11 years agoMerge checked by: Glen Barber (gjb@)
mckusick [Tue, 23 Apr 2013 06:28:49 +0000 (06:28 +0000)]
Merge checked by: Glen Barber (gjb@)

MFC of 247212:
When running with the -d option, instrument fsck_ffs to track the number,
data type, and running time of its I/O operations.

No functional changes.

MFC of 247234:
Catch up with internal API changes for initbarea() and getdatablk()
of fsck_ffs introduced with r247212.

Submitted by:   David Wolfskill <david@catwhisker.org>

MFC of 248625:
Speed up fsck by caching the cylinder group maps in pass1 so
that they do not need to be read again in pass5. As this nearly
doubles the memory requirement for fsck, the cache is thrown away
if other memory needs in fsck would otherwise fail. Thus, the
memory footprint of fsck remains unchanged in memory constrained
environments.

This work was inspired by a paper presented at Usenix's FAST '13:
www.usenix.org/conference/fast13/ffsck-fast-file-system-checker

Details of this implementation appears in the April 2013 of ;login:
www.usenix.org/publications/login/april-2013-volume-38-number-2.
A copy of the April 2013 ;login: paper can also be downloaded
from: www.mckusick.com/publications/faster_fsck.pdf.

Reviewed by: kib
Tested by:   Peter Holm

MFC of 248639:
Fix the build after addition of cylinder group cacheing (r248625)

Reported by:   Glen Barber (gjb@)
Pointy hat to: Kirk McKusick (mckusick@)

MFC of 248673:
Minor formatting fix for printf() to fix clang builds.

Submitted by:   db
Reviewed by:    gjb

MFC of 248680:
Resolve clang compile errors on amd64/i386 for certain by casting.

compile tested with clang on i386, amd64
compile tested with gcc on i386, amd64, sparc64

Submitted by:   delphij

MFC of 248691:
Note that output is in seconds, not msec.
KNF indentation.
No functional change.
No change to printf strings.
No change to casting of printf arguments.

Reported by: Bruce Evans

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

11 years agoMFC of 248623:
mckusick [Tue, 23 Apr 2013 01:09:22 +0000 (01:09 +0000)]
MFC of 248623:

The purpose of this change to the FFS layout policy is to reduce the
running time for a full fsck. It also reduces the random access time
for large files and speeds the traversal time for directory tree walks.

The key idea is to reserve a small area in each cylinder group
immediately following the inode blocks for the use of metadata,
specifically indirect blocks and directory contents. The new policy
is to preferentially place metadata in the metadata area and
everything else in the blocks that follow the metadata area.

The size of this area can be set when creating a filesystem using
newfs(8) or changed in an existing filesystem using tunefs(8).
Both utilities use the `-k held-for-metadata-blocks' option to
specify the amount of space to be held for metadata blocks in each
cylinder group. By default, newfs(8) sets this area to half of
minfree (typically 4% of the data area).

This work was inspired by a paper presented at Usenix's FAST '13:
www.usenix.org/conference/fast13/ffsck-fast-file-system-checker

Details of this implementation appears in the April 2013 of ;login:
www.usenix.org/publications/login/april-2013-volume-38-number-2.
A copy of the April 2013 ;login: paper can also be downloaded
from: www.mckusick.com/publications/faster_fsck.pdf.

Reviewed by: kib
Tested by:   Peter Holm

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

11 years agoMFC of 242520:
mckusick [Mon, 22 Apr 2013 23:59:00 +0000 (23:59 +0000)]
MFC of 242520:

When a file is first being written, the dynamic block reallocation
(implemented by ffs_reallocblks_ufs[12]) relocates the file's blocks
so as to cluster them together into a contiguous set of blocks on
the disk.

When the cluster crosses the boundary into the first indirect block,
the first indirect block is initially allocated in a position
immediately following the last direct block.  Block reallocation
would usually destroy locality by moving the indirect block out of
the way to keep the data blocks contiguous.  This change compensates
for this problem by noting that the first indirect block should be
left immediately following the last direct block.  It then tries
to start a new cluster of contiguous blocks (referenced by the
indirect block) immediately following the indirect block.

We should also do this for other indirect block boundaries, but it
is only important for the first one.

Suggested by: Bruce Evans

MFC of 248623:

The purpose of this change to the FFS layout policy is to reduce the
running time for a full fsck. It also reduces the random access time
for large files and speeds the traversal time for directory tree walks.

The key idea is to reserve a small area in each cylinder group
immediately following the inode blocks for the use of metadata,
specifically indirect blocks and directory contents. The new policy
is to preferentially place metadata in the metadata area and
everything else in the blocks that follow the metadata area.

The size of this area can be set when creating a filesystem using
newfs(8) or changed in an existing filesystem using tunefs(8).
Both utilities use the `-k held-for-metadata-blocks' option to
specify the amount of space to be held for metadata blocks in each
cylinder group. By default, newfs(8) sets this area to half of
minfree (typically 4% of the data area).

This work was inspired by a paper presented at Usenix's FAST '13:
www.usenix.org/conference/fast13/ffsck-fast-file-system-checker

Details of this implementation appears in the April 2013 of ;login:
www.usenix.org/publications/login/april-2013-volume-38-number-2.
A copy of the April 2013 ;login: paper can also be downloaded
from: www.mckusick.com/publications/faster_fsck.pdf.

Reviewed by: kib
Tested by:   Peter Holm

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

11 years agoMFC r249398:
ae [Mon, 22 Apr 2013 06:47:05 +0000 (06:47 +0000)]
MFC r249398:
  Free memory after deleting an address policy entry.

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

11 years agoMFC r249238, r249239:
trociny [Sun, 21 Apr 2013 17:14:50 +0000 (17:14 +0000)]
MFC r249238, r249239:

r249238:

Use 4-byte padding for core dump notes on both 32 and 64bit archs.

Although native word padding (i.e. 8-byte on 64bit arch) looks to be
in agreement with standards, other parts of our code and other OSes
use 4-byte alignment.

This is not expected to change alignment for currently generated core
dump notes, as the notes look to consist of structures with sizes
multiple of 8 on 64-bit archs. But there are plans to add additional
notes, where 4-byte vs 8-byte alignment makes difference.

Discussed with: kib
Reviewed by: kib

r249239:

Fill p_flags and p_align fields of the core dump note segement.

Reviewed by: kib

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

11 years agoMFC r249476:
kib [Sun, 21 Apr 2013 12:16:59 +0000 (12:16 +0000)]
MFC r249476:
Esnure that PCI bus BUS_GET_DMA_TAG() method sees the actual PCI device
which makes the request for dma tag, instead of some descendant of
the PCI device, by creating a pass-through trampoline for vga_pci and
ata_pci buses.

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

11 years agolibstdc++: Revert the expl addition from r246857.
pfg [Sat, 20 Apr 2013 14:55:48 +0000 (14:55 +0000)]
libstdc++: Revert the expl addition from r246857.

When the needed configuration update to libstdc++ was done.
we overlooked  that expl hasn't been merged. This is causing
breakage in  some ports.

Reported by: Diane Bruce
Reviewed by: dim

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

11 years agoMerge of current from 249692, tzdata2013c:
edwin [Sat, 20 Apr 2013 11:46:38 +0000 (11:46 +0000)]
Merge of current from 249692, tzdata2013c:

- antarctica: AusAQ and ATAQ have been removed.
- Antarctica/Macquarie has been moved to australasia file and AU.
- Asia/Hebron, Palestine updated for 2013.
- Paraguay stays with DST for the whole year.

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

11 years agoMFC r249047 (avg):
mm [Sat, 20 Apr 2013 09:25:25 +0000 (09:25 +0000)]
MFC r249047 (avg):
spa_open_common: fix argument to zvol_create_minors

Prior to r248571 spa_open was always called with a bare pool name,
but now it is called with a dataset name instead (spa_lookup handles
that).
So, when a ZFS root is mounted spa_open is called with a name of a root
dataset, which can very well be different from the pool name.
But zvol_create_minors should be called with the pool name, because it
performs a recursive traversal of all datasets under the name to find
all those that are volumes.

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

11 years agoMFC r249347:
ken [Fri, 19 Apr 2013 21:09:27 +0000 (21:09 +0000)]
MFC r249347:
  ------------------------------------------------------------------------
  r249347 | ken | 2013-04-10 16:12:21 -0600 (Wed, 10 Apr 2013) | 22 lines

  Add a callback to the ada(4) driver so that it knows when GEOM has released
  references to it.

  This is the functional equivalent to change r237518, which added this
  functionality to the cd(4) and da(4) drivers.

  This fix prevents a panic caused by GEOM calling adaopen() while the device
  is going away.  We now keep the device around until GEOM has finished
  cleaning up its state.

  ata_da.c: In adaregister(), add a d_gone callback to the GEOM disk
structure registered for the ada driver.  Increment the
peripheral reference count for GEOM.

Add a new callback, adadiskgonecb(), that GEOM calls when
it is done with its resources.  This callback releases the
reference acquired in adaregister().

Submitted by: Po-Li Soong
Sponsored by: Spectra Logic

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

11 years agoMFC: r248842
hiren [Fri, 19 Apr 2013 19:28:48 +0000 (19:28 +0000)]
MFC: r248842

Update hwpmc to support Haswell class processors.
0x3C:      /* Per Intel document 325462-045US 01/2013. */

Add manpage to document all the goodness that is available in this
processor model.

Approved by: sbruno (mentor)

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

11 years agoMFC 248571,248976,249004,249042,249188,249195-249196,249206,249207,249319,
mm [Fri, 19 Apr 2013 09:19:10 +0000 (09:19 +0000)]
MFC 248571,248976,249004,249042,249188,249195-249196,249206,249207,249319,
    249326,249356-249357

Merge libzfs_core and other ZFS bugfixes and improvements.

MFC r248571:
  MFV 238590, 238592:
  In the first zfs ioctl restructuring phase, the libzfs_core library was
  introduced. It is a new thin library that wraps around kernel ioctl's.
  The idea is to provide a forward-compatible way of dealing with new
  features. Arguments are passed in nvlists and not random zfs_cmd fields,
  new-style ioctls are logged to pool history using a new method of
  history logging.

  http://blog.delphix.com/matt/2012/01/17/the-future-of-libzfs/

  MFV 247580 [1]:
  To address issues of several deadlocks and race conditions the locking
  code around dsl_dataset was rewritten and the interface to synctasks
  was changed.

  User-Visible Changes:
  "zfs snapshot" can create more arbitrary snapshots at once (atomically)
  "zfs destroy" destroys multiple snapshots at once
  "zfs recv" has improved performance

  Backward Compatibility:
  I have extended the compatibility layer to support full backward
  compatibility by remapping or rewriting the responsible ioctl arguments.
  Old utilities are fully supported by the new kernel module.

  Forward Compatibility:
  New utilities work with old kernels with the following restrictions:
    - creating, destroying, holding and releasing of multiple snapshots
      at once is not supported, this includes recursive (-r) commands

  Illumos ZFS issues:
    2882 implement libzfs_core
    2900 "zfs snapshot" should be able to create multiple,
         arbitrary snapshots at once
    3464 zfs synctask code needs restructuring

MFC r248976:
  Call dmu_snapshot_list_next() in zvol.c with dsl_pool_config lock held

MFC r249004:
  Do not check against uninitialized rc and comment out vendor code

MFC r249042:
  Fix possible pool hold leak in dmu_send_impl()

  Illumos ZFS issues:
    3645 dmu_send_impl: possibilty of pool hold leak

MFC r249188:
  Import vendor change to reduce diff, no effect on FreeBSD.

  Illumos ZFS issues:
    3517 importing pool with autoreplace=on and "hole" vdevs crashes
 syseventd

MFC r249195:
  Merge change from vendor to reduce diff only.
  ZFS dtrace probes are not supported on FreeBSD yet.

  Illumos ZFS issues:
    3598 want to dtrace when errors are generated in zfs

MFC r249196:
  Provide a fix for kernel panic if receiving recursive deduplicated
  streams. Problem reported to vendor.

  Illumos ZFS issues:
    3692 Panic on zfs receive of a recursive deduplicated stream

MFC r249206:
  Merge vendor change - modify time processing in deadman thread.

  Illumos ZFS issues:
    3618 ::zio dcmd does not show timestamp data

MFC r249207:
  Allow zdb to output a histogram of compressed block sizes.

  Illumos ZFS issues:
    3641 want a histogram of compressed block sizes

MFC r249319:
  ZFS expects a copyout of zfs_cmd_t on an ioctl error. Our sys_ioctl()
  doesn't copyout in this case.

  To solve this a new struct zfs_iocparm_t is introduced consisting of:
  - zfs_ioctl_version (future backwards compatibility purposes)
  - user space pointer to zfs_cmd_t (copyin and copyout)
  - size of zfs_cmd_t (verification purposes)

  The copyin and copyout of zfs_cmd_t is now done the illumos (vendor) way
  what makes porting of new changes easier and ensures correct behavior if
  returning an error.

MFC r249326:
  Cast (void *)(uintptr_t) on copyout and copyin of zfs_iocparm_t.zfs_cmd

MFC r249356:
  Merge bugfixes accepted and integrated by vendor. Underlying problems
  have been reported by us and fixed in r240942 and r249196.

  Illumos ZFS issues:
    3645 dmu_send_impl: possibilty of pool hold leak
    3692 Panic on zfs receive of a recursive deduplicated stream

MFC r249357:
  Fix libzfs to report error instead of returning zero if trying to hold or
  release a non-existing snapshot of a existing dataset. In recursive case
  error is reported if no snapshots with the requested name have been found.

  Illumos ZFS issues:
    3699 zfs hold or release of a non-existent snapshot does not output
 error

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

11 years agoMFC r249170
sbruno [Fri, 19 Apr 2013 05:28:08 +0000 (05:28 +0000)]
MFC r249170

Notify CAM on state* change to a logical volume not status.  This resolves
the issues reported regarding camcontrol devlist not showing the rebuild
states of volumes unless an explicit camcontrol rescan was executed.

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

11 years agoMFC r249334 and r249384:
ken [Fri, 19 Apr 2013 03:55:54 +0000 (03:55 +0000)]
MFC r249334 and r249384:

  ------------------------------------------------------------------------
  r249334 | ken | 2013-04-10 10:01:45 -0600 (Wed, 10 Apr 2013) | 11 lines

  Fix a time calculation error in ctlstat_standard().

  ctlstat.c: When converting a timeval to a floating point
number in ctlstat_standard(), cast the nanoseconds
calculation to a long double, so we don't lose
precision.  Without the cast, we wind up with a
time in whole seconds only.

  Sponsored by:   Spectra Logic
  ------------------------------------------------------------------------
  r249384 | ken | 2013-04-11 15:18:04 -0600 (Thu, 11 Apr 2013) | 17 lines

  Fix bugs in the elapsed time calculation in ctlstat_standard()
  pointed out by bde:

  - Casting to long double isn't needed.
  - The division isn't needed, multiplication can be used.
    "When 1 nanosecond is in a floating point literal, the whole
    expression is automatically promoted correctly."
  - non-KNF indentation (1 tab) for the newly split line
  - different non-KNF indentation (5 spaces) for the previously split
    line
  - exessive parentheses around the division operation
  - bogus blank line which splits up the etime initialization
  - general verboseness from the above.

  Submitted by:   bde

Sponsored by: Spectra Logic

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

11 years agoMFC r249336:
mav [Thu, 18 Apr 2013 13:19:41 +0000 (13:19 +0000)]
MFC r249336:
Add ID for ASMedia ASM1042 USB 3.0 controller.

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

11 years agoMFC r248694:
mav [Thu, 18 Apr 2013 11:13:48 +0000 (11:13 +0000)]
MFC r248694:
In GEOM DISK:
 - Replace single done mutex with per-disk ones.  On system with several
disks on several HBAs that removes small, but measurable lock congestion.
 - Modify disk destruction process to not destroy the mutex prematurely.
 - Remove some extra pointer derefences.

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

11 years agoMFC r238171, r248679:
mav [Thu, 18 Apr 2013 10:57:56 +0000 (10:57 +0000)]
MFC r238171, r248679:
Fix long known deadlock between geom dev destruction and d_close() call.
Use destroy_dev_sched_cb() to not wait for device destruction while holding
GEOM topology lock (that actually caused deadlock).  Use request counting
protected by mutex to properly wait for outstanding requests completion in
cases of device closing and geom destruction.  Unlike r227009, this code
does not block taskqueue thread for indefinite time, waiting for completion.

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

11 years agoMFC r248674:
mav [Thu, 18 Apr 2013 10:49:52 +0000 (10:49 +0000)]
MFC r248674:
Make g_wither_washer() to not loop by itself, but only when there was some
more topology change done that may require its attention.  Add few missing
g_do_wither() calls in respective places to signal it.

This fixes potential infinite loop here when some provider is withered, but
still opened or connected for some reason and so can not be destroyed.  For
example, see r227009 and r227510.

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

11 years agoMFC r249224:
mav [Thu, 18 Apr 2013 10:42:48 +0000 (10:42 +0000)]
MFC r249224:
Remove extra semicolons from CAM_SIM_[UN]LOCK() macros.

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

11 years agoMFC r249108:
mav [Thu, 18 Apr 2013 10:40:40 +0000 (10:40 +0000)]
MFC r249108:
 - Unify device to target insertion inside xpt_alloc_device() instead of
duplicating it three times.
 - Reformat code to reduce indentation.
 - Add lock assertions to every point where reference counters are modified.
 - When reference counters are reaching zero, add assertions that there are
no children items left.
 - Add a bit more locking to the xptpdperiphtraverse().

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

11 years agoMFC r249106:
mav [Thu, 18 Apr 2013 10:06:52 +0000 (10:06 +0000)]
MFC r249106:
Replace some direct mutex operations with wrappers.

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

11 years agoMFC r249105:
mav [Thu, 18 Apr 2013 10:03:44 +0000 (10:03 +0000)]
MFC r249105:
Remove extra NULL checks. d_drv1 can never be NULL during periph life cycle.

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

11 years agoMFC r249104:
mav [Thu, 18 Apr 2013 10:01:43 +0000 (10:01 +0000)]
MFC r249104:
Move CAM_DEBUG_CDB messages from the point of queuing to the point of
sending to SIM.  That allows to inspect real requests execution order,
respecting priorities, freezing, etc.

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

11 years agoMFC r249091:
mav [Thu, 18 Apr 2013 09:58:30 +0000 (09:58 +0000)]
MFC r249091:
Use xpt_lock_buses() instead of equivalent mtx_lock(&xsoftc.xpt_topo_lock)
to unify the code.

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

11 years agoMFC r248872, r249048:
mav [Thu, 18 Apr 2013 09:44:00 +0000 (09:44 +0000)]
MFC r248872, r249048:
Make pre-shutdown flush and spindown routines to not use xpt_polled_action(),
but execute the commands in regular way.  There is no any reason to cook CPU
while the system is still fully operational.  After this change polling in
CAM is used only for kernel dumping.

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

11 years agoMFC r248868, r248874:
mav [Thu, 18 Apr 2013 09:40:34 +0000 (09:40 +0000)]
MFC r248868, r248874:
Implement CAM_PERIPH_FOREACH() macro, safely iterating over the list of
driver's periphs, acquiring and releaseing periph references while doing it.

Use it to iterate over the lists of ada and da periphs when flushing caches
and putting devices to sleep on shutdown and suspend.  Previous code could
panic in theory if some device disappear in the middle of the process.

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

11 years agoMFC r248695:
mav [Thu, 18 Apr 2013 09:03:06 +0000 (09:03 +0000)]
MFC r248695:
Remove two bzero()s that are erasing only few more bytes then set later.

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

11 years agoMFC of 248561:
mckusick [Thu, 18 Apr 2013 00:53:47 +0000 (00:53 +0000)]
MFC of 248561:

When renaming a directory from one parent directory to another,
we need to call ufs_checkpath() to walk from our new location to
the root of the filesystem to ensure that we do not encounter
ourselves along the way. Until now, we accomplished this by reading
the ".." entries of each directory in our path until we reached
the root (or encountered an error). This change tries to avoid the
I/O of reading the ".." entries by first looking them up in the
name cache and only doing the I/O when the name cache lookup fails.

Reviewed by: kib
Tested by:   Peter Holm

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

11 years agoMFC of 249064:
mckusick [Thu, 18 Apr 2013 00:12:32 +0000 (00:12 +0000)]
MFC of 249064:

The code in clear_remove() and clear_inodedeps() skips one entry
in the pagedep and inodedep hash tables. An entry in the table is
skipped because 'pagedep_hash' and 'inodedep_hash' hold the size
of the hash tables - 1.

The chance that this would have any operational failure is extremely
unlikely. These funtions only need to find a single entry and are
only called when there are too many entries. The chance that they
would fail because all the entries are on the single skipped hash
chain are remote.

Submitted by: Pedro Martelletto
Reviewed by:  kib

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

11 years agoMFC r248303:
brooks [Tue, 16 Apr 2013 19:28:00 +0000 (19:28 +0000)]
MFC r248303:

Replace our (un)vis(1) commands with implementations from NetBSD to
match our import of the (un)vis(3) APIs.

This adds support for multibyte encoding and the -h and -m flags which
support HTTP and MIME encoding respectively.

PR: bin/175418
Obtained from: NetBSD

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

11 years agoMFC r248302:
brooks [Tue, 16 Apr 2013 19:27:09 +0000 (19:27 +0000)]
MFC r248302:

Update to the latest (un)vis(3) sources from NetBSD.  This adds
multibyte support[0] and the new functions strenvisx and strsenvisx.

Add MLINKS for vis(3) functions add by this and the initial import from
NetBSD[1].

PR: bin/166364, bin/175418
Submitted by: "J.R. Oldroyd" <fbsd@opal.com>[0]
stefanf[1]
Obtained from: NetBSD

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

11 years agoMFC r249449:
dim [Tue, 16 Apr 2013 16:35:48 +0000 (16:35 +0000)]
MFC r249449:

Fix undefined behaviour in several gpio_pin_setflags() routines (under
sys/arm and sys/mips), squelching the clang 3.3 warnings about this.

Noticed by: tinderbox and many irate spectators
Submitted by: Luiz Otavio O Souza <loos.br@gmail.com>
PR: kern/177759

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

11 years agoMFC (much delayed) 234504:
brooks [Tue, 16 Apr 2013 16:09:27 +0000 (16:09 +0000)]
MFC (much delayed) 234504:

Enable DTrace hooks in GENERIC.

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

11 years agoMFC r249316:
dim [Tue, 16 Apr 2013 06:51:07 +0000 (06:51 +0000)]
MFC r249316:

Ensure make -j N universe works correctly, by checking for an up-to-date
make before starting the universe targets themselves.  Otherwise, all of
the targets would attempt to build make simultaneously, overwriting each
other's copies of the make object files and executable.  This could lead
to strange errors, for example when partially-written make executables
are invoked.

Also amend r216620, to make the rest of universe wait properly until the
upgrade_checks target is finished, by adding universe_${target}_prologue
to the .ORDER target.  Otherwise, make will be too smart for its own
good, and start building the universe targets simultaneously with the
prologues anyway.

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

11 years agoMFC r249439:
kib [Tue, 16 Apr 2013 06:20:35 +0000 (06:20 +0000)]
MFC r249439:
Fix the name of the pcb member in the comments.

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

11 years agoMFC r249303:
kib [Tue, 16 Apr 2013 06:17:15 +0000 (06:17 +0000)]
MFC r249303:
Fix the assertions for the state of the object under the map entry
with the MAP_ENTRY_VN_WRITECNT flag.

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

11 years agoDisconnect the CTL module for now; it breaks i386 XEN.
trasz [Tue, 16 Apr 2013 05:57:16 +0000 (05:57 +0000)]
Disconnect the CTL module for now; it breaks i386 XEN.

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

11 years agoMFC r249240:
trociny [Mon, 15 Apr 2013 18:56:03 +0000 (18:56 +0000)]
MFC r249240:

Use pget(9) to reduce code duplication.

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

11 years agoFix mergeinfo after r249503
bapt [Mon, 15 Apr 2013 18:38:21 +0000 (18:38 +0000)]
Fix mergeinfo after r249503

Submitted by: gavin

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

11 years agoMFC r249011:
trasz [Mon, 15 Apr 2013 18:32:35 +0000 (18:32 +0000)]
MFC r249011:

Fix dates in manual pages modified in 249009.

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

11 years agoPull in r178636 from upstream llvm trunk:
dim [Mon, 15 Apr 2013 18:30:00 +0000 (18:30 +0000)]
Pull in r178636 from upstream llvm trunk:

  Second pass at addressing PR15351 by explicitly checking for AVX
  support when getting the host processor information.  It emits a
  .byte sequence on GNUC compilers to work around lack of xgetbv
  support with older assemblers, and resolves a comment typo found in
  the previous patch.

This should fix crashes due to emitting of AVX instructions on certain
processors, which do not support then, when using -march=native.

This is a direct commit to stable/9, since head has a complete import of
llvm/clang trunk, and there is no single commit to merge.

Reported by: Kubilay Kocak <koobs.freebsd@gmail.com>

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

11 years agoMFC r249026:
trasz [Mon, 15 Apr 2013 17:35:14 +0000 (17:35 +0000)]
MFC r249026:

Don't directly dereference userland pointer; instead use kernel pointer
copied in from userspace.  This fixes instant panic when creating CTL LUN
on sparc64.  Not a security problem, since the API is root-only.

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

11 years agoMFC r249019:
trasz [Mon, 15 Apr 2013 17:20:44 +0000 (17:20 +0000)]
MFC r249019:

Fix comment formatting.

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

11 years agoMFC r249012:
trasz [Mon, 15 Apr 2013 17:19:28 +0000 (17:19 +0000)]
MFC r249012:

Remove unused code.

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

11 years agoMFC r249009:
trasz [Mon, 15 Apr 2013 17:16:12 +0000 (17:16 +0000)]
MFC r249009:

Make it possible to build CTL as a module.

MFC r249022 by glebius@:

- Remove extra $FreeBSD$
- Touch options headers to make module buildable.

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

11 years agoMFC: r248151, r248168
bapt [Mon, 15 Apr 2013 07:01:20 +0000 (07:01 +0000)]
MFC: r248151, r248168

Ports are no more exported via cvsup, remove cvsup examples and documentation refering to
ports

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

11 years agoMFC r249397:
delphij [Mon, 15 Apr 2013 05:00:41 +0000 (05:00 +0000)]
MFC r249397:

Fix a few typos.

Reviewed by: gjb

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

11 years agoMFC: r246166
hiren [Mon, 15 Apr 2013 03:09:59 +0000 (03:09 +0000)]
MFC: r246166

Update hwpmc to support the Xeon class of Ivybridge processors.
case 0x3E:      /* Per Intel document 325462-045US 01/2013. */

Add manpage to document all the goodness that is available in this
processor model.

No support for uncore events at this time.

Approved by: sbruno (mentor)

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

11 years agoMFC 234223:
jpaetzel [Sun, 14 Apr 2013 22:38:28 +0000 (22:38 +0000)]
MFC 234223:

Update to version 2.3.1.0

MFC 234284, 234425, 234481:

Unbreak the build caused by 234233

PR: kern/157770
Obtained from: Daniel Braniss <danny@cs.huji.ac.il>

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

11 years agoMFC r249359:
eadler [Sun, 14 Apr 2013 00:49:08 +0000 (00:49 +0000)]
MFC r249359:
fuser(1) requires a filename.

Approved by: cperciva (mentor, implicit)

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

11 years agoMFC r248824 & r248826
sbruno [Sun, 14 Apr 2013 00:20:32 +0000 (00:20 +0000)]
MFC r248824 & r248826

Fix compile with CISS_DEBUG defined

Fix DDB hook to actually work again

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

11 years agoMFC r225846, r225853, r225854, r226121, r226320, r226351, r226942, r228991, r229164...
eadler [Sat, 13 Apr 2013 22:29:13 +0000 (22:29 +0000)]
MFC r225846, r225853, r225854, r226121, r226320, r226351, r226942, r228991, r229164, r230876, r231274, r231516, r232105, r232353, r234221, r234320, r234446, r234600, r236392, r236733, r238058, r238976, r239498, r240362, r240548, r242549, r242849, r242900, r245447, r247752, r249113

Merge all outstanding calendars commits.

Discussed with: gjb, des

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

11 years agoMFC r243856 by joel@:
trasz [Sat, 13 Apr 2013 21:17:43 +0000 (21:17 +0000)]
MFC r243856 by joel@:

Remove superfluous paragraph macro.

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

11 years agoMFC r249375 by joel@:
trasz [Sat, 13 Apr 2013 21:16:15 +0000 (21:16 +0000)]
MFC r249375 by joel@:

Minor spelling and grammar fixes.

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

11 years agoMFC r243849 by bdrewery@:
trasz [Sat, 13 Apr 2013 21:14:51 +0000 (21:14 +0000)]
MFC r243849 by bdrewery@:

- Move EXAMPLES descriptions to before the actual command
- Add mdoc macros for EXAMPLES

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

11 years agoMFC r242140:
trasz [Sat, 13 Apr 2013 21:11:18 +0000 (21:11 +0000)]
MFC r242140:

Add pcpu to the the rctl(8) manual page.

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

11 years agoMFC r242139:
trasz [Sat, 13 Apr 2013 21:04:06 +0000 (21:04 +0000)]
MFC r242139:

Add CPU percentage limit enforcement to RCTL.  The resouce name is "pcpu".
It was implemented by Rudolf Tomori during Google Summer of Code 2012.

MFC r242957:

Don't divide by zero.

MFC r243070:

Fix kassert that's not really valid for %CPU accounting.  The problem
here is race between decaying the resource usage in containers, and updating
per-process usage; basically, the former may cause per-container usage
to get smaller than per-process usage.

MFC r243088:

Improve KASSERT messages in racct, to make it clear which resource
caused the problem.

MFC r248298:

Accessing td_state requires thread lock to be held.

MFC r248300:

When throttling a process to enforce RACCT limits, do not use neither
PBDRY (which simply doesn't make any sense) nor PCATCH (which could
be used by a malicious process to work around the PCPU limit).

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

11 years agoMFC r249161:
mav [Fri, 12 Apr 2013 17:15:47 +0000 (17:15 +0000)]
MFC r249161:
Following r241022, replace iteration over the provider list on media events
by taking first one and asserting that there is no others.

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

11 years agoMFC r249163:
kib [Fri, 12 Apr 2013 13:04:23 +0000 (13:04 +0000)]
MFC r249163:
If filter of the interrupt event is not null, print it, in addition to
the handler address.  Add a mark to distinguish between filter and
handler.

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

11 years agoMFC r232385 by ru: Remove 3 syscalls from opendir().
jilles [Fri, 12 Apr 2013 11:37:24 +0000 (11:37 +0000)]
MFC r232385 by ru: Remove 3 syscalls from opendir().

Finally removed the stat() and fstat() calls from the opendir() code.
They were made excessive in r205424 by opening with O_DIRECTORY.
Also eliminated the fcntl() call used to set FD_CLOEXEC by opening
with O_CLOEXEC.

(fdopendir() still checks that the passed descriptor is a directory,
and sets FD_CLOEXEC on it.)

The necessary kernel support for O_DIRECTORY and O_CLOEXEC was already in
9.0-RELEASE.

Discussed with: ru

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

11 years agoMFC r245525:
bz [Thu, 11 Apr 2013 22:04:19 +0000 (22:04 +0000)]
MFC r245525:

  Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces.
  Do this per jail started, not per address.  This will allow DAD to complete
  and services to properly start.   Before we have seen problems with services
  trying to start before the IPv6 address was available to use and thus
  erroring and failing to start.

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

11 years agoMFC r249241:
trociny [Thu, 11 Apr 2013 20:12:28 +0000 (20:12 +0000)]
MFC r249241:

Fix synopsis for sbuf_len.

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

11 years agoMFC r239046:
andreast [Thu, 11 Apr 2013 18:47:16 +0000 (18:47 +0000)]
MFC r239046:

Fix typo.

PR: kern/177495

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

11 years agoMFC r249062:
mav [Wed, 10 Apr 2013 18:13:33 +0000 (18:13 +0000)]
MFC r249062:
Since ATA_CAM mode has no implemented support for serializing access to the
different ATA channels, required for acard and pc98 ATA controllers, block
access to second channels of both, hoping that one working channel is better
then none.  I have an idea how that support could be implemented, but I have
no hardware to work on that.

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

11 years agoMFC r249052:
mav [Wed, 10 Apr 2013 18:07:25 +0000 (18:07 +0000)]
MFC r249052:
Add some more ATA_CAM ifdefs.

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

11 years agoMFC r248800:
mav [Wed, 10 Apr 2013 17:49:25 +0000 (17:49 +0000)]
MFC r248800:
On SIM destruction free associated CCBs, preallocated inside xpt_get_ccb().
Before this change they were just leaked.  Fortunately USB sticks now use
only one CCB, and so leak was only 2KB per detach, while other bigger SIMs
with much more allocated CCBs are rarely detached.

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

11 years agoMFC r248794:
kib [Wed, 10 Apr 2013 08:59:50 +0000 (08:59 +0000)]
MFC r248794:
Fix a race with the vnode reclamation in the aio_qphysio().

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

11 years agoMFC r248792:
kib [Wed, 10 Apr 2013 08:49:37 +0000 (08:49 +0000)]
MFC r248792:
Add dev_strategy_csw() function. Use it from physio(), to avoid two
extra dev_mtx lock and unlock.

Do some style cleanup in physio().

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

11 years agoMFC r248627:
delphij [Mon, 8 Apr 2013 23:06:25 +0000 (23:06 +0000)]
MFC r248627:

Don't attempt to reference sc before testing whether it's NULL.

Submitted by: Sascha Wildner
Obtained from: DragonFly

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

11 years agoMFC r247596:
delphij [Mon, 8 Apr 2013 23:01:33 +0000 (23:01 +0000)]
MFC r247596:

Fix assignment of maximum bounadary.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly rev fd39c81ba220f7ad6e4dc9b30d45e828cf58a1ad

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

11 years agoMFC r247595:
delphij [Mon, 8 Apr 2013 22:56:40 +0000 (22:56 +0000)]
MFC r247595:

Fix wrong assignment.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly rev 9568dd07a22a136e380e6c19a8ea188eb92976d5

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

11 years agoMFC: r247859
jkim [Mon, 8 Apr 2013 22:31:35 +0000 (22:31 +0000)]
MFC: r247859

Update the manual page to reflect reality.  With r138509 and r152355,
"nostrictjoliet" option for mount_cd9660(8) was completely replaced with
"brokenjoliet" somehow.

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

11 years agoMFC: r248799
jkim [Mon, 8 Apr 2013 20:43:53 +0000 (20:43 +0000)]
MFC: r248799

Limit the amount of video memory we map for the driver to the maximum value.

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