]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoRequire /sbin/mount_cd9660 when running the cd9660 tests
ngie [Wed, 27 Jan 2016 06:14:20 +0000 (06:14 +0000)]
Require /sbin/mount_cd9660 when running the cd9660 tests

In some cases the test system might not have mount_cd9660(8). Don't
implicitly rely on it while testing cd9660 support; explicitly rely
on it

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

8 years agoMore fixes to the build.
glebius [Wed, 27 Jan 2016 05:15:53 +0000 (05:15 +0000)]
More fixes to the build.

8 years agoFix build on i386. I can't yet understand why does it build on amd64.
glebius [Wed, 27 Jan 2016 04:59:28 +0000 (04:59 +0000)]
Fix build on i386. I can't yet understand why does it build on amd64.

8 years agohyperv/vmbus: Event handling code refactor.
sephe [Wed, 27 Jan 2016 03:53:30 +0000 (03:53 +0000)]
hyperv/vmbus: Event handling code refactor.

- Use taskqueue instead of swi for event handling.
- Scan the interrupt flags in filter
- Disable ringbuffer interrupt mask in filter to ensure no unnecessary
  interrupts.

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: adrian, sephe, Dexuan <decui microsoft com>
Approved by: adrian (mentor)
MFC after: 2 weeks
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4920

8 years agoFix the build post-r294883.
jhibbits [Wed, 27 Jan 2016 03:51:24 +0000 (03:51 +0000)]
Fix the build post-r294883.

Pointy-hat to: jhibbits
X-MFC with: r294883

8 years agoAllow specification of fetch options for ntp leap-seconds fetch.
cy [Wed, 27 Jan 2016 02:25:25 +0000 (02:25 +0000)]
Allow specification of fetch options for ntp leap-seconds fetch.

MFC after: 1 week
X-MFC with: r289421, r293037, r294773

8 years agoConvert rman to use rman_res_t instead of u_long
jhibbits [Wed, 27 Jan 2016 02:23:54 +0000 (02:23 +0000)]
Convert rman to use rman_res_t instead of u_long

Summary:
Migrate to using the semi-opaque type rman_res_t to specify rman resources.  For
now, this is still compatible with u_long.

This is step one in migrating rman to use uintmax_t for resources instead of
u_long.

Going forward, this could feasibly be used to specify architecture-specific
definitions of resource ranges, rather than baking a specific integer type into
the API.

This change has been broken out to facilitate MFC'ing drivers back to 10 without
breaking ABI.

Reviewed By: jhb
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5075

8 years agocleanup and document in some detail the internals of the testing code
luigi [Wed, 27 Jan 2016 02:22:31 +0000 (02:22 +0000)]
cleanup and document in some detail the internals of the testing code
for dummynet schedulers

8 years agothe _Static_assert was not supposed to be in the commit.
luigi [Wed, 27 Jan 2016 02:14:08 +0000 (02:14 +0000)]
the _Static_assert was not supposed to be in the commit.

8 years agoReplace awk with more efficient builtins-only algo
dteske [Wed, 27 Jan 2016 02:11:58 +0000 (02:11 +0000)]
Replace awk with more efficient builtins-only algo

8 years agobugfix: the scheduler template (dn_schk) for the round robin scheduler
luigi [Wed, 27 Jan 2016 02:08:30 +0000 (02:08 +0000)]
bugfix: the scheduler template (dn_schk) for the round robin scheduler
is followed by another structure (rr_schk) whose size must be set
in the schk_datalen field of the descriptor.
Not allocating the memory may cause other memory to be overwritten
(though dn_schk is 192 bytes and rr_schk only 12 so we may be lucky
and end up in the padding after the dn_schk).

This is a merge candidate for stable and 10.3

MFC after: 3 days

8 years agoRevert yacc dependency back to pre-r241298.
bdrewery [Wed, 27 Jan 2016 01:33:26 +0000 (01:33 +0000)]
Revert yacc dependency back to pre-r241298.

Several attempts to fix this logic was done after r241298, which were
all reverted, yet this change was not.

The .h file does not depend on the .c file, so do not impose such a
dependency on it.  They are generated by the same command but do not
depend on each other.  Restore the .ORDER which should handle parallel build
issues.  This fixes an actual bug where the .h file is not recreated
when missing [1].  For example:
  cd lib/libc
  make cleanobj
  make nsparser.h
  rm nsparser.h
  make nsparser.h # will not rebuild nsparser.h

I have been trying to track down a build problem where nsparser.h is
missing when nslexer.o is built.  It is possible this is related.

Reported by: bde [1]
https://lists.freebsd.org/pipermail/svn-src-all/2012-October/059481.html
https://lists.freebsd.org/pipermail/svn-src-all/2012-October/060038.html
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoReplace nslexer.l->nslexer.c custom rule with a -D CFLAG.
bdrewery [Wed, 27 Jan 2016 01:33:23 +0000 (01:33 +0000)]
Replace nslexer.l->nslexer.c custom rule with a -D CFLAG.

This avoids reproducing the lex logic which had dependencies set wrong
and used an intermediate file for modifying the YY_BUF_SIZE.

This has only been possible since flex 2.5.37 was imported in r250873,
which uses #ifndef YY_BUF_SIZE.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agonslexer.c does not depend on nsparser.h.
bdrewery [Wed, 27 Jan 2016 01:33:19 +0000 (01:33 +0000)]
nslexer.c does not depend on nsparser.h.

nslexer.o depends on nsparser.h, which is already added by bsd.lib.mk
and .depend.

This reverts r237402.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Mark some unneeded code for later removal.
bdrewery [Wed, 27 Jan 2016 01:24:14 +0000 (01:24 +0000)]
FAST_DEPEND: Mark some unneeded code for later removal.

Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Apply missed nofilemon fix from r294351.
bdrewery [Wed, 27 Jan 2016 01:24:11 +0000 (01:24 +0000)]
FAST_DEPEND: Apply missed nofilemon fix from r294351.

Sponsored by: EMC / Isilon Storage Division

8 years agoSet a value for _RECURSING_PROGS for debugging.
bdrewery [Wed, 27 Jan 2016 01:24:08 +0000 (01:24 +0000)]
Set a value for _RECURSING_PROGS for debugging.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoFix DIRDEPS_BUILD after r294752.
bdrewery [Wed, 27 Jan 2016 01:24:05 +0000 (01:24 +0000)]
Fix DIRDEPS_BUILD after r294752.

DIRDEPS_BUILD does not yet support PROGS having their own dependency
file.

Overriding .MAKE.DEPENDFILE here causes major problems with the meta
mode logic since it creates the Makefile.depend as '.depend' resulting
in infinite loops in make due to dirdeps.mk including .depend endlessly.

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

8 years agoGrab value for LEAF_tcpCurrEstab from net.inet.tcp.stats instead of
glebius [Wed, 27 Jan 2016 00:50:27 +0000 (00:50 +0000)]
Grab value for LEAF_tcpCurrEstab from net.inet.tcp.stats instead of
net.inet.tcp.pcblist, which is much cheaper.

8 years agoGrab a snap amount of TCP connections in syncache from tcpstat.
glebius [Wed, 27 Jan 2016 00:48:05 +0000 (00:48 +0000)]
Grab a snap amount of TCP connections in syncache from tcpstat.

8 years agoAugment struct tcpstat with tcps_states[], which is used for book-keeping
glebius [Wed, 27 Jan 2016 00:45:46 +0000 (00:45 +0000)]
Augment struct tcpstat with tcps_states[], which is used for book-keeping
the amount of TCP connections by state.  Provides a cheap way to get
connection count without traversing the whole pcb list.

Sponsored by: Netflix

8 years agoRemove excess whitespace
bdrewery [Wed, 27 Jan 2016 00:24:24 +0000 (00:24 +0000)]
Remove excess whitespace

8 years agoProvide TCPSTAT_DEC() and TCPSTAT_FETCH() macros.
glebius [Wed, 27 Jan 2016 00:20:07 +0000 (00:20 +0000)]
Provide TCPSTAT_DEC() and TCPSTAT_FETCH() macros.

8 years agoUse dpv(1) in `bsdconfig packages'
dteske [Wed, 27 Jan 2016 00:12:58 +0000 (00:12 +0000)]
Use dpv(1) in `bsdconfig packages'

8 years agoFix ABI parsing
dteske [Wed, 27 Jan 2016 00:09:53 +0000 (00:09 +0000)]
Fix ABI parsing

8 years agoChange incorrect path
dteske [Wed, 27 Jan 2016 00:08:23 +0000 (00:08 +0000)]
Change incorrect path

8 years agoBump copyright
dteske [Wed, 27 Jan 2016 00:03:43 +0000 (00:03 +0000)]
Bump copyright

8 years agoBump copyrights
dteske [Wed, 27 Jan 2016 00:02:51 +0000 (00:02 +0000)]
Bump copyrights

8 years agoAdd `-k' for dpv(3) `keep_tite' config option
dteske [Tue, 26 Jan 2016 23:59:30 +0000 (23:59 +0000)]
Add `-k' for dpv(3) `keep_tite' config option

For scripts using dialog(1) several times, it can be visually distracting
running dpv(1) several times amidst other dialogs. The `-k' option, similar
to dialog(1) `--keep-tite', enables the same functionality to smooth ti/te.

8 years agoAdd keep_tite configuration option
dteske [Tue, 26 Jan 2016 23:56:27 +0000 (23:56 +0000)]
Add keep_tite configuration option

Similar to dialog(3) keep_tite option used to prevent visually disturbing
initialization or exit that could occur when run from a script using
dpv(3) by way of dpv(1) in sequence with other dialog(1) invocations.

8 years agofix various warnings to compile the test code with -Wextra
luigi [Tue, 26 Jan 2016 23:37:07 +0000 (23:37 +0000)]
fix various warnings to compile the test code with -Wextra

8 years agofix various warnings (signed/unsigned, printf types, unused arguments)
luigi [Tue, 26 Jan 2016 23:36:18 +0000 (23:36 +0000)]
fix various warnings (signed/unsigned, printf types, unused arguments)

8 years agoprevent warnings for signed/unsigned comparisons and unused arguments.
luigi [Tue, 26 Jan 2016 22:46:58 +0000 (22:46 +0000)]
prevent warnings for signed/unsigned comparisons and unused arguments.
Add checks for parameters overflowing 32 bit.

8 years agoprevent warning for unused argument
luigi [Tue, 26 Jan 2016 22:45:45 +0000 (22:45 +0000)]
prevent warning for unused argument

8 years agoavoid warnings for signed/unsigned comparison and unused arguments
luigi [Tue, 26 Jan 2016 22:45:05 +0000 (22:45 +0000)]
avoid warnings for signed/unsigned comparison and unused arguments

8 years agoUpgrade FW to 5.4.56
davidcs [Tue, 26 Jan 2016 22:32:58 +0000 (22:32 +0000)]
Upgrade FW to 5.4.56
Update driver version to 3.10.26

8 years agoVarious style fixes.
jhb [Tue, 26 Jan 2016 21:24:49 +0000 (21:24 +0000)]
Various style fixes.

- Wrap long lines.
- Fix indentation.
- Remove excessive parens.
- Whitespace fixes in struct definitions.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D5025

8 years agoAdd support to libsysdecode for decoding system call names.
jhb [Tue, 26 Jan 2016 19:07:09 +0000 (19:07 +0000)]
Add support to libsysdecode for decoding system call names.

A new sysdecode_syscallname() function accepts a system call code and
returns a string of the corresponding name (or NULL if the code is
unknown).  To support different process ABIs, the new function accepts a
value from a new sysdecode_abi enum as its first argument to select the
ABI in use.  Current ABIs supported include FREEBSD (native binaries),
FREEBSD32, LINUX, LINUX32, and CLOUDABI64.  Note that not all ABIs are
supported by all platforms.  In general, a given ABI is only supported
if a platform can execute binaries for that ABI.

To simplify the implementation, libsysdecode's build reuses the
existing pre-generated files from the kernel source tree rather than
duplicating new copies of said files during the build.

kdump(1) and truss(1) now use these functions to map system call
identifiers to names.  For kdump(1), a new 'syscallname()' function
consolidates duplicated code from ktrsyscall() and ktrsyscallret().
The Linux ABI no longer requires custom handling for ktrsyscall() and
linux_ktrsyscall() has been removed as a result.

Reviewed by: bdrewery
Differential Revision: https://reviews.freebsd.org/D4823

8 years agoDefault NANO_DRIVE to ada0 not ad0. This shouldn't affect working
imp [Tue, 26 Jan 2016 18:39:31 +0000 (18:39 +0000)]
Default NANO_DRIVE to ada0 not ad0. This shouldn't affect working
configs (since they'd have to change NANO_DRIVE to be ada0 to work),
but will fix old ones that used to work.

MFC After: 1 week

8 years agoRemove static from these two. They slipped through the cracks.
imp [Tue, 26 Jan 2016 18:39:30 +0000 (18:39 +0000)]
Remove static from these two. They slipped through the cracks.

MFC After: 1 week

8 years agoAdd a comment about why at is turned off in the exception handler.
imp [Tue, 26 Jan 2016 18:39:23 +0000 (18:39 +0000)]
Add a comment about why at is turned off in the exception handler.
Only k0 and k1 may be touched until we save registers somewhere.

MFC After: 2 days

8 years agoAdd STT_SPARC_REGISTER ELF definition
emaste [Tue, 26 Jan 2016 18:20:25 +0000 (18:20 +0000)]
Add STT_SPARC_REGISTER ELF definition

MFC after: 1 week

8 years agortwn: do not start vap when initialization fails
avos [Tue, 26 Jan 2016 16:50:59 +0000 (16:50 +0000)]
rtwn: do not start vap when initialization fails

- Start vap(s) (via ieee80211_start_all()) only when initialization
succeeds; stop the first vap otherwise (via ieee80211_stop());
- Do not try to stop a device multiple times
(move (sc->sc_flags & RTWN_RUNNING) check to urtwn_stop_locked()).

Tested by: kevlo
Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5058

8 years agortwn: use ieee80211_restart_all() for device reset
avos [Tue, 26 Jan 2016 16:34:27 +0000 (16:34 +0000)]
rtwn: use ieee80211_restart_all() for device reset

Tested by: kevlo
Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5057

8 years agoPersist timers TCPTV_PERSMIN and TCPTV_PERSMAX are hardcoded with 5 seconds and
hiren [Tue, 26 Jan 2016 16:33:38 +0000 (16:33 +0000)]
Persist timers TCPTV_PERSMIN and TCPTV_PERSMAX are hardcoded with 5 seconds and
60 seconds, respectively. Turn them into sysctls that can be tuned live. The
default values of 5 seconds and 60 seconds have been retained.

Submitted by: Jason Wolfe (j at nitrology dot com)
Reviewed by: gnn, rrs, hiren, bz
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D5024

8 years agoUpdate and add various macros to the LinuxKPI and resolve a macro
hselasky [Tue, 26 Jan 2016 15:26:35 +0000 (15:26 +0000)]
Update and add various macros to the LinuxKPI and resolve a macro
redefinition issue in the cxgb driver.

MFC after: 1 week
Sponsored by: Mellanox Technologies
Reviewed by: np @

8 years agoImport Annapurna Labs Alpine HAL for networking
zbb [Tue, 26 Jan 2016 15:22:04 +0000 (15:22 +0000)]
Import Annapurna Labs Alpine HAL for networking

Files required for the NIC driver

Import from vendor-sys/alpine-hal/2.7
SVN rev.: 294828
HAL version: 2.7

Obtained from:  Semihalf
Sponsored by:   Annapurna Labs

8 years agoLinuxKPI list updates:
hselasky [Tue, 26 Jan 2016 15:12:31 +0000 (15:12 +0000)]
LinuxKPI list updates:
- Add some new hlist macros.
- Update existing hlist macros removing the need for a temporary
  iteration variable.
- Properly define the RCU hlist macros to be SMP safe with regard
  to RCU.
- Safe list macro arguments by adding a pair of parentheses.
- Prefix the _list_add() and _list_splice() functions with "linux"
  to reflect they are LinuxKPI internal functions.

Obtained from: Linux
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoDon't clear the software flow control flag before draining for last
kib [Tue, 26 Jan 2016 14:46:39 +0000 (14:46 +0000)]
Don't clear the software flow control flag before draining for last
close or assert the bug that it is clear when leaving.

Remove an unrelated rotted comment that was attached to the buggy
clearing.

Since draining is not done in more cases, flushing is needed in more
cases, so start fixing flushing:
- do a full flush in ttydisc_close().  State what POSIX requires more
  clearly.  This was missing ttydevsw_pktnotify() calls to tell the
  devsw layer to flush.  Hardware tty drivers don't actually flush
  since they don't understand this API.
- fix 2 missing wakeups in tty_flush().  Most of the wakeups here are
  unnecessary for last close.  But ttydisc_close() did one of the
  missing ones.

This flow control bug ameliorated the design bug of requiring
potentially unbounded waits in draining.  Software flow control is the
easiest way to get an unbounded wait, and a long wait is sometimes
actually useful.  Users can type the xoff character on the receiver
and (if ixon is set on the sender) expect the output to be held until
the user is ready for more.

Hardware flow control can also give the unbounded wait, and this bug
didn't affect hardware flow control.  Unbounded waits from hardware
flow control take a more unusual configuration.  E.g., a terminal
program that controls the modem status lines, or unplugging the cable
in a configuration where this doesn't break the connection.

The design bug is still ameliorated by a newer bug in draining for
last close -- the 1 second timeout.  E.g., if the user types the
xoff character and the sender reaches last close, then output is
not resumed and the wait times out after just 1 second.  This is
broken, but preferable to an unbounded wait.  Before this change,
the output was resumed immediately and usually completed.

Submitted by: bde
MFC after: 2 weeks

8 years agoMake libgcc compilable on RISC-V.
br [Tue, 26 Jan 2016 14:45:21 +0000 (14:45 +0000)]
Make libgcc compilable on RISC-V.

8 years agoAdd fenv.c for RISC-V. Copied from MIPS.
br [Tue, 26 Jan 2016 14:40:41 +0000 (14:40 +0000)]
Add fenv.c for RISC-V. Copied from MIPS.

8 years agoImplement ether_addr_equal(), ether_addr_equal_64bits() and
hselasky [Tue, 26 Jan 2016 14:36:16 +0000 (14:36 +0000)]
Implement ether_addr_equal(), ether_addr_equal_64bits() and
random_ether_addr() for the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoRemove uathload from build due to issue with GCC 5.2.0:
br [Tue, 26 Jan 2016 14:34:40 +0000 (14:34 +0000)]
Remove uathload from build due to issue with GCC 5.2.0:
"ld: --relax and -r may not be used together."
Requires fixing ld command line arguments and testing.

8 years agoImplement is_vlan_dev() and vlan_dev_vlan_id() for the LinuxKPI.
hselasky [Tue, 26 Jan 2016 14:33:20 +0000 (14:33 +0000)]
Implement is_vlan_dev() and vlan_dev_vlan_id() for the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoImplement bitmap_weight() and bitmap_equal() for the LinuxKPI.
hselasky [Tue, 26 Jan 2016 14:31:20 +0000 (14:31 +0000)]
Implement bitmap_weight() and bitmap_equal() for the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd more network related macros and functions to the LinuxKPI.
hselasky [Tue, 26 Jan 2016 14:29:50 +0000 (14:29 +0000)]
Add more network related macros and functions to the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd definition for the NETDEV_CHANGE event and tidy up the LinuxKPI
hselasky [Tue, 26 Jan 2016 14:27:00 +0000 (14:27 +0000)]
Add definition for the NETDEV_CHANGE event and tidy up the LinuxKPI
notifier header file a bit while at it.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoDefine __get_user() and __put_user() for the LinuxKPI.
hselasky [Tue, 26 Jan 2016 14:21:30 +0000 (14:21 +0000)]
Define __get_user() and __put_user() for the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd more LinuxKPI PCI related functions and defines.
hselasky [Tue, 26 Jan 2016 14:20:25 +0000 (14:20 +0000)]
Add more LinuxKPI PCI related functions and defines.
Removed comments deriving from Linux.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd the openssl header for RISC-V.
br [Tue, 26 Jan 2016 14:17:39 +0000 (14:17 +0000)]
Add the openssl header for RISC-V.
Copied from aarch64 as we can't generate it yet.

8 years agoMake pmap_fault() return values vm subsystem compliant to
skra [Tue, 26 Jan 2016 13:50:44 +0000 (13:50 +0000)]
Make pmap_fault() return values vm subsystem compliant to
simplify their handling in abort_handler(). While here,
remove one extra initialization of pcb variable.

8 years agoMFV r294819: 6495 Fix mutex leak in dmu_objset_find_dp
mav [Tue, 26 Jan 2016 13:45:41 +0000 (13:45 +0000)]
MFV r294819: 6495 Fix mutex leak in dmu_objset_find_dp

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Albert Lee <trisk@omniti.com>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>

illumos/illumos-gate@2bad22584defe4667f99737e3158d336e4dcca11

8 years agoMFV r294816: 4986 receiving replication stream fails if any snapshot
mav [Tue, 26 Jan 2016 13:37:30 +0000 (13:37 +0000)]
MFV r294816: 4986 receiving replication stream fails if any snapshot
exceeds refquota

Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@5878fad70d76d8711f6608c1f80b0447601261c6

8 years agoMFV r294814: 6393 zfs receive a full send as a clone
mav [Tue, 26 Jan 2016 13:14:39 +0000 (13:14 +0000)]
MFV r294814: 6393 zfs receive a full send as a clone

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Paul Dagnelie <pcd@delphix.com>

illumos/illumos-gate@68ecb2ec930c4b0f00acaf8e0abb2b19c4b8b76f

This allows to do a full (non-incremental send) and receive it as a clone
of an existing dataset. It can leverage nopwrite to share blocks with the
origin. This can be used to change the relationship of datasets on the
target. For example, maybe on the source you have:

A ---- B ---- C

And you have sent to the target a full of B, and the incremental B->C:

B ---- C

You later realize that you want to have A on the target. You will have to
do a full send of A, but nopwrite can save you space on the target if you
receive it as a clone of B, assuming that A and B have some blocks inxi
common:

B ---- C
 \
  A

8 years agoMFV r294812: 6434 sa_find_sizes() may compute wrong SA header size
mav [Tue, 26 Jan 2016 13:03:01 +0000 (13:03 +0000)]
MFV r294812: 6434 sa_find_sizes() may compute wrong SA header size

Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: James Pan <jiaming.pan@yahoo.com>

illumos/illumos-gate@3502ed6e7cb3f3d2e781960ab8fe465fdc884834

8 years agoMFV r294810: 6414 vdev_config_sync could be simpler
mav [Tue, 26 Jan 2016 12:58:58 +0000 (12:58 +0000)]
MFV r294810: 6414 vdev_config_sync could be simpler

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Will Andrews <will@firepipe.net>

illumos/illumos-gate@eb5bb58421f46cee79155a55688e6c675e7dd361

8 years agoMFV r294808: 6421 Add missing multilist_destroy calls to arc_fini
mav [Tue, 26 Jan 2016 12:54:03 +0000 (12:54 +0000)]
MFV r294808: 6421 Add missing multilist_destroy calls to arc_fini

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@57deb2328260c447bf1db25fe74e0eece102733e

8 years agoMFV r294806: 6388 Failure of userland copy should return EFAULT
mav [Tue, 26 Jan 2016 12:52:16 +0000 (12:52 +0000)]
MFV r294806: 6388 Failure of userland copy should return EFAULT

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@c71c00bbe8a9cdc7e3f4048b751f48e80441d506

8 years agoMFV r294804: 6386 Fix function call with uninitialized value in vdev_inuse
mav [Tue, 26 Jan 2016 12:50:14 +0000 (12:50 +0000)]
MFV r294804: 6386 Fix function call with uninitialized value in vdev_inuse

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@5bdd995ddb777f538bfbcc5e2d5ff1bed07ae56e

8 years agoMFV r294802: 6334 Cannot unlink files when over quota
mav [Tue, 26 Jan 2016 12:48:10 +0000 (12:48 +0000)]
MFV r294802: 6334 Cannot unlink files when over quota

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Simon Klinkert <simon.klinkert@gmail.com>

illumos/illumos-gate@6575bca01367958c7237253d88e5fa9ef0b1650a

8 years agoMFV r294800: 6385 Fix unlocking order in zfs_zget
mav [Tue, 26 Jan 2016 12:44:49 +0000 (12:44 +0000)]
MFV r294800: 6385 Fix unlocking order in zfs_zget

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@eaef6a96de3f6afbbccc69bd7a0aed4463689d0a

8 years agoMFV r294798:
mav [Tue, 26 Jan 2016 12:37:23 +0000 (12:37 +0000)]
MFV r294798:
6292 exporting a pool while an async destroy is running can leave entries
in the deferred tree

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Fabian Keil <fk@fabiankeil.de>
Approved by: Gordon Ross <gordon.ross@nexenta.com>

illumos/illumos-gate@a443cc80c742af740aa82130db840f02b4389365

8 years agoMFV r294796: 6319 assertion failed in zio_ddt_write: bp->blk_birth == txg
mav [Tue, 26 Jan 2016 12:33:58 +0000 (12:33 +0000)]
MFV r294796: 6319 assertion failed in zio_ddt_write: bp->blk_birth == txg

Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@b39b744be78c6327db43c1f69d11c2f5909f73cb

This is revert of 5693.

8 years agoixgbe sysctl hardware defaults
smh [Tue, 26 Jan 2016 12:30:17 +0000 (12:30 +0000)]
ixgbe sysctl hardware defaults

Added hw.ix.flow_control which enables the default flow_control of all ix
interfaces to be set in loader.conf.

Added hw.ix.advertise_speed which enables the default advertised_speed of
all ix interfaces to be set in loader.conf.

Made enable_aim device independent based on hw.ix.enable_aim default.

Reviewed by: erj
MFC after: 1 week
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D5060

8 years agoMFV r294793:
mav [Tue, 26 Jan 2016 12:28:53 +0000 (12:28 +0000)]
MFV r294793:
6367 spa_config_tryenter incorrectly handles the multiple-lock case

Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Prashanth Sreenivasa <prashksp@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Approved by: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@e495b6e6735b803e422025a630352ef9bba788c5

8 years agoFix the way RCTL handles rules' rrl_exceeded on credenials change.
trasz [Tue, 26 Jan 2016 11:28:55 +0000 (11:28 +0000)]
Fix the way RCTL handles rules' rrl_exceeded on credenials change.
Because of what this variable does, it was probably harmless - but
still incorrect.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoDon't do icache sync on kernel memory and keep in line with comment
skra [Tue, 26 Jan 2016 10:24:18 +0000 (10:24 +0000)]
Don't do icache sync on kernel memory and keep in line with comment
in elf_cpu_load_file(). The only time when the sync is needed is after
kernel module is loaded and the relocation info is processed. And it's
done in elf_cpu_load_file().

8 years agoMake code more compact and readable better in pmap_extract()
skra [Tue, 26 Jan 2016 09:50:23 +0000 (09:50 +0000)]
Make code more compact and readable better in pmap_extract()
like functions. No functional change.

This is a follow up to r294722.

Suggested by: kib

8 years agohyperv/hn: Improve sending performance
sephe [Tue, 26 Jan 2016 09:42:13 +0000 (09:42 +0000)]
hyperv/hn: Improve sending performance

- Avoid main lock contention by trylock for if_start, if that fails,
  schedule TX taskqueue for if_start
- Don't do direct sending if the packet to be sent is large, e.g.
  TSO packet.

This change gives me stable 9.1Gbps TCP sending performance w/ TSO
over a 10Gbe directly connected network (the performance fluctuated
between 4Gbps and 9Gbps before this commit). It also improves non-
TSO TCP sending performance a lot.

Reviewed by: adrian, royger
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5074

8 years agoRestore flushing of output for revoke(2) again. Document revoke()'s
kib [Tue, 26 Jan 2016 07:57:44 +0000 (07:57 +0000)]
Restore flushing of output for revoke(2) again.  Document revoke()'s
intended behaviour in its man page.  Simplify tty_drain() to match.
Don't call ttydevsw methods in tty_flush() if the device is gone
since we now sometimes call it then.

The flushing was supposed to be implemented by passing the FNONBLOCK
flag to VOP_CLOSE() for revoke().  The tty driver is one of the few
that can block in close and was one of the fewer that knew about this.

This almost worked in FreeBSD-1 and similarly in Net/2.  These
versions only almost worked because there was and is considerable
confusion between IO_NDELAY and FNONBLOCK (aka O_NONBLOCK).  IO_NDELAY
is only valid for VOP_READ() and VOP_WRITE().  For other VOPs it has
the same value as O_SHLOCK.  But since vfs_subr.c and tty.c
consistently used the wrong flag and the O_SHLOCK flag is rarely set,
this mostly worked.  It also gave the feature than applications could
get the non-blocking close by abusing O_SHLOCK.

This was first broken then fixed in 1995.  I changed only the tty
driver to use FNONBLOCK, as a hack to get non-blocking via the normal
flag FNONBLOCK for last closes.  I didn't know about revoke()'s use
of IO_NDELAY or change it to be consistent, so revoke() was broken.
Then I changed revoke() to match.

This was next broken in 1997 then fixed in 1998.  Importing Lite2 made
the flags inconsistent again by undoing the fix only in vfs_subr.c.

This was next broken in 2008 by replacing everything in tty.c and not
checking any flags in last close.  Other bugs in draining limited the
resulting unbounded waits to drain in some cases.

It is now possible to fix this better using the new FREVOKE flag.
Just restore flushing for revoke() for now.  Don't restore or undo any
hacks for ordinary last closes yet.  But remove dead code in the
1-second relative timeout (r272789).  This did extra work to extend
the buggy draining for revoke() for as long as possible.  The 1-second
timeout made this not very long by usually flushing after 1 second.

Submitted by: bde
MFC after: 2 weeks

8 years agoFix the various qemu configs to be buildable.
imp [Tue, 26 Jan 2016 07:22:22 +0000 (07:22 +0000)]
Fix the various qemu configs to be buildable.

8 years agoCleanup unused-but-set-variable spotted by gcc-4.9.
araujo [Tue, 26 Jan 2016 07:17:21 +0000 (07:17 +0000)]
Cleanup unused-but-set-variable spotted by gcc-4.9.

Reviewed by: neel
Approved by: rodrigc (mentor)
Differential Revision: https://reviews.freebsd.org/D5042

8 years agoAdd support for automatic leap-second file updates.
cy [Tue, 26 Jan 2016 07:06:44 +0000 (07:06 +0000)]
Add support for automatic leap-second file updates.

The working copy of leapfile resides in /var/dbntpd.leap-seconds.list.
/etc/ntp/leap-seconds (periodically updated from ftp://time.nist.gov/pub/
or ftp://tycho.usno.navy.mil/pub/ntp/) contains the master copy should
automatic leapfile updates be disabled (default).

Automatic leapfile updates are fetched from $ntp_leapfile_sources,
defaulting to https://www.ietf.org/timezones/data/leap-seconds.list,
within $ntp_leapfile_expiry_days (default 30 days) from leap-seconds
file expiry. Automatic updates can be enabled by setting
$daily_ntpd_leapfile_enable="YES" in periodic.conf. To avoid congesting
the ntp leapfile source the automatic update randomized by default but
can be disabled through daily_ntpd_avoid_congestion="NO" in
periodic.conf.

Suggested by: des
Reviewed by: des, roberto, dwmalone, ian, cperciva, glebius, gjb
MFC after: 1 week
X-MFC with: r289421, r293037

8 years agoAllow new lines as white space for arguments that are parsed to allow
imp [Tue, 26 Jan 2016 06:26:56 +0000 (06:26 +0000)]
Allow new lines as white space for arguments that are parsed to allow
boot1 to pass in files with newlines in them. Now that the EFI loader
groks foo=bar on the command line, this can allow a more general setup
than traditional boot loader args will allow.

Differential Revision: https://reviews.freebsd.org/D5038

8 years agoRead in /boot/config and /boot.config, like all the other boot
imp [Tue, 26 Jan 2016 06:26:55 +0000 (06:26 +0000)]
Read in /boot/config and /boot.config, like all the other boot
loaders and pass it along to /boot/loader.efi.

Differential Revision: https://reviews.freebsd.org/D5038

8 years agoParse the command line arguments, and do it before we initialize the
imp [Tue, 26 Jan 2016 06:26:46 +0000 (06:26 +0000)]
Parse the command line arguments, and do it before we initialize the
console so it can be changed by the command line arguments.

Differential Revision: https://reviews.freebsd.org/D5038

8 years agoRBX_ defines are in rbx.h, move it there.
imp [Tue, 26 Jan 2016 06:26:44 +0000 (06:26 +0000)]
RBX_ defines are in rbx.h, move it there.

Differential Revision: https://reviews.freebsd.org/D5038

8 years agoMove all the separate copies of the same strings into paths.h. There's
imp [Tue, 26 Jan 2016 06:26:19 +0000 (06:26 +0000)]
Move all the separate copies of the same strings into paths.h. There's
nothing machine specific about these.

Differential Revision: https://reviews.freebsd.org/D5038

8 years agoRevert one chunk from commit 285362, which introduced an off-by-one error
luigi [Tue, 26 Jan 2016 04:48:24 +0000 (04:48 +0000)]
Revert one chunk from commit 285362, which introduced an off-by-one error
in computing a shift index. The error was due to the use of mixed
fls() / __fls() functions in another implementation of qfq.
To avoid that the problem occurs again, properly document which
incarnation of the function we need.
Note that the bug only affects QFQ in FreeBSD head from last july, as
the patch was not merged to other versions.

8 years agoOlder Book-E processors (e500v1/e500v2) don't support dcbzl.
jhibbits [Tue, 26 Jan 2016 04:41:18 +0000 (04:41 +0000)]
Older Book-E processors (e500v1/e500v2) don't support dcbzl.

The only difference between dcbzl and dcbz is dcbzl operates on native cache
line lengths regardless of L1CSR0[DCBZ32].  Since we don't change the cache line
size, the cacheline_size variable will reflect the used cache line length, and
dcbz will work as expected.

8 years agoFix a debug printf().
jhibbits [Tue, 26 Jan 2016 03:52:14 +0000 (03:52 +0000)]
Fix a debug printf().

Somehow this printf() was missed in the conversion of vm_paddr_t to 64-bit, and
made it through until now.

Sponsored by: Alex Perez/Inertial Computing

8 years agoRemove a duplicate setting of the AH_DEBUG_ALQ option.
markj [Tue, 26 Jan 2016 01:16:45 +0000 (01:16 +0000)]
Remove a duplicate setting of the AH_DEBUG_ALQ option.

8 years agoEvaluate the sysctl_running fail point before taking the sysctl lock.
markj [Tue, 26 Jan 2016 01:15:18 +0000 (01:15 +0000)]
Evaluate the sysctl_running fail point before taking the sysctl lock.

The fail point handler may sleep, but this is not permitted while holding a
rm read lock.

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

8 years agoUse LIBADD instead of LDADD in rping's Makefile and add libcxgb4 (the
np [Tue, 26 Jan 2016 01:02:19 +0000 (01:02 +0000)]
Use LIBADD instead of LDADD in rping's Makefile and add libcxgb4 (the
userspace iWARP library for cxgbe) to the list of libraries.

rping using the libcxgb4 + iw_cxgbe combo was tested with T5 hardware.

Obtained from: Chelsio Communications

8 years agoAllow us to be told about memory past the first 4GB point, but ignore it.
andrew [Mon, 25 Jan 2016 23:04:40 +0000 (23:04 +0000)]
Allow us to be told about memory past the first 4GB point, but ignore it.
This allows, for example, UEFI pass a memory map with some ram in this
region, but for us to ignore it. This is the case when running under the
qemu virt machine type.

Sponsored by: ABT Systems Ltd

8 years ago- Make the code consistent with itself style-wise and bring it closer
marius [Mon, 25 Jan 2016 22:58:06 +0000 (22:58 +0000)]
- Make the code consistent with itself style-wise and bring it closer
  to style(9).
- Mark unused arguments as such.
- Make the ttystates table const.

8 years agoFix PROGS not reading .depend files after r284288 by making DEPENDFILE work.
bdrewery [Mon, 25 Jan 2016 22:29:44 +0000 (22:29 +0000)]
Fix PROGS not reading .depend files after r284288 by making DEPENDFILE work.

We have had this user-modifable DEPENDFILE variable forever that does nothing
relevant for the user since fmake always used '.depend'.  Bmake
introduced the .MAKE.DEPENDFILE variable that can be modified to change
the name of '.depend'.

Prior to r284288, bsd.progs.mk was setting .MAKE.DEPENDFILE to allow
working incremental builds.  This was modified most likely to not
conflict with the META MODE handling of .MAKE.DEPENDFILE as it has a lot
more special logic for that variable.

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

8 years agoRemove unneeded beforebuild hacks for dtrace probes.
bdrewery [Mon, 25 Jan 2016 22:29:41 +0000 (22:29 +0000)]
Remove unneeded beforebuild hacks for dtrace probes.

This still allows skipping 'make depend'.  Headers in SRCS generate
properly.

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

8 years agoFix incremental build of dtrace probes.
bdrewery [Mon, 25 Jan 2016 22:29:32 +0000 (22:29 +0000)]
Fix incremental build of dtrace probes.

Currently dtrace(1) -Go does not properly rebuild the target if it
exists.  It results in missing symbols.

  dtrace -C -x nolibs -G -o usdt.o -s /root/git/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/usdt.d tst.usdt.o
  dtrace: target object (usdt.o) already exists. Please remove the target
  dtrace: object and rebuild all the source objects if you wish to run the DTrace
  dtrace: linking process again
  cc -O2 -pipe -O0 -g -I/root/git/freebsd/cddl/usr.sbin/dtrace/tests/common/json -std=gnu99 -fstack-protector-strong -Qunused-arguments  -o tst.usdt.exe.full tst.usdt.o usdt.o
  tst.usdt.o: In function `main':
  /root/git/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c:56: undefined reference to `__dtrace_bunyan_fake___log__debug'
  /root/git/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c:60: undefined reference to `__dtrace_bunyan_fake___log__debug'
  cc: error: linker command failed with exit code 1 (use -v to see invocation)
  *** [tst.usdt.exe.full] Error code 1

This is a consequence of r212358.

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

8 years agoAllow the (old rc-style) exec_afterstart jail parameters to start numbering
jamie [Mon, 25 Jan 2016 22:14:31 +0000 (22:14 +0000)]
Allow the (old rc-style) exec_afterstart jail parameters to start numbering
at 0, like exec_prestart and the others do.  Make param0 optional, i.e.
still look for param1.

PR: 142973
MFC after: 3 days