freebsd.git
9 years agoMerge libucl 20140718 (fixes a bug in the parser)
bapt [Sat, 19 Jul 2014 14:10:31 +0000 (14:10 +0000)]
Merge libucl 20140718 (fixes a bug in the parser)

9 years agoImport libucl 20140718 (fixes a bug in the parser)
bapt [Sat, 19 Jul 2014 14:07:49 +0000 (14:07 +0000)]
Import libucl 20140718 (fixes a bug in the parser)

9 years agosh: Deduplicate some code in ulimit builtin.
jilles [Sat, 19 Jul 2014 14:06:23 +0000 (14:06 +0000)]
sh: Deduplicate some code in ulimit builtin.

9 years agoUse a C wrapper for trap() instead of checking and calling the DTrace trap
markj [Sat, 19 Jul 2014 02:27:31 +0000 (02:27 +0000)]
Use a C wrapper for trap() instead of checking and calling the DTrace trap
hook in assembly.

Suggested by: kib
Reviewed by: kib (original version)
X-MFC-With: r268600

9 years agoUse unsigned optlen in getsourcefilter()
pfg [Sat, 19 Jul 2014 01:53:52 +0000 (01:53 +0000)]
Use unsigned optlen in getsourcefilter()

Sizes can not be negative and the functions that use it
expect an unsigned value anyways.

Obtained from: Apple (Libc-997.90.3)
MFC after: 1 week

9 years agor243637 changed the default number of nfsd threads created,
rmacklem [Sat, 19 Jul 2014 01:15:01 +0000 (01:15 +0000)]
r243637 changed the default number of nfsd threads created,
but the man page did not reflect this.
This is a content change.

Reported by: bde
MFC after: 2 weeks

9 years agoReduce lock contention on the z_teardown_lock under heavily cached
delphij [Sat, 19 Jul 2014 00:26:03 +0000 (00:26 +0000)]
Reduce lock contention on the z_teardown_lock under heavily cached
read workload by splitting the single teardown rrw lock into
RRM_NUM_LOCKS (17) of them.

Read acquisitions are randomly distributed among these locks based
on curthread pointer.  Write acquisitions are going to all the
locks, which for the usage of this type of lock should be rare.

Illumos issue:
    5008 lock contention (rrw_exit) while running a read only load

MFC after: 2 weeks

9 years agoDocument the need to regenerate the local_unbound configuration.
des [Sat, 19 Jul 2014 00:11:51 +0000 (00:11 +0000)]
Document the need to regenerate the local_unbound configuration.

9 years agoOops, forgot to bump manual date/copyright in r268860.
dteske [Fri, 18 Jul 2014 23:23:52 +0000 (23:23 +0000)]
Oops, forgot to bump manual date/copyright in r268860.

MFC after: 3 days
X-MFC-to: stable/10, stable/9, ports
X-MFC-with: r268860

9 years agoAdd libsbuf.so.6 to obsolete libraries since it has been bumped to .so.7
bapt [Fri, 18 Jul 2014 23:04:27 +0000 (23:04 +0000)]
Add libsbuf.so.6 to obsolete libraries since it has been bumped to .so.7

9 years agoImprove timeout(1) man page
bapt [Fri, 18 Jul 2014 22:56:59 +0000 (22:56 +0000)]
Improve timeout(1) man page

Document the exit values and the duration format
Improve wording
Pet mandoc -Tlint
Sort SEE ALSO

Phabric: https://phabric.freebsd.org/D432
Reviewed by: wblock

9 years agoMinor enhancements, bug fixes, and man-page adjustments.
dteske [Fri, 18 Jul 2014 22:44:15 +0000 (22:44 +0000)]
Minor enhancements, bug fixes, and man-page adjustments.

+ Make `sysrc -x foo' produce error status if foo is unset.
NB: Reported by lme (everything else ``while I'm at it'')
+ Remove mention of SYSRC_VERBOSE from `sysrc --help' output.
NB: False documentation leftover from an ancient precursor.
+ Make `sysrc -qc foo' work the same as `sysrc -ic foo' when foo is unset
NB: For syntax convenience (my fingers know `-q' more than `-i').
+ Update description of `-c' flag in help message/manual.
+ Update description of `-q' flag in help message/manual.
+ Make `sysrc -vc foo' work as documented in the manual
NB: Show message stating whether foo is currently set.
+ Make `sysrc -vc foo=1' work as documented in the manual
NB: Show message stating how value of foo would be changed (if at all).
+ Remove odd usage of parentheses in `-R dir' section of manual.
+ Clarify syntax section of manual w/respect to sysctl(8) similarities.
+ Add new/missing people to the `THANKS TO' section of the manual.

Reported by: lme
MFC after: 3 days
X-MFC-to: stable/10, stable/9, ports

9 years agoMFV r268851:
delphij [Fri, 18 Jul 2014 22:34:01 +0000 (22:34 +0000)]
MFV r268851:

When a sync task is waiting for a txg to complete, we should hurry it along
by increasing the number of outstanding async writes (i.e. make
vdev_queue_max_async_writes() return a larger number).

Illumos issue:
    4753 increase number of outstanding async writes when sync task is waiting

MFC after: 2 weeks

9 years agoMFV r268850:
delphij [Fri, 18 Jul 2014 22:04:21 +0000 (22:04 +0000)]
MFV r268850:

Change the interaction between the DMU and ARC so that when the DMU is
shutting down an objset, we do not evict the data from the ARC.  Instead
we simply coordinate the destruction of the DMU's data with the ARC.

The only case where we actually need to explicitly evict from the ARC is
when dbuf_rele_and_unlock() determines that the administrator has requested
that it not be kept in memory, via the primarycache/secondarycache properties.
In this case, we evict the data from the ARC by its blkptr_t, the same way
as when a block is freed we explicitly evict it from the ARC.

Illumos issue:
    4631 zvol_get_stats triggering too many reads

MFC after: 2 weeks

9 years agottyname(3): Fix EBADF/ENOTTY error descriptions.
jilles [Fri, 18 Jul 2014 21:29:59 +0000 (21:29 +0000)]
ttyname(3): Fix EBADF/ENOTTY error descriptions.

Also, make sure to document the return values and errors for all three
functions in the man page.

PR: 191931
MFC after: 1 week

9 years agoFix build by using the driver API (driver converted in r266979 which should
delphij [Fri, 18 Jul 2014 21:28:59 +0000 (21:28 +0000)]
Fix build by using the driver API (driver converted in r266979 which should
be upstreamed).

X-MFC with: r268854
MFC after: 5 days

9 years agoMFV r268848:
delphij [Fri, 18 Jul 2014 20:41:40 +0000 (20:41 +0000)]
MFV r268848:

Instead of asserting all zio's be properly aligned, only assert
on the logical ones.

Cap uberblocks at 8k, otherwise with ashift=17, there would be
only one uberblock.

This fixes a problem that zdb would trip assert on pools with
ashift >= 0xe (8k).

While there, also change the code so it only attempt to condense
space map unless the uncondensed size consumes greater than
zfs_metaslab_condense_block_threshold blocks.

Illumos issue:
  4958 zdb trips assert on pools with ashift >= 0xe

MFC after: 2 weeks

9 years agoInitiate error recovery stats fail to update after 3 retries.
davidcs [Fri, 18 Jul 2014 20:04:11 +0000 (20:04 +0000)]
Initiate error recovery stats fail to update after 3 retries.
Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to
panic only if ECORE_STOP_ON_ERROR is defined.

MFC after:5 days

9 years agoThe description is a bit misleading. Trying to make it more obvious.
hiren [Fri, 18 Jul 2014 16:25:35 +0000 (16:25 +0000)]
The description is a bit misleading. Trying to make it more obvious.

Phabric:    https://phabric.freebsd.org/D435
Reviewed by: gnn

9 years agoRevert r268826:
pfg [Fri, 18 Jul 2014 16:21:15 +0000 (16:21 +0000)]
Revert r268826:
The current ordering of this header is a feature as it
is more consistent with POSIX.
Also adding gratuitous newlines is not elegant.

Pointed out by: bde

9 years agoRemove obsolete man pages. The corresponding code was removed in r255608.
alc [Fri, 18 Jul 2014 15:39:07 +0000 (15:39 +0000)]
Remove obsolete man pages.  The corresponding code was removed in r255608.

9 years agoUse assignment instead of bcopy.
glebius [Fri, 18 Jul 2014 14:59:35 +0000 (14:59 +0000)]
Use assignment instead of bcopy.

Submitted by: jmg

9 years agoExtend kqueue's EVFILT_TIMER by adding precision unit flags support
bapt [Fri, 18 Jul 2014 14:27:04 +0000 (14:27 +0000)]
Extend kqueue's EVFILT_TIMER by adding precision unit flags support

Define the precision macros as bits sets to conform with XNU equivalent.
Test fflags passed for EVFILT_TIMER and return EINVAL in case an invalid flag
is passed.

Phabric: https://phabric.freebsd.org/D421
Reviewed by: kib

9 years agoFix two typos in iscsictl.8
gavin [Fri, 18 Jul 2014 12:51:35 +0000 (12:51 +0000)]
Fix two typos in iscsictl.8

PR: 191581
Submitted by: Jimmy Olgeni
MFC after: 3 days

9 years agoUse a combination of unblock-lan-zones (r268839) and domain-insecure
des [Fri, 18 Jul 2014 12:33:22 +0000 (12:33 +0000)]
Use a combination of unblock-lan-zones (r268839) and domain-insecure
to fix reverse lookups on networks using private addresses.

9 years agoImport unblock-lan-zones feature backported from upstream svn trunk.
des [Fri, 18 Jul 2014 11:32:44 +0000 (11:32 +0000)]
Import unblock-lan-zones feature backported from upstream svn trunk.
This is a partial fix for reverse lookups in RFC 1918 networks.  With
this option enabled, unbound no longer ignores these queries; however,
it will still reject the answer it gets from the forwarder, because
the RFC 1918 reverse zones are signed.

Submitted by: "W.C.A. Wijngaards" <wouter@nlnetlabs.nl>

9 years agoAdd support for Toradex Apalis i.MX6 development board.
br [Fri, 18 Jul 2014 08:23:53 +0000 (08:23 +0000)]
Add support for Toradex Apalis i.MX6 development board.

Sponsored by: Toradex AG

9 years agoUpdate the default RSS hash to the Chelsio T5 firmware one - it provides
adrian [Fri, 18 Jul 2014 08:22:13 +0000 (08:22 +0000)]
Update the default RSS hash to the Chelsio T5 firmware one - it provides
markedly better distribution of IPv6 address/ports than the previous key.

The previous key would hash large swaths of the port space for a given
source/destination IP address to the same low handful of bits, effectively
mapping them to the same queue.  This made testing very .. special.

9 years agoFix typo.
br [Fri, 18 Jul 2014 08:08:45 +0000 (08:08 +0000)]
Fix typo.

9 years agoRename gpio driver file.
br [Fri, 18 Jul 2014 07:52:35 +0000 (07:52 +0000)]
Rename gpio driver file.

9 years agoo Enable GPIO device driver for i.MX6.
br [Fri, 18 Jul 2014 07:47:50 +0000 (07:47 +0000)]
o Enable GPIO device driver for i.MX6.
  It was originally written for i.MX5 and compatible with newer chip.
o Extend device tree information
o style(9) fixes

Discussed with: ian

9 years agoFix an apparent conversion error in bge to the new driver api.
peter [Fri, 18 Jul 2014 07:41:38 +0000 (07:41 +0000)]
Fix an apparent conversion error in bge to the new driver api.
if_multiaddr_array() does the LLADDR work, don't do it twice.

This broke IPv6 in "interesting" ways in the FreeBSD.org cluster.

9 years agoUpdate libucl to the 2014-07-16 snapshot
bapt [Fri, 18 Jul 2014 06:58:01 +0000 (06:58 +0000)]
Update libucl to the 2014-07-16 snapshot
This update brings streamlined ucl emitter support

9 years agoRemove an obsolete man page.
alc [Fri, 18 Jul 2014 06:56:24 +0000 (06:56 +0000)]
Remove an obsolete man page.

9 years agoImport libucl 2014-07-16
bapt [Fri, 18 Jul 2014 06:49:18 +0000 (06:49 +0000)]
Import libucl 2014-07-16

9 years agoFix "ndp -d hostname".
peter [Fri, 18 Jul 2014 06:48:02 +0000 (06:48 +0000)]
Fix "ndp -d hostname".

9 years agoMinor sorting to match the NetBSD header
pfg [Fri, 18 Jul 2014 02:49:41 +0000 (02:49 +0000)]
Minor sorting to match the NetBSD header

MFC after: 3 days
Obtained from: NetBSD

9 years agoRemove deprecated definition "m_act".
kevlo [Fri, 18 Jul 2014 01:35:20 +0000 (01:35 +0000)]
Remove deprecated definition "m_act".

Suggested by: adrian, glebius

9 years agoFix manpages path and sort entries
bapt [Thu, 17 Jul 2014 23:30:29 +0000 (23:30 +0000)]
Fix manpages path and sort entries

9 years agoRemove texinfo manpages as well if built WITHOUT_INFO
bapt [Thu, 17 Jul 2014 23:24:33 +0000 (23:24 +0000)]
Remove texinfo manpages as well if built WITHOUT_INFO

9 years agoFix markups.
delphij [Thu, 17 Jul 2014 23:23:01 +0000 (23:23 +0000)]
Fix markups.

9 years agoFix markup regression introduced in r268369.
delphij [Thu, 17 Jul 2014 23:14:47 +0000 (23:14 +0000)]
Fix markup regression introduced in r268369.

9 years agoAdd the mtree entry for yacc tests
bapt [Thu, 17 Jul 2014 22:26:24 +0000 (22:26 +0000)]
Add the mtree entry for yacc tests

9 years agoUpdate to byacc 20140715 (only concerns regression tests being fixed)
bapt [Thu, 17 Jul 2014 22:22:38 +0000 (22:22 +0000)]
Update to byacc 20140715 (only concerns regression tests being fixed)
Directly use regression test from upstream

PR: 191020
Submitted by: gcooper (yaneurabeya@gmail.com)

9 years agoIncrease maximal number of SCSI ports in CTL from 32 to 128.
mav [Thu, 17 Jul 2014 21:16:52 +0000 (21:16 +0000)]
Increase maximal number of SCSI ports in CTL from 32 to 128.

After I gave each iSCSI target its own port, the old limit appeared to be
not so big.  This change almost proportionally increases per-LUN memory
use, but it is still three times better then it was before r268807.

MFC after: 2 weeks

9 years agoReduce per-LUN memory usage from 18MB to 1.8MB.
mav [Thu, 17 Jul 2014 20:28:51 +0000 (20:28 +0000)]
Reduce per-LUN memory usage from 18MB to 1.8MB.

CTL never had use for CA support code since SPI has gone, and there is no
even frontends supporting that.  But it still was reserving 256 bytes of
memory per LUN per every possible initiator on every possible port.

Wrap unused code with ifdef's in case somebody even need it.

MFC after: 2 weeks

9 years agoAdd a man page for the new function pmap_unwire().
alc [Thu, 17 Jul 2014 20:03:52 +0000 (20:03 +0000)]
Add a man page for the new function pmap_unwire().

9 years agoReplace all uses of libncurses and libtermcap with their wide character
brooks [Thu, 17 Jul 2014 18:24:34 +0000 (18:24 +0000)]
Replace all uses of libncurses and libtermcap with their wide character
variants.  This allows usable file system images (i.e. those with both a
shell and an editor) to be created with only one copy of the curses library.

Exp-run: antoine
PR: 189842
Discussed with: bapt
Sponsored by: DARPA, AFRL

9 years agoRemove the man page for a pmap function that no longer exists.
alc [Thu, 17 Jul 2014 17:41:32 +0000 (17:41 +0000)]
Remove the man page for a pmap function that no longer exists.

9 years agoAdd support for the fixed image type. The fixed image is effectively
marcel [Thu, 17 Jul 2014 16:33:38 +0000 (16:33 +0000)]
Add support for the fixed image type. The fixed image is effectively
a raw image with a VHD footer appended. There's little value that I
can see to use the fixed image type, but in order to make VHD images
for use by Microsoft's Azure platform, they must be fixed VHD images.

Support has been added by refactoring the code to re-use common code
and by adding a second output format structure.  To created fixed VHD
images, specify "vhdf" as the output format.

9 years agogrep: fix some memory leaks.
pfg [Thu, 17 Jul 2014 15:59:13 +0000 (15:59 +0000)]
grep: fix some memory leaks.
Add memory leak fix missing from r268799.

Obtained from: NetBSD

9 years agoFix indentation
bdrewery [Thu, 17 Jul 2014 15:50:23 +0000 (15:50 +0000)]
Fix indentation

9 years agogrep: fix some memory leaks.
pfg [Thu, 17 Jul 2014 15:48:11 +0000 (15:48 +0000)]
grep: fix some memory leaks.

Bring a couple of changes from NetBSD:

queue.c (CVS Rev. 1.4. 1.5)
Fix memory leaks.
NULL does not need a cast.

grep.c (CVS Rev. 1.6)
Use the more portable getline.

Obtained from: NetBSD
MFC after: 3 days

9 years agogrep: Fix type.
pfg [Thu, 17 Jul 2014 14:51:50 +0000 (14:51 +0000)]
grep: Fix type.

Obtained from: NetBSD (CVS rev. 1.17)
MFC after: 3 days

9 years agoFix embarassing typos I made.
nwhitehorn [Thu, 17 Jul 2014 12:47:34 +0000 (12:47 +0000)]
Fix embarassing typos I made.

Submitted by: rayddteam

9 years agoFix ctld crash on startup if target alias is not set.
mav [Thu, 17 Jul 2014 11:38:37 +0000 (11:38 +0000)]
Fix ctld crash on startup if target alias is not set.

MFC after: 3 days

9 years agounits(1): Add basic tests
eadler [Thu, 17 Jul 2014 07:12:12 +0000 (07:12 +0000)]
units(1): Add basic tests
Add some tests to help avoid breaking units

9 years agochown: Fix chown test number
eadler [Thu, 17 Jul 2014 06:57:26 +0000 (06:57 +0000)]
chown: Fix chown test number

9 years agounits(1): Add support for output-format
eadler [Thu, 17 Jul 2014 06:54:12 +0000 (06:54 +0000)]
units(1): Add support for output-format
Add support for the output-format argument.  This also exposes subtle
rounding differences between GNU units and our units.

9 years agoFix a typo.
hiren [Thu, 17 Jul 2014 06:21:58 +0000 (06:21 +0000)]
Fix a typo.

PR: 191898
Submitted by: vsjcfm@gmail.com

9 years agoOops - somehow I missed the IP option numbers clashing with the multicast
adrian [Thu, 17 Jul 2014 05:45:54 +0000 (05:45 +0000)]
Oops - somehow I missed the IP option numbers clashing with the multicast
numbers below.

Move them to a new set of non-clashing numbers.

9 years agoDeprecate m_act. Use m_nextpkt always.
kevlo [Thu, 17 Jul 2014 05:21:16 +0000 (05:21 +0000)]
Deprecate m_act.  Use m_nextpkt always.

9 years agoCorrect the name of the man page for pmap_ts_referenced().
alc [Wed, 16 Jul 2014 23:17:57 +0000 (23:17 +0000)]
Correct the name of the man page for pmap_ts_referenced().

Sponsored by: EMC / Isilon Storage Division

9 years agoNuke the never-used RF_TIMESHARE feature, reducing the complexity of the
truckman [Wed, 16 Jul 2014 22:18:19 +0000 (22:18 +0000)]
Nuke the never-used RF_TIMESHARE feature, reducing the complexity of the
code.  The consensus on arch@ is that this feature might have been useful
in the distant past, but is now just unnecessary bloat.

The int_rman_activate_resource() and int_rman_deactivate_resource()
functions become trivial, so manually inline them.

The special deferred handling of RF_ACTIVE is no longer needed in
reserve_resource_bound(), so eliminate the associated code at the
end of the function.

These changes reduce the object file size by more than 500 bytes on i386.

Update the rman.9 man page to reflect the removal of the RF_TIMESHARE
feature.

MFC after: 2 weeks

9 years agoRegen after r268778 to replace WITH_TESTS with WITHOUT_TESTS.
jmmv [Wed, 16 Jul 2014 21:43:24 +0000 (21:43 +0000)]
Regen after r268778 to replace WITH_TESTS with WITHOUT_TESTS.

9 years agoEnable MK_TESTS by default, take 2.
jmmv [Wed, 16 Jul 2014 21:40:11 +0000 (21:40 +0000)]
Enable MK_TESTS by default, take 2.

This is a redo of r267424, which was reverted in r267432 because it broke
"make buildworld" from FreeBSD 9.x.  This issue has been resolved and this
change is still "make tinderbox" clean.

9 years agoAdd emulation for legacy x86 task switching mechanism.
neel [Wed, 16 Jul 2014 21:26:26 +0000 (21:26 +0000)]
Add emulation for legacy x86 task switching mechanism.

FreeBSD/i386 uses task switching to handle double fault exceptions and this
change enables that to work.

Reported by: glebius

9 years agoImplement pmap_unwire(). See r268327 for the motivation behind this change.
alc [Wed, 16 Jul 2014 21:06:43 +0000 (21:06 +0000)]
Implement pmap_unwire().  See r268327 for the motivation behind this change.

9 years agoAfter r261991, clang warnings about unused functions in the kernel were
dim [Wed, 16 Jul 2014 20:37:03 +0000 (20:37 +0000)]
After r261991, clang warnings about unused functions in the kernel were
completely silenced.  Make sure these warnings appear again, so there is
some incentive to fix them, but do not error out the whole kernel build
for them.

Noticed by: steven@pyro.eu.org
PR: 191867
MFC after: 3 days

9 years agoRevert previous revision (r268461) for reasons documented in PR.
dteske [Wed, 16 Jul 2014 19:02:30 +0000 (19:02 +0000)]
Revert previous revision (r268461) for reasons documented in PR.
To use tmux in an rc.d script, use the new-session flag "-d".
To use screen in an rc.d script, use the "-dm" flag.
If you really need to launch an attached session, manually
export TERM=xterm (FreeBSD 9.0 or higher) or export TERM=cons25
for older releases.

Reported by: bdrewery
Discussed on: src-committers, svn-src-all, svn-src-head
PR: bin/191869

9 years agoAllow efifb to be used with xf86-video-scfb. This is important for EFI
nwhitehorn [Wed, 16 Jul 2014 18:52:21 +0000 (18:52 +0000)]
Allow efifb to be used with xf86-video-scfb. This is important for EFI
systems without either a CSM or real graphics drivers, such as my Lenovo
Haswell laptop.

This provides working X with the small complication of a console cursor
permanently overlaid on the upper-left corner of the screen that will be
dealt with later.

Also remove some redundant screen clearing.

9 years agoAllow console drivers active from early boot to be used with xf86-video-scfb,
nwhitehorn [Wed, 16 Jul 2014 18:49:46 +0000 (18:49 +0000)]
Allow console drivers active from early boot to be used with xf86-video-scfb,
rather than only drivers attached later on. This involves a small amount of
code duplication with dev/fb/fbd.c, which will fixed later on.

Also improve performance of vt_blank() by making it not read from the
framebuffer unnecessarily.

9 years agolibpythagoras needs libm.
jmmv [Wed, 16 Jul 2014 16:42:58 +0000 (16:42 +0000)]
libpythagoras needs libm.

This fixes "make tinderbox" failures on various architectures when
WITH_TESTS=yes is enabled.  Problem introduced in r267679.

9 years agoAdd support for VMWare dialect of EXTENDED COPY command, aka VAAI Clone.
mav [Wed, 16 Jul 2014 15:57:17 +0000 (15:57 +0000)]
Add support for VMWare dialect of EXTENDED COPY command, aka VAAI Clone.

This allows to clone VMs and move them between LUNs inside one storage
host without generating extra network traffic to the initiator and back,
and without being limited by network bandwidth.

LUNs participating in copy operation should have UNIQUE NAA or EUI IDs set.
For LUNs without these IDs VMWare will use traditional copy operations.

Beware: the above LUN IDs explicitly set to values non-unique from the VM
cluster point of view may cause data corruption if wrong LUN is addressed!

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

9 years agoDo not ignore error from tmpfs_alloc_vp(). It results in access to
kib [Wed, 16 Jul 2014 14:08:01 +0000 (14:08 +0000)]
Do not ignore error from tmpfs_alloc_vp().  It results in access to
the random memory.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoRemove unused header.
kib [Wed, 16 Jul 2014 14:06:16 +0000 (14:06 +0000)]
Remove unused header.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoCheck for the cross-device cross-link attempt in the VFS, instead of
kib [Wed, 16 Jul 2014 14:04:46 +0000 (14:04 +0000)]
Check for the cross-device cross-link attempt in the VFS, instead of
forcing filesystem VOP_LINK() methods to repeat the code.  In
tmpfs_link(), remove redundand check for the type of the source,
already done by VFS.

Note that NFS server already performs this check before calling
VOP_LINK().

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoSort properly the headers
bapt [Wed, 16 Jul 2014 13:52:05 +0000 (13:52 +0000)]
Sort properly the headers
While here space/tabs cleanup

Reviewed by: kib

9 years agoWhite space fixes
bapt [Wed, 16 Jul 2014 12:09:12 +0000 (12:09 +0000)]
White space fixes

9 years agoSort headers
bapt [Wed, 16 Jul 2014 11:41:28 +0000 (11:41 +0000)]
Sort headers
Constify long options
Remove useless call to sigemptyset
properly check errno when waiting for a process status when a SIGCHLD is received

9 years agoFix typo
bapt [Wed, 16 Jul 2014 11:30:04 +0000 (11:30 +0000)]
Fix typo

9 years agoStyle(9) fix
bapt [Wed, 16 Jul 2014 11:28:53 +0000 (11:28 +0000)]
Style(9) fix

9 years agoFix build with gcc
bapt [Wed, 16 Jul 2014 10:37:05 +0000 (10:37 +0000)]
Fix build with gcc

9 years agoFix indentation
bapt [Wed, 16 Jul 2014 10:34:55 +0000 (10:34 +0000)]
Fix indentation

9 years agoNew BSDL timeout(1) utility compatible with GNU timeout
bapt [Wed, 16 Jul 2014 09:55:36 +0000 (09:55 +0000)]
New BSDL timeout(1) utility compatible with GNU timeout

it fully passes the GNU timeout regression tests, it is written in a mostly
portable way (only signal parsing is relying on non portable structures)

Phabric: D377

9 years agoImprove support for Intel Lynx Point USB 3.0 controllers by using the
hselasky [Wed, 16 Jul 2014 06:14:41 +0000 (06:14 +0000)]
Improve support for Intel Lynx Point USB 3.0 controllers by using the
USB 2.0 port mask in addition to the USB 3.0 port mask. The hardware
does not always accept when writing -1U to the port switching
registers.

MFC after: 3 days
Tested by: Huang Wen Hui <huanghwh@gmail.com>

9 years agoWhen we fail to extract the pkg binaries (for example, / is read-only),
gavin [Wed, 16 Jul 2014 00:12:57 +0000 (00:12 +0000)]
When we fail to extract the pkg binaries (for example, / is read-only),
give a more helpful error message.

MFC after: 1 week

9 years agoAdd a bandaid to fix GCC build (on sparc64 et al).
delphij [Tue, 15 Jul 2014 23:35:06 +0000 (23:35 +0000)]
Add a bandaid to fix GCC build (on sparc64 et al).

9 years agoMove the "retry:" label so that the calls to m_pullup() are
rmacklem [Tue, 15 Jul 2014 23:32:13 +0000 (23:32 +0000)]
Move the "retry:" label so that the calls to m_pullup() are
not done after the call to m_defrag(). This fixes a problem
where m_pullup() would prepend an mbuf to the list created
by m_defrag() making the chain greater than 32 again.

Tested by: rcarter@pinyon.org
Reviewed by: yongari, jfv
MFC after: 2 weeks

9 years agoSince r202933, kthread_suspend_check() takes no arguments. Update the
gavin [Tue, 15 Jul 2014 23:29:20 +0000 (23:29 +0000)]
Since r202933, kthread_suspend_check() takes no arguments.  Update the
example to match.

MFC after: 3 days

9 years agoAlso link 'show bio' to g_bio(9.)
bdrewery [Tue, 15 Jul 2014 22:57:50 +0000 (22:57 +0000)]
Also link 'show bio' to g_bio(9.)

X-MFC-With: r268715
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoMFV r268714:
delphij [Tue, 15 Jul 2014 22:44:04 +0000 (22:44 +0000)]
MFV r268714:

Improve extreme rewind import.

When doing an "extreme rewind" import ("zpool import -XF"), we attempt
to verify all data in the pool, essentially scrubbing the entire pool.
The problem is that spa_load_verify_cb() issues an unbounded number of
concurrent scrub i/os.  This can lead to all of memory being used for
these zio's, wedging the system. Like normal scrub, we need to put a
cap on the number of outstanding i/os, and have the traverse thread
block when we reach this cap.

For this purpose the cap can be very large (10,000) to optimize the
elevator algorithm.  Three kernel tunables have been added:

vfs.zfs.spa_load_verify_maxinflight
vfs.zfs.spa_load_verify_metadata
vfs.zfs.spa_load_verify_data

The latter two tunables controls whether metadata and/or user data
when doing extreme rewind.

Make 'zpool import -T' imply scrub.

Make zpool import -T <txg> accept hexadecimal values for the txg when
prefixed with 0x.

Skip txg's for which there is no uberblock when doing extreme rewind.

Skip reading all user data twice by skipping prefetches when doing
extreme rewinds as we do not access via the ARC.

Illumos issues:
  4970 need controls on i/o issued by zpool import -XF
  4971 zpool import -T should accept hex values
  4972 zpool import -T implies extreme rewind, and thus a scrub
  4973 spa_load_retry retries the same txg
  4974 spa_load_verify() reads all data twice

MFC after: 2 weeks

9 years agoDocument the 'show bio' command added in 2009.
bdrewery [Tue, 15 Jul 2014 21:13:08 +0000 (21:13 +0000)]
Document the 'show bio' command added in 2009.

While here also reword 'show buffer' to have an 'addr' argument and to
match other struct documentation.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoMFV r268702:
delphij [Tue, 15 Jul 2014 20:32:23 +0000 (20:32 +0000)]
MFV r268702:

Add missing *_destroy() calls in various places with ZFS.

Illumos issue:
  4975 missing mutex_destroy() calls in zfs

MFC after: 2 weeks

9 years agoFollowup to r268466.
kib [Tue, 15 Jul 2014 19:57:03 +0000 (19:57 +0000)]
Followup to r268466.

- Move the code to calculate resident count into separate function.
  It reduces the indent level and makes the operation of
  vmmap_skip_res_cnt tunable more clear.
- Optimize the calculation of the resident page count for map entry.
  Skip directly to the next lowest available index and page among the
  whole shadow chain.
- Restore the use of pmap_incore(9), only to verify that current
  mapping is indeed superpage.
- Note the issue with the invalid pages.

Suggested and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoChange the calculation of the kinfo_vmentry field kve_private_resident
kib [Tue, 15 Jul 2014 19:49:00 +0000 (19:49 +0000)]
Change the calculation of the kinfo_vmentry field kve_private_resident
to reflect its name.

Noted and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agocxgbe(4): Display CF facility correctly in the device log.
np [Tue, 15 Jul 2014 18:24:41 +0000 (18:24 +0000)]
cxgbe(4): Display CF facility correctly in the device log.

MFC after: 3 days

9 years agoAdd support for operand size and address size override prefixes in bhyve's
neel [Tue, 15 Jul 2014 17:37:17 +0000 (17:37 +0000)]
Add support for operand size and address size override prefixes in bhyve's
instruction emulation [1].

Fix bug in emulation of opcode 0x8A where the destination is a legacy high
byte register and the guest vcpu is in 32-bit mode. Prior to this change
instead of modifying %ah, %bh, %ch or %dh the emulation would end up
modifying %spl, %bpl, %sil or %dil instead.

Add support for moffsets by treating it as a 2, 4 or 8 byte immediate value
during instruction decoding.

Fix bug in verify_gla() where the linear address computed after decoding
the instruction was not being truncated to the effective address size [2].

Tested by: Leon Dang [1]
Reported by: Peter Grehan [2]
Sponsored by: Nahanni Systems

9 years agoActually set the "no execute" bit on 1 MB page mappings in pmap_protect().
alc [Tue, 15 Jul 2014 17:16:06 +0000 (17:16 +0000)]
Actually set the "no execute" bit on 1 MB page mappings in pmap_protect().
Previously, the "no execute" bit was being set directly in the PTE, instead
of the local variable in which the new PTE value is being constructed.  So,
when the local variable was finally assigned to the PTE, the "no execute"
bit setting was lost.

9 years agoFix build with SMP disabled.
jhb [Tue, 15 Jul 2014 15:40:33 +0000 (15:40 +0000)]
Fix build with SMP disabled.

CR: https://phabric.freebsd.org/D407
Reviewed by: royger