]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC r306735:
sevan [Sun, 16 Oct 2016 23:51:15 +0000 (23:51 +0000)]
MFC r306735:
Add history section to natd(8)
Fix back sentence raised by igor.

PR:             212544
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306734:
sevan [Sun, 16 Oct 2016 23:48:23 +0000 (23:48 +0000)]
MFC r306734:
Add history section to fsck_ffs(8)
Move sentence to a new line as advised by igor.

PR: 212474
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306733:
sevan [Sun, 16 Oct 2016 23:47:00 +0000 (23:47 +0000)]
MFC r306733:
Add history section to fsck(8)

PR: 212472
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306732:
sevan [Sun, 16 Oct 2016 23:42:19 +0000 (23:42 +0000)]
MFC r306732:
Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.5 Installation notes [2].
I was unable to pin point the exact version of Mach the fdisk utility appeared as I could not find documentation older than version 2.5 & no source code or repo history.
fdisk utility appears as a separate utility[3] in v2.5. Due to this, I have avoided stating the exact version fdisk first appeared in Mach.
Add authors section.

[1] https://groups.google.com/d/topic/comp.unix.bsd/Hhi45vAHxDg/discussion
[2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps
[3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps

PR: 212470
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306731:
sevan [Sun, 16 Oct 2016 23:40:17 +0000 (23:40 +0000)]
MFC r306731:
Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.
5 Installation notes [2].
I was unable to pin point the exact version of Mach the fdisk utility appeared as I could not find documentation
 older than version 2.5 & no source code or repo history.
fdisk utility appears as a separate utility[3] in v2.5. Due to this, I have avoided stating the exact version fd
isk first appeared in Mach.
Add authors section.
Make correction pointed by igor
[1] https://groups.google.com/d/topic/comp.unix.bsd/Hhi45vAHxDg/discussion
[2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps
[3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps
PR:             212469
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306728:
sevan [Sun, 16 Oct 2016 23:36:52 +0000 (23:36 +0000)]
MFC r306728:
Add history section for devfs(8)
Move sentence to a new line as advised by igor.

PR: 212441
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306727:
sevan [Sun, 16 Oct 2016 23:35:04 +0000 (23:35 +0000)]
MFC r306727:
Add history section for devd(8)
Move sentence to a new line as advised by igor

PR:             212439
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306725:
sevan [Sun, 16 Oct 2016 23:31:15 +0000 (23:31 +0000)]
MFC r306725:
Add history section for clri(8)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/man/man8/clri.8

PR: 212438
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306724:
sevan [Sun, 16 Oct 2016 23:29:40 +0000 (23:29 +0000)]
MFC r306724:
Add history section for bsdlabel(8)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Tahoe/usr/man/cat8/disklabel.0
Remove tab after space, highlighted by igor

PR:             212436
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306723:
sevan [Sun, 16 Oct 2016 23:26:11 +0000 (23:26 +0000)]
MFC r306723:
Add history section for atmconfig(8)

PR: 212415
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306722:
sevan [Sun, 16 Oct 2016 23:19:14 +0000 (23:19 +0000)]
MFC r306722:
Add history section for test(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/test.c

PR:             211789
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306721:
sevan [Sun, 16 Oct 2016 23:15:33 +0000 (23:15 +0000)]
MFC r306721:
Add history section for stty(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man1/stty.1

PR: 211788
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306720:
sevan [Sun, 16 Oct 2016 23:14:27 +0000 (23:14 +0000)]
MFC r306720:
Add history section of pwd(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s2/pwd.c

PR:             211787
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306719:
sevan [Sun, 16 Oct 2016 23:11:33 +0000 (23:11 +0000)]
MFC r306719:
Document origins of expr & authors
http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/usr/man/man1/expr.1

PR: 173979
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r306718:
sevan [Sun, 16 Oct 2016 23:09:55 +0000 (23:09 +0000)]
MFC r306718:
Add history section for echo(1)
Sourced using the draft copy of the second edition manual
http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/unix_2nd_edition_manual.pdf

PR:             211785
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8104

7 years agoMFC r306617:
sevan [Sun, 16 Oct 2016 23:03:47 +0000 (23:03 +0000)]
MFC r306617:
shutdown appeared as a standalone utility in 4.1BSD.
http://mail-index.netbsd.org/source-changes-d/2016/09/13/msg008686.html
http://mail-index.netbsd.org/source-changes-d/2016/09/14/msg008691.html
PR: 212552
Approved by: bcr (mentor)
Obtained from: NetBSD
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMFC r306616:
sevan [Sun, 16 Oct 2016 22:54:23 +0000 (22:54 +0000)]
MFC r306616:
setkey appeared in FreeBSD 4.0

PR: 212551
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMFC r306615:
sevan [Sun, 16 Oct 2016 22:51:25 +0000 (22:51 +0000)]
MFC r306615:
sconfig appeared in FreeBSD 5.2.

PR: 212550
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMFC r306614:
sevan [Sun, 16 Oct 2016 22:33:51 +0000 (22:33 +0000)]
MFC r306614:
Note the version PF first appeared in FreeBSD & from which version it was ported from.
Address the contractions raised by igor.

PR:             212574
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D8105

7 years agoMFC r306613:
sevan [Sun, 16 Oct 2016 22:31:10 +0000 (22:31 +0000)]
MFC r306613:
Note the change of name in FreeBSD 5.0.

PR: 212542
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMFC r306612:
sevan [Sun, 16 Oct 2016 22:26:39 +0000 (22:26 +0000)]
MFC r306612:
Note the name change from mount_null to mount_nullfs in FreeBSD 5.0.

PR: 212541
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoMFC r307038
arybchik [Sat, 15 Oct 2016 13:42:52 +0000 (13:42 +0000)]
MFC r307038

sfxge(4): update external port mapping for Medford

Extend the mapping table for external port numbering to support port modes
which output to the second external port only. Where supported, map from
the current port mode rather than inferring from all the available modes.
Updated comments for clarity.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r306944
arybchik [Sat, 15 Oct 2016 13:39:30 +0000 (13:39 +0000)]
MFC r306944

sfxge(4): sync tlv_layout.h with firmwaresrc and update port-mode
definition use

It fixes driver attach issue to a new firmware which reports a new
port-modes.

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

7 years agoMFC r306853
bapt [Sat, 15 Oct 2016 12:41:11 +0000 (12:41 +0000)]
MFC r306853

Import tzdata 2016g

7 years agoMFC r306852
bapt [Sat, 15 Oct 2016 12:37:57 +0000 (12:37 +0000)]
MFC r306852

Incorporate a change from OpenBSD by millert@OpenBSD.org

Don't warn about valid time zone abbreviations.  POSIX
through 2000 says that an abbreviation cannot start with ':', and
cannot contain ',', '-', '+', NUL, or a digit.  POSIX from 2001
on changes this rule to say that an abbreviation can contain only
'-', '+', and alphanumeric characters from the portable character
set in the current locale.  To be portable to both sets of rules,
an abbreviation must therefore use only ASCII letters."  Adapted
from tzcode2015f.

This is needed to be able to update tzdata to a newer version

7 years agoMFC r306877
bapt [Sat, 15 Oct 2016 12:35:16 +0000 (12:35 +0000)]
MFC r306877

Remove the WITH_FMAKE option left over from r284464

7 years agoMFC r306854
bapt [Sat, 15 Oct 2016 12:22:06 +0000 (12:22 +0000)]
MFC r306854

Update pci_vendors to 2016-10-03

7 years agoMFC r302951,r302952,r304071:
mmel [Sat, 15 Oct 2016 09:09:25 +0000 (09:09 +0000)]
MFC r302951,r302952,r304071:

  r302951:
    OFWPCI: Improve resource handling.  - add new rman for prefetchable memory.
    Is used only if given 'ranges'
      property contains prefetchable memory range.
  r302952:
    OFWPCI: Add support for NEW_PCIB.
  r304071:
    OFWPCI: Don't strip RF_ACTIVE from flags when parent bus method is called.

7 years agoMFC r302560:
mmel [Sat, 15 Oct 2016 08:52:42 +0000 (08:52 +0000)]
MFC r302560:

  OFWPCI: Fix style(9).  No functional change.

7 years agoMFC r306759:
mmel [Sat, 15 Oct 2016 08:31:46 +0000 (08:31 +0000)]
MFC r306759:

  ARM: Remove ARMv4 #defines from busdma_machdep-v6.c, it's ARMv6 specific
  file. Consistently use BUSDMA_DCACHE_ALIGN for cache line alignment.

7 years agoMFC r306756:
mmel [Sat, 15 Oct 2016 08:27:54 +0000 (08:27 +0000)]
MFC r306756:

  ARM: SEV/WFE instructions are implemented starting from ARMv6K, use it
  directly.

7 years agoMFC r306755:
mmel [Sat, 15 Oct 2016 07:38:27 +0000 (07:38 +0000)]
MFC r306755:

  ARM: Add identifiers for ARM Cortex v8 and Marvell Sheeva v7 cores.  Not a
  functional change.

7 years agoMFC r306754:
mmel [Sat, 15 Oct 2016 07:30:13 +0000 (07:30 +0000)]
MFC r306754:

  ARM: Remove unused variable.  Not a functional change.

7 years agoMFC r307000, r307001:
avos [Sat, 15 Oct 2016 07:28:46 +0000 (07:28 +0000)]
MFC r307000, r307001:

mbuf(9), mbuf_tags(9): fix function prototypes.

- Add m_getclr(9) symlink to ObsoleteFiles.inc (removed in r295481).
- Add const qualifiers in m_dup(), m_dup_pkthdr() and m_tag_copy_chain()
(r286450).
- Fix m_dup_pkthdr() definition (it's not the same as m_move_pkthdr()).

7 years agoBump __FreeBSD_version for todays ZFS merges.
mav [Fri, 14 Oct 2016 18:42:30 +0000 (18:42 +0000)]
Bump __FreeBSD_version for todays ZFS merges.

7 years agoMFC r307037:
kib [Fri, 14 Oct 2016 09:34:48 +0000 (09:34 +0000)]
MFC r307037:
Correct indent.

7 years agoMFC r307036:
kib [Fri, 14 Oct 2016 09:28:59 +0000 (09:28 +0000)]
MFC r307036:
Fill msg_len for the initial element of msgvec.

7 years agoMFC 302723,302726,302731
sephe [Fri, 14 Oct 2016 09:10:41 +0000 (09:10 +0000)]
MFC 302723,302726,302731

302723
    hyperv: All Hypercall parameters have same alignment requirement.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7086

302726
    hyperv: Signal event input parameter is shared w/ MNF

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7087

302731
    hyperv/vmbus: Reorganize MNF event sending.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7088

7 years agoMFC 302710,302713
sephe [Fri, 14 Oct 2016 09:00:29 +0000 (09:00 +0000)]
MFC 302710,302713

302710
    hyperv/vmbus: Remove unnecessary callback check.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7046

302713
    hyperv/vmbus: Install different task function for batch/non-batch channels

    This avoids bunch of unnecessary checks on hot path and simplifies the
    channel processing.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7085

7 years agoMFC 302707-302709
sephe [Fri, 14 Oct 2016 08:55:49 +0000 (08:55 +0000)]
MFC 302707-302709

302707
    hyperv/vmbus: Nuke unused field from hv_vmbus_channel.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7036

302708
    hyperv/bufring: Remove unused fields

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7037

302709
    hyperv/vmbus: Pack bool field into flags field

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7038

7 years agoMFC 302698-302704,302706
sephe [Fri, 14 Oct 2016 08:45:53 +0000 (08:45 +0000)]
MFC 302698-302704,302706

302698
    hyperv/vmbus: Add vmbus method for GUID base device probing.

    Reduce the exposure of hv_device.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7024

302699
    hyperv/vmbus: All ivars are read-only; nuke unnecessary write_ivar

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7025

302700
    hyperv/vmbus: Add channel ivar accessor.

    This makes life easier during the transition period to nuke the hv_device.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7026

302701
    hyperv/stor: Avoid the hv_device and nuke the broken get_stor_device

    This paves way to nuke the hv_device, which is actually an unncessary
    indirection.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7027

302702
    hyperv/util: Avoid the hv_device

    This paves way to nuke the hv_device, which is actually an unncessary
    indirection.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7028

302703
    hyperv/vmbus: Deprecate the usage of hv_device.

    This paves way to nuke the hv_device, which is actually an unncessary
    indirection.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7032

302704
    hyperv/hn: Avoid the hv_device

    This paves way to nuke the hv_device, which is actually an unncessary
    indirection.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7033

302706
    hyperv: Get rid of hv_device, which is unnecessary indirection.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7034

7 years agoMFC 302693-302697
sephe [Fri, 14 Oct 2016 08:34:44 +0000 (08:34 +0000)]
MFC 302693-302697

302693
    hyperv/vmbus: Make channel id a field of hv_vmbus_channel.

    This prepares to remove the unnecessary offer message embedding in
    hv_vmbus_channel.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7014

302694
    hyperv/vmbus: Make subchan index a field of hv_vmbus_channel.

    This prepares to remove the unnecessary offer message embedding in
    hv_vmbus_channel.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7015

302695
    hyperv/vmbus: Add flags field into hv_vmbus_channel for MNF indication

    This prepares to remove the unnecessary offer message embedding in
    hv_vmbus_channel.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7019

302696
    hyperv/vmbus: Add type/instance guid fields into hv_vmbus_channel

    This prepares to remove the unnecessary offer message embedding in
    hv_vmbus_channel.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7020

302697
    hyperv/vmbus: Remove the embedded offer message from hv_vmbus_channel

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7021

7 years agoMFC 302692
sephe [Fri, 14 Oct 2016 08:26:17 +0000 (08:26 +0000)]
MFC 302692

    hyperv/vmbus: Merge hv_connection.c into hv_channel.c

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7004

7 years agoMFC 302636-302638
sephe [Fri, 14 Oct 2016 08:18:55 +0000 (08:18 +0000)]
MFC 302636-302638

302636
    hyperv/vmbus: Move channel map to vmbus_softc

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6982

302637
    hyperv/vmbus: Remove needed bits

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7002

302638
    hyperv/vmbus: Destroy channel list lock upon attach failure and detach.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D7003

7 years agoMFC 302632-302634
sephe [Fri, 14 Oct 2016 08:14:51 +0000 (08:14 +0000)]
MFC 302632-302634

302632
    hyperv/vmbus: More verbose for GPADL_connect/chan_{rescind,offer}

    Reviewed by:    Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com>
    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6976

302633
    hyperv/vmbus: Free sysctl properly upon channel close.

    Prepare for sub-channel re-open.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6977

302634
    hyperv/vmbus: Fix sub-channel re-open support.

    For multi-channel devices, once the primary channel is closed,
    a set of 'rescind' messages for sub-channels will be delivered
    by Hypervisor.  Sub-channel MUST be freed according to these
    'rescind' messages; directly re-openning sub-channels in the
    same fashion as the primary channel's re-opening does NOT work
    at all.

    After the primary channel is re-opened, requested # of sub-
    channels will be delivered though 'channel offer' messages, and
    this set of newly offered channels can be opened along side with
    the primary channel.

    This unbreaks the MTU setting for hn(4), which requires re-
    openning all existsing channels upon MTU change.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6978

7 years agoMFC 302617-302621,302623,302629-302631
sephe [Fri, 14 Oct 2016 08:02:37 +0000 (08:02 +0000)]
MFC 302617-302621,302623,302629-302631

302617
    hyperv/vmbus: Flatten channel message response processing.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6914

302618
    hyperv/vmbus: Avoid tx_evtflags setting code duplication.

    MFC after:      1 week
    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6915

302619
    hyperv/vmbus: Busdma-fy Hypercall signal event input parameter.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6916

302620
    hyperv: Nuke unused stuffs

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6917

302621
    hyperv/vmbus: Don't be oversmart in default cpu selection.

    Pin the channel to cpu0 by default.  Drivers having special channel-cpu
    mapping requirement should call vmbus_channel_cpu_{set,rr}() themselves.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6918

302623
    hyperv/vmbus: Minor renaming

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6919

302629
    hyperv/vmbus: Rework vmbus version accessing.

    Instead of global variable, vmbus version is accessed through
    a vmbus DEVMETHOD now.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6953

302630
    hyperv/vmbus: Move GPADL index into vmbus_softc

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6954

302631
    hyperv/vmbus: Move channel list to vmbus_softc

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6956

7 years agoMFC 302607-302612
sephe [Fri, 14 Oct 2016 07:47:35 +0000 (07:47 +0000)]
MFC 302607-302612

302607
    hyperv/vmbus: Use post message Hypercall APIs for channel open

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6876

302608
    hyperv/vmbus: Remove unnecessary check and unapplied comment

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6877

302609
    hyperv/vmbus: Use post message Hypercall APIs for GPADL connect.

    This also fixes memory leakge if sub-connect messages are needed.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6878

302610
    hyperv/vmbus: Use post message Hypercall APIs for channel close

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6906

302611
    hyperv/vmbus: Use post message Hypercall APIs for GPA disconnect

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6912

302612
    hyperv: Nuke unused stuffs

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6913

7 years agoMFC r305563: MFV r305562: 7259 DS_FIELD_LARGE_BLOCKS is unused
mav [Fri, 14 Oct 2016 07:46:09 +0000 (07:46 +0000)]
MFC r305563: MFV r305562: 7259 DS_FIELD_LARGE_BLOCKS is unused

The DS_FIELD_LARGE_BLOCKS macro has been unused since the integration of
this patch:

    commit ca0cc3918a1789fa839194af2a9245f801a06b1a
    Author: Matthew Ahrens <mahrens@delphix.com>
    Date:   Fri Jul 24 09:53:55 2015 -0700

        5959 clean up per-dataset feature count code
        Reviewed by: Toomas Soome <tsoome@me.com>
        Reviewed by: George Wilson <george@delphix.com>
        Reviewed by: Alex Reece <alex@delphix.com>
        Approved by: Richard Lowe <richlowe@richlowe.net>

This patch simply removes this macro from dsl_dataset.h.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305561: MFV r305560:
mav [Fri, 14 Oct 2016 07:44:24 +0000 (07:44 +0000)]
MFC r305561: MFV r305560:
7278 tuning zfs_arc_max does not impact arc_c_min

When changing zfs_arc_max (e.g. as zdb does), it may be set to less
than the default arc_c_min. arc_c_min should decrease to not be more than
arc_c_max, but it doesn't; therefore tuning of arc_c_max is ineffective.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Author: Matthew Ahrens <mahrens@delphix.com>

openzfs/openzfs@608764beadaf4bb71c5d8fe1818e8392ac66a61b

7 years agoMFC r305456 (by avg): fix zfs pool creation accidentally broken by r305331
mav [Fri, 14 Oct 2016 07:42:53 +0000 (07:42 +0000)]
MFC r305456 (by avg): fix zfs pool creation accidentally broken by r305331

The upstream change introduced a new load state, SPA_LOAD_CREATE,
and vdev_geom code needs to be aware of it.

7 years agoMFC r305342: Missed FreeBSD-specific piece of r305338.
mav [Fri, 14 Oct 2016 07:41:11 +0000 (07:41 +0000)]
MFC r305342: Missed FreeBSD-specific piece of r305338.

7 years agoMFC 302543-302545,302547,302549,302554,302556,302557,302559,302606
sephe [Fri, 14 Oct 2016 07:40:04 +0000 (07:40 +0000)]
MFC 302543-302545,302547,302549,302554,302556,302557,302559,302606

302543
    hyperv/vmbus: Use post message Hypercall APIs for channel request

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6831

302544
    hyperv/hn: Add tunable to allow tcp_lro_queue_mbuf()

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6841

302545
    hyperv/vmbus: Function renaming.

    And pass vmbus_softc to vmbus_doattach()

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6842

302547
    hyperv/vmbus: Explicitly assign channel message process array.

    While I'm here, remove the useless message type from message process
    array, which is not used and serves no purposes at all.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6858

302549
    hyperv/vmbus: Add sysctl to expose vmbus version.

    Requested by:   Hongxiong Xian <v-hoxian microsoft com>
    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6860

302554
    hyperv/vmbus: Use post message Hypercall APIs for unload

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6861

302556
    hyperv/vmbus: Create channel synchronously.

    The device probe/attach has been move to a different thread, so the
    reasons to create the channel asynchronously are no longer valid.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6862

302557
    hyperv/vmbus: Save vmbus softc to channels.

    So that we don't need to access the global vmbus softc.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6863

302559
    hyperv/vmbus: Embed channel detach task in channel itself.

    GC work queue stuffs.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6864

302606
    hyperv/vmbus: Reorganize vmbus scan process.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6875

7 years agoMFC r305340: MFC r305337:
mav [Fri, 14 Oct 2016 07:39:34 +0000 (07:39 +0000)]
MFC r305340: MFC r305337:
7004 dmu_tx_hold_zap() does dnode_hold() 7x on same object

Using a benchmark which has 32 threads creating 2 million files in the
same directory, on a machine with 16 CPU cores, I observed poor
performance. I noticed that dmu_tx_hold_zap() was using about 30% of
all CPU, and doing dnode_hold() 7 times on the same object (the ZAP
object that is being held).

dmu_tx_hold_zap() keeps a hold on the dnode_t the entire time it is
running, in dmu_tx_hold_t:txh_dnode, so it would be nice to use the
dnode_t that we already have in hand, rather than repeatedly calling
dnode_hold(). To do this, we need to pass the dnode_t down through
all the intermediate calls that dmu_tx_hold_zap() makes, making these
routines take the dnode_t* rather than an objset_t* and a uint64_t
object number. In particular, the following routines will need to have
analogous *_by_dnode() variants created:

dmu_buf_hold_noread()
dmu_buf_hold()
zap_lookup()
zap_lookup_norm()
zap_count_write()
zap_lockdir()
zap_count_write()

This can improve performance on the benchmark described above by 100%,
from 30,000 file creations per second to 60,000. (This improvement is on
top of that provided by working around the object allocation issue. Peak
performance of ~90,000 creations per second was observed with 8 CPUs;
adding CPUs past that decreased performance due to lock contention.) The
CPU used by dmu_tx_hold_zap() was reduced by 88%, from 340 CPU-seconds
to 40 CPU-seconds.

Sponsored by: Intel Corp.

Closes #109

Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Ned Bass <bass6@llnl.gov>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Author: Matthew Ahrens <mahrens@delphix.com>

openzfs/openzfs@d3e523d489a169ab36f9ec1b2a111a60a5563a9f

7 years agoMFC r305339: MFV r305336: 7247 zfs receive of deduplicated stream fails
mav [Fri, 14 Oct 2016 07:36:32 +0000 (07:36 +0000)]
MFC r305339: MFV r305336: 7247 zfs receive of deduplicated stream fails

This resolves two 'zfs recv' issues. First, when receiving into an
existing filesystem, a snapshot created during the receive process is
not added to the guid->dataset map for the stream, resulting in failed
lookups for deduped streams when a WRITE_BYREF record refers to a
snapshot received earlier in the stream. Second, the newly created
snapshot was also not set properly, referencing the snapshot before the
new receiving dataset rather than the existing filesystem.

Closes #159

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Author: Chris Williamson <chris.williamson@delphix.com>

openzfs/openzfs@b09697c8c18be68abfe538de9809938239402ae8

7 years agoMFC r305338: MFV r305335: 7003 zap_lockdir() should tag hold
mav [Fri, 14 Oct 2016 07:33:36 +0000 (07:33 +0000)]
MFC r305338: MFV r305335: 7003 zap_lockdir() should tag hold

zap_lockdir() / zap_unlockdir() should take a "void *tag" argument which
tags the hold on the zap. This will help diagnose programming errors
which misuse the hold on the ZAP.

Sponsored by: Intel Corp.

Closes #108

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Author: Matthew Ahrens <mahrens@delphix.com>

openzfs/openzfs@0780b3eab5a2c13e04328b39ecd2a6d0d3c4f7cb

7 years agoMFC r305334: MFV r304157:
mav [Fri, 14 Oct 2016 07:31:47 +0000 (07:31 +0000)]
MFC r305334: MFV r304157:
7230 add assertions to dmu_send_impl() to verify that stream includes BEGIN and END records

illumos/illumos-gate@12b90ee2d3b10689fc45f4930d2392f5fe1d9cfa
https://github.com/illumos/illumos-gate/commit/12b90ee2d3b10689fc45f4930d2392f5f
e1d9cfa

https://www.illumos.org/issues/7230
  A test failure occurred where a send stream had only a BEGIN record. This
  should not be possible if the send returns without error. Prevented this from
  happening in the future by adding an assertion to dmu_send_impl() to verify
  that if the function returns 0 (success) both a BEGIN and END record are
  present. Did this by adding flags to dmu_sendarg_t (indicating whether BEGIN o
r
  END records sent), having dump_record() set flags appropriately, adding VERIFY
  statement to dmu_send_impl().

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matt Krantz <matt.krantz@delphix.com>

7 years agoMFC r305333: MFV r304156: 7235 remove unused func dsl_dataset_set_blkptr
mav [Fri, 14 Oct 2016 07:30:16 +0000 (07:30 +0000)]
MFC r305333: MFV r304156: 7235 remove unused func dsl_dataset_set_blkptr

illumos/illumos-gate@bd56f80007857b960e0981ed0797ad8ec844a96b
https://github.com/illumos/illumos-gate/commit/bd56f80007857b960e0981ed0797ad8ec
844a96b

https://www.illumos.org/issues/7235
  The function dsl_dataset_set_blkptr() is unused. We should remove it.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305332: MFV r304159: 7277 zdb should be able to print zfs_dbgmsg's
mav [Fri, 14 Oct 2016 07:28:43 +0000 (07:28 +0000)]
MFC r305332: MFV r304159: 7277 zdb should be able to print zfs_dbgmsg's

illumos/illumos-gate@29bdd2f916366ece37c4748bca6b3d61f57a223b
https://github.com/illumos/illumos-gate/commit/29bdd2f916366ece37c4748bca6b3d61f
57a223b

https://www.illumos.org/issues/7277
  ztest always prints the debug messages (zfs_dbgmsg()) by calling
  zfs_dbgmsg_print(). We should add a flag to zdb to make it do this as well
  before exiting.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>

7 years agoMFC 302540
sephe [Fri, 14 Oct 2016 07:27:29 +0000 (07:27 +0000)]
MFC 302540

    hyperv/vmbus: Implement a new set of APIs for post message Hypercall

    And use this new APIs for Initial Contact post message Hypercall.
    More post message Hypercalls will be converted.

    Sponsored by:   Microsoft OSTC
    Differential Revision:  https://reviews.freebsd.org/D6830

7 years agoMFC r305331: MFV r304155:
mav [Fri, 14 Oct 2016 07:26:19 +0000 (07:26 +0000)]
MFC r305331: MFV r304155:
7090 zfs should improve allocation order and throttle allocations

illumos/illumos-gate@0f7643c7376dd69a08acbfc9d1d7d548b10c846a
https://github.com/illumos/illumos-gate/commit/0f7643c7376dd69a08acbfc9d1d7d548b
10c846a

https://www.illumos.org/issues/7090
  When write I/Os are issued, they are issued in block order but the ZIO pipelin
e
  will drive them asynchronously through the allocation stage which can result i
n
  blocks being allocated out-of-order. It would be nice to preserve as much of
  the logical order as possible.
  In addition, the allocations are equally scattered across all top-level VDEVs
  but not all top-level VDEVs are created equally. The pipeline should be able t
o
  detect devices that are more capable of handling allocations and should
  allocate more blocks to those devices. This allows for dynamic allocation
  distribution when devices are imbalanced as fuller devices will tend to be
  slower than empty devices.
  The change includes a new pool-wide allocation queue which would throttle and
  order allocations in the ZIO pipeline. The queue would be ordered by issued
  time and offset and would provide an initial amount of allocation of work to
  each top-level vdev. The allocation logic utilizes a reservation system to
  reserve allocations that will be performed by the allocator. Once an allocatio
n
  is successfully completed it's scheduled on a given top-level vdev. Each top-
  level vdev maintains a maximum number of allocations that it can handle
  (mg_alloc_queue_depth). The pool-wide reserved allocations (top-levels *
  mg_alloc_queue_depth) are distributed across the top-level vdevs metaslab
  groups and round robin across all eligible metaslab groups to distribute the
  work. As top-levels complete their work, they receive additional work from the
  pool-wide allocation queue until the allocation queue is emptied.

Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: George Wilson <george.wilson@delphix.com>

7 years agoMFC r305328: MFV r303081: 7163 ztest failures due to excess error injection
mav [Fri, 14 Oct 2016 07:23:58 +0000 (07:23 +0000)]
MFC r305328: MFV r303081: 7163 ztest failures due to excess error injection

illumos/illumos-gate@f34284d835bc555f987c1310df46c034c3101155
https://github.com/illumos/illumos-gate/commit/f34284d835bc555f987c1310df46c034c
3101155

https://www.illumos.org/issues/7163
  Running zloop from zfs-precommit hit this assertion:
       *panicstr/s
  0xfffffd7fd7419370: assertion failed for thread 0xfffffd7fe29ed240,
  thread-id 577: parent != NULL, file ../../../uts/common/fs/zfs/dbuf.c, line
  1827
       $c
  libc.so.1`_lwp_kill+0xa()
  libc.so.1`_assfail+0x182(fffffd7ffb1c29fafffffd7ffb1cc028, 723)
  libc.so.1`assfail+0x19(fffffd7ffb1c29fafffffd7ffb1cc028, 723)
  libzpool.so.1`dbuf_dirty+0xc69(10e3bc103601700)
  libzpool.so.1`dbuf_dirty+0x61e(10c736403601700)
  libzpool.so.1`dbuf_dirty+0x61e(10e282803601700)
  libzpool.so.1`dmu_buf_will_fill+0x64(10e282803601700)
  libzpool.so.1`dmu_write+0x1b6(2c7e640, d, 400000002e000000, 200, 3717b40,
  3601700)
  ztest_replay_write+0x568(4950d0, 3717a80, 0)
  ztest_write+0x125(4950d0, d, 400000002e000000, 200, 413f000)
  ztest_io+0x1bb(4950d0, d, 400000002e000000)
  ztest_dmu_write_parallel+0xaa(4950d0, 6)
  ztest_execute+0x83(1, 420c98, 6)
  ztest_thread+0xf4(6)
  libc.so.1`_thrp_setup+0x8a(fffffd7fe29ed240)
  libc.so.1`_lwp_start()
  This is another manifestation of ECKSUM in ztest:
  The lowest level ancestor that’s in memory is the L8 (topmost). The L7
  ancestor is blkid 0x10:
       ::dbufs -O 0x2c7e640 -o d -l 7 |::dbuf
  addr object lvl blkid holds os
  600be50 d 7 4 1 ztest/ds_6
  719d880 d 7 0 4 ztest/ds_6

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305327: MFV r303080: 6451 ztest fails due to checksum errors
mav [Fri, 14 Oct 2016 07:21:55 +0000 (07:21 +0000)]
MFC r305327: MFV r303080: 6451 ztest fails due to checksum errors

illumos/illumos-gate@f9eb9fdf196b6ed476e4ffc69cecd8b0da3cb7e7
https://github.com/illumos/illumos-gate/commit/f9eb9fdf196b6ed476e4ffc69cecd8b0d
a3cb7e7

https://www.illumos.org/issues/6451
  Sometimes ztest fails because zdb detects checksum errors. e.g.:
  Traversing all blocks to verify checksums and verify nothing leaked ...
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 8000160> DVA0=<0:1cc2000:
  180000> [L0 other uint64[]] sha256 uncompressed LE contiguou
  s unique single size=100000L/100000P birth=271L/271P fill=1
  cksum=c5a3e27d1ed0f894:843bca3a5473c4bf:f76a19b6830a2e4:91292591613a12bf --
  skipping
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 800000180> DVA0=<0:ce16800:
  180000> [L0 other uint64[]] sha256 uncompressed LE contigu
  ous unique single size=100000L/100000P birth=840L/840P fill=1
  cksum=5d018f3d061e17f3:6d1584784587bf63:2805a74a0ce37369:ba68a214806c7e75
  -- skipping
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 1000000360> DVA0=<0:10d37400:
  180000> [L0 other uint64[]] sha256 uncompressed LE conti
  guous unique single size=100000L/100000P birth=904L/904P fill=1
  cksum=fa1e11d4138bd14b:86c9488c444473e3:f31e43c72e72e46b:e3446472d1174d
  ba -- skipping
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 400000002c0> DVA0=<0:127ef400:
  180000> [L0 other uint64[]] sha256 uncompressed LE cont
  iguous dedup single size=100000L/100000P birth=549L/549P fill=1
  cksum=30e14955ebf13522:66dc2ff8067e6810:4607e750abb9d3b3:6582b8af909fcb
  58 -- skipping
  zdb_blkptr_cb: Got error 50 reading <657, 5, 0, 1c0> DVA0=<0:1a180400:180000>
  [L0 other uint64[]] fletcher4 uncompressed LE contiguou
  s unique single size=100000L/100000P birth=1091L/1091P fill=1 cksum=a6cf1e50:
  29b3bd01c57e5:36779b914035db9a:db61cdcf6bec56f0 -- skippin
  g
  The problem is that ztest_fault_inject() can inject multiple faults into the
  same block. It is designed such that it can inject errors on all leafs of a
  RAID-Z or mirror, but for a given range of offsets, it will only inject errors

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305326: MFV r303079:
mav [Fri, 14 Oct 2016 07:20:07 +0000 (07:20 +0000)]
MFC r305326: MFV r303079:
7147 ztest: ztest_ddt_repair fails with ztest_pattern_match assertion

illumos/illumos-gate@aab80726335c76a7cae32c7300890248d73a51e3
https://github.com/illumos/illumos-gate/commit/aab80726335c76a7cae32c7300890248d
73a51e3

https://www.illumos.org/issues/7147
  Here's the dbuf we're currently reading:
       966f200::dbuf
  addr object lvl blkid holds os
  966f200 4 0 0 1 ztest/ds_3
       966f200::print dmu_buf_t db_data
  db_data = 0x9ae0400
       0x9ae0400/10J
  0x9ae0400: c1c7ced932020d c1c7ced932020d c1c7ced932020d c1c7ced932020d
  c1c7ced932020d c1c7ced932020d c1c7ced932020d c1c7ced932020d
  c1c7ced932020d c1c7ced932020d
  The pattern we're expecting is actually this: a34ae10b5f2db2. If we attempt to
  read the block on disk we find that it has matches what ztest_ddt_repair()
  would have written:
       ~c1c7ced932020d=J
  ff3e383126cdfdf2
       966f200::print dmu_buf_impl_t db_blkptr | ::blkptr
  DVA0=<0:71d3c00:800>
  [L0 UINT64_OTHER] SHA256 OFF LE contiguous dedup single
  size=400L/400P birth=55L/55P fill=1
  cksum=18486450d3ce8c6d:75a72f4bbf117b0f:2d3a226314eb5650:2eb0fd68648b1af0
     1. zdb -U /rpool/tmp/zpool.cache -R ztest 0:71d3c00:800 | head
        Found vdev type: mirror
  0:71d3c00:800
  0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
  000000: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000010: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000020: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000030: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000040: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000050: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: George Wilson <george.wilson@delphix.com>

7 years agoMFC r305325: MFV r303078:
mav [Fri, 14 Oct 2016 07:18:27 +0000 (07:18 +0000)]
MFC r305325: MFV r303078:
7086 ztest attempts dva_get_dsize_sync on an embedded blockpointer

illumos/illumos-gate@926549256b71acd595f69b236779ff6b78fa08ef
https://github.com/illumos/illumos-gate/commit/926549256b71acd595f69b236779ff6b7
8fa08ef

https://www.illumos.org/issues/7086
  In dbuf_dirty(), we need to grab the dn_struct_rwlock before looking at the
  db_blkptr, to prevent it from being changed by syncing context.
  Otherwise we may see that ztest got a segfault from this stack:
  libzpool.so.1`dva_get_dsize_sync+0x98(872f000b32b240fed7811b, 0, b4cda20,
0)
  libzpool.so.1`bp_get_dsize+0x60(872f000b32b240, 0, 97cb7809d4c1a8, 0)
  libzpool.so.1`dbuf_dirty+0x9b3(ce0a10097cb780, 9, fecd2530)
  libzpool.so.1`dmu_buf_will_dirty+0xc3(ce0a10097cb780ea293d6c, 1)
  libzpool.so.1`zap_lockdir+0x1a0(8aaa3c0, 1, 0, 97cb780, 1, 1)
  libzpool.so.1`zap_remove_norm+0x30(8aaa3c0, 1, 0, 8728b10, 0, 97cb780)
  libzpool.so.1`zap_remove+0x29(8aaa3c0, 1, 0, 8728b1097cb780, a)
  ztest_replay_remove+0x225(ea2945888728ae8, 0, 38010000, 0, 0)
  ztest_remove+0x9f(ea294588ea293f50, 4, 3)
  ztest_object_init+0x78(ea294588ea293f50, 4e0, 1)
  ztest_dmu_object_alloc_free+0x71(ea294588, 13)
  ztest_dmu_objset_create_destroy+0x224(80cef08, 13, 0, 805d36c9017ad44, 0)
  ztest_execute+0x89(a, 807c720, 13, 0)
  ztest_thread+0xea(13, 0, 0, 0)
  libc.so.1`_thrp_setup+0x88(f0983240)
  libc.so.1`_lwp_start(f0983240, 0, 0, 0, 0, 0)
  Looking into it a bit, we see that this is an embedded blockpointer, so
  BP_GET_NDVAS should have returned 0:
       b32b240::blkptr
  EMBEDDED [L0 ZAP_OTHER] et=0 LZ4 size=200L/4aP birth=80L
  Instead, it looks like another thread is modifying this blockpointer:
       b32b240::ugrep | ::whatis
  f47a0e0c is in [ stack tid=0x19f ]
  ebd6ec40 is in [ stack tid=0x226 ]
  ea293bd0 is in [ stack tid=0x244 ]
  ea293be4 is in [ stack tid=0x244 ]

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305324: MFV r303077:
mav [Fri, 14 Oct 2016 07:16:11 +0000 (07:16 +0000)]
MFC r305324: MFV r303077:
7072 zfs fails to expand if lun added when os is in shutdown state

illumos/illumos-gate@c39a2aae1e2c439d156021edfc20910dad7f9891
https://github.com/illumos/illumos-gate/commit/c39a2aae1e2c439d156021edfc20910dad7f9891

https://www.illumos.org/issues/7072
  upstream:
  38733 zfs fails to expand if lun added when os is in shutdown state
  DLPX-36910 spares and caches should not display expandable space
  DLPX-39262 vdev_disk_open spam zfs_dbgmsg buffer

Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: George Wilson <george.wilson@delphix.com>

7 years agoMFC r305323: MFV r302991: 6950 ARC should cache compressed data
mav [Fri, 14 Oct 2016 07:13:43 +0000 (07:13 +0000)]
MFC r305323: MFV r302991: 6950 ARC should cache compressed data

illumos/illumos-gate@dcbf3bd6a1f1360fc1afcee9e22c6dcff7844bf2
https://github.com/illumos/illumos-gate/commit/dcbf3bd6a1f1360fc1afcee9e22c6dcff7844bf2

https://www.illumos.org/issues/6950
  When reading compressed data from disk, the ARC should keep the compressed
  block cached and only decompress it when consumers access the block. The
  uncompressed data should be short-lived allowing the ARC to cache a much larger
  amount of data. The DMU would also maintain a smaller cache of uncompressed
  blocks to minimize the impact of decompressing frequently accessed blocks.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Don Brady <don.brady@intel.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: George Wilson <george.wilson@delphix.com>

7 years agoMFC r306747, r307042: Fix ABI compat shims, broken by adding NVMe support.
mav [Fri, 14 Oct 2016 06:56:06 +0000 (06:56 +0000)]
MFC r306747, r307042: Fix ABI compat shims, broken by adding NVMe support.

7 years agoMFC r306464
hiren [Fri, 14 Oct 2016 01:38:29 +0000 (01:38 +0000)]
MFC r306464

This adds a sysctl which allows you to disable the TCP hostcache. This is handy
during testing of network related changes where cached entries may pollute your
results, or during known congestion events where you don't want to unfairly
penalize hosts.

Prior to r232346 this would have meant you would break any connection with a sub
1500 MTU, as the hostcache was authoritative. All entries as they stand today
should simply be used to pre populate values for efficiency.

7 years agoMFC r306458: Properly preserve ip_tos bits for IPv4 packets
lidl [Thu, 13 Oct 2016 03:10:04 +0000 (03:10 +0000)]
MFC r306458: Properly preserve ip_tos bits for IPv4 packets

Restructure code slightly to save ip_tos bits earlier.  Fix the bug
where the ip_tos field is zeroed out before assigning to the iptos
variable. Restore the ip_tos and ip_ver fields only if they have
been zeroed during the pseudo-header checksum calculation.

7 years agoMFC r306696: Make 502.pfdenied find blacklistd/* filter names dynamically
lidl [Thu, 13 Oct 2016 03:08:32 +0000 (03:08 +0000)]
MFC r306696: Make 502.pfdenied find blacklistd/* filter names dynamically

This change is needed to make the 520.pfdenied script find the new
blacklistd/* anchor points for reporting blocked traffic.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r306695: Make blacklist-helper commands emit a message when successful
lidl [Thu, 13 Oct 2016 03:06:23 +0000 (03:06 +0000)]
MFC r306695: Make blacklist-helper commands emit a message when successful

The blacklistd daemon expects to see a message on stdout, instead
of just relying on the exit value from any invoked programs.

Change the pf filtering to create multiple filters, attached under
a the "blacklist/*" anchor point.  This prevents the filtering for
each port's filtering rule from overwriting the previously installed
filtering rule.  Check for an existing filtering rule for each port,
so the installation of a given filtering rule only happens once.
Reinstalling the same rule resets the counters for the pf rule, and
we don't want that.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r306766:
jtl [Thu, 13 Oct 2016 02:32:41 +0000 (02:32 +0000)]
MFC r306766:
  Remove declaration of un-defined function tcp_seq_subtract().

7 years agoMFC r303818, r303833, r303941, r304478, r304481, r304483, r304484, r304554,
ed [Wed, 12 Oct 2016 12:17:41 +0000 (12:17 +0000)]
MFC r303818, r303833, r303941, r304478, r304481, r304483, r304484, r304554,
    r304555, r304556, r304557, r304558, r304559, r304561, r304563, r304564,
    r304565, r304615, r304742, r304743, r304744, r304745, r304748, r304886,
    r304991, r305928, r305938, r305987, r306185:

  Bring CloudABI support back in sync with HEAD.

  - Add support for running 32-bit executables on amd64, armv6 and i386.

  - As these new architectures require the use of the vDSO, merge back
    vDSO support for 64-bit executables running on amd64 and arm64 as
    well. This has the advantage that support for vDSO-less execution
    can be phased out when 11.0 becomes unsupported, as opposed to 11.x.

  This change has been tested by running the cloudlibc unit tests on all
  supported architectures, which seems to work fine.

7 years agoMFC r306665: zfs: fix a wrong assertion for extended attributes
avg [Wed, 12 Oct 2016 11:48:14 +0000 (11:48 +0000)]
MFC r306665: zfs: fix a wrong assertion for extended attributes

PR: 213112

7 years agoMFC r306670:
mm [Wed, 12 Oct 2016 10:28:22 +0000 (10:28 +0000)]
MFC r306670:
Sync libarchive with vendor including security fixes.

Important vendor bugfixes (relevant to FreeBSD):
#747: Out of bounds read in mtree parser
#761: heap-based buffer overflow in read_Header (7-zip)
#794: Invalid file on bsdtar command line results in internal errors (1)

PR: 213092 (1)

7 years agoMFC r306162:
ed [Wed, 12 Oct 2016 09:17:41 +0000 (09:17 +0000)]
MFC r306162:

  Make it possible to safely use TPIDRURW from userspace.

  On amd64, arm64 and i386, we have the possibility to switch between TLS
  areas in userspace. The nice thing about this is that it makes it easier
  to do light-weight threading, if we ever feel like doing that. On armv6,
  let's go into the same direction by making it possible to safely use the
  TPIDRURW register, which is intended for this purpose.

  Clean up the ARMv6 code to remove md_tp entirely. Simply add a dedicated
  field to the PCB to hold the value of TPIDRURW across context switches,
  like we do for any other register. As userspace currently uses the
  read-only TPIDRURO register, simply ensure that we keep both values in
  sync where possible. The system calls for modifying the read-only
  register will simply write the intended value into both registers, so
  that it lazily ends up in the PCB during the next context switch.

  Approved by:    andrew
  Reviewed by:    imp
  Differential Revision:  https://reviews.freebsd.org/D7951

7 years agoMFC r304740:
ed [Wed, 12 Oct 2016 09:16:16 +0000 (09:16 +0000)]
MFC r304740:

  Add missing header dependency.

  This header depends on sigaltstack32 being declared.

7 years agoMFC 306699: Do not retry on some security sense codes.
mav [Wed, 12 Oct 2016 05:50:13 +0000 (05:50 +0000)]
MFC 306699: Do not retry on some security sense codes.

7 years agoMFC r305224: MFV r304158:
mav [Wed, 12 Oct 2016 05:20:06 +0000 (05:20 +0000)]
MFC r305224: MFV r304158:
7136 ESC_VDEV_REMOVE_AUX ought to always include vdev information

7115 6922 generates ESC_ZFS_VDEV_REMOVE_AUX a bit too often

illumos/illumos-gate@b72b6bb10ad55121a1b352c6f68ebdc8e20c9086
https://github.com/illumos/illumos-gate/commit/b72b6bb10ad55121a1b352c6f68ebdc8e
20c9086

https://www.illumos.org/issues/7136
  6922 added ESC_ZFS_VDEV_REMOVE_AUX and ESC_ZFS_VDEV_REMOVE_DEV sysevents
  whenever an aux device gets removed from a pool. However, those sysevents will
  be created without the vdev_guid and vdev_path fields. It would be better to
  always populate those fields.

https://www.illumos.org/issues/7115
  The addition of spa_event_notify in vdev removal code (see #6922) causes event
s
  to be generated even if the spare failed to be removed with EBUSY.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>

7 years agoMFC r305222: MFV r302993: 7104 increase indirect block size
mav [Wed, 12 Oct 2016 05:19:08 +0000 (05:19 +0000)]
MFC r305222: MFV r302993: 7104 increase indirect block size

illumos/illumos-gate@4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1c
https://github.com/illumos/illumos-gate/commit/4b5c8e93cab28d3c65ba9d407fd8f46e3
be1db1c

https://www.illumos.org/issues/7104
  The current default indirect block size is 16KB. We can improve
  performance by increasing it to 128KB. This is especially helpful for
  any workload that needs to read most of the metadata, e.g.
  scrub/resilver, file deletion, filesystem deletion, and zfs send.
  We also need to fix a few space estimation errors to make the tests
  pass.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305221: MFV r302992: 7071 lzc_snapshot does not fill in errlist on ENOENT
mav [Wed, 12 Oct 2016 05:17:17 +0000 (05:17 +0000)]
MFC r305221: MFV r302992: 7071 lzc_snapshot does not fill in errlist on ENOENT

illumos/illumos-gate@25f7d993adbfb3452ac4625b3791670746d35ae3
https://github.com/illumos/illumos-gate/commit/25f7d993adbfb3452ac4625b379167074
6d35ae3

https://www.illumos.org/issues/7071
  upstream
  DLPX-40482 lzc_snapshot does not fill in errlist on ENOENT

Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305211: MFV r302662: 6447 handful of nvpair cleanups
mav [Wed, 12 Oct 2016 05:16:33 +0000 (05:16 +0000)]
MFC r305211: MFV r302662: 6447 handful of nvpair cleanups

illumos/illumos-gate@759e89be359f2af635e4122d147df56bce948773
https://github.com/illumos/illumos-gate/commit/759e89be359f2af635e4122d147df56bc
e948773

https://www.illumos.org/issues/6447
  I got a patch from someone who uses nvpair code outside of illumos. It fixes a
  couple of gcc warnings/bugs for him.
     1. silence uninitialized use warnings
     2. add parentheses around assignment used as truth value
     3. fix printf format specifier (ll is for integers only)
     4. strstr, strspn, strcspn, and strcmp are declared in string.h, not
        strings.h.
     5. avoid scanning integer into boolean variable

Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Steve Dougherty <sdougherty@barracuda.com>

7 years agoMFC r305210: MFV r302661:
mav [Wed, 12 Oct 2016 05:15:53 +0000 (05:15 +0000)]
MFC r305210: MFV r302661:
7082 bptree_iterate() passes wrong args to zfs_dbgmsg()

illumos/illumos-gate@10e67aa0db0823d5464aafdd681f3c966155c68e
https://github.com/illumos/illumos-gate/commit/10e67aa0db0823d5464aafdd681f3c966
155c68e

https://www.illumos.org/issues/7082
  upstream
  DLPX-40542 bptree_iterate() passes wrong args to zfs_dbgmsg()

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305209: MFV r302660: 6314 buffer overflow in dsl_dataset_name
mav [Wed, 12 Oct 2016 05:15:09 +0000 (05:15 +0000)]
MFC r305209: MFV r302660: 6314 buffer overflow in dsl_dataset_name

illumos/illumos-gate@9adfa60d484ce2435f5af77cc99dcd4e692b6660
https://github.com/illumos/illumos-gate/commit/9adfa60d484ce2435f5af77cc99dcd4e6
92b6660

https://www.illumos.org/issues/6314
  Callers of dsl_dataset_name pass a buffer of size ZFS_MAXNAMELEN, but
  dsl_dataset_name copies the datasets' name PLUS the snapshot name to it,
  resulting in a max of 2 * ZFS_MAXNAMELEN + '@'.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305206: MFV r302658:
mav [Wed, 12 Oct 2016 05:14:04 +0000 (05:14 +0000)]
MFC r305206: MFV r302658:
6872 zfs libraries should not allow uninitialized variables

illumos/illumos-gate@f83b46baf98d276f5f84fa84c8b461f412ac1f5e
https://github.com/illumos/illumos-gate/commit/f83b46baf98d276f5f84fa84c8b461f41
2ac1f5e

https://www.illumos.org/issues/6872
  We compile the zfs libraries with -Wno-uninitialized. We should remove
  this. Change makefiles, fix new warnings, fix pbchk errors.

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>

7 years agoMFC r305205: MFV r302657:
mav [Wed, 12 Oct 2016 05:13:12 +0000 (05:13 +0000)]
MFC r305205: MFV r302657:
4521 zfstest is trying to execute evil "zfs unmount -a"

illumos/illumos-gate@8808ac5dae118369991f158b6ab736cb2691ecde
https://github.com/illumos/illumos-gate/commit/8808ac5dae118369991f158b6ab736cb2
691ecde

https://www.illumos.org/issues/4521
  zfstest is trying to execute evil "zfs unmount -a", which fails (fortunately,
  as it would otherwise leave me with my ~ missing):
  03:44:11.86 cannot unmount '/export/home/yuri': Device busy cannot unmount '/
  export/home': Device busy
  03:44:11.86 ERROR: /usr/sbin/zfs unmount -a exited 1
  This affects, at least, zfs_mount_009_neg and zfs_mount_all_001_pos, both
  failing on that step. The pool containing the /export/home hierarchy is
  included in KEEP variable, but it doesn't seem to affect anything here.

Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

7 years agoMFC r305203: MFV r302655: 6873 zfs_destroy_snaps_nvl leaks errlist
mav [Wed, 12 Oct 2016 05:10:48 +0000 (05:10 +0000)]
MFC r305203: MFV r302655: 6873 zfs_destroy_snaps_nvl leaks errlist

illumos/illumos-gate@4cde22c29999ffb907ca39d2ebd512812f7e5168
https://github.com/illumos/illumos-gate/commit/4cde22c29999ffb907ca39d2ebd512812
f7e5168

https://www.illumos.org/issues/6873
  lzc_destroy_snaps() returns an nvlist in errlist.
  zfs_destroy_snaps_nvl() should nvlist_free() it before returning.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Chris Williamson <chris.williamson@delphix.com>

7 years agoMFC r305202: MFV r302654:
mav [Wed, 12 Oct 2016 05:10:05 +0000 (05:10 +0000)]
MFC r305202: MFV r302654:
6879 incorrect endianness swap for drr_spill.drr_length in libzfs_sendrecv.c

illumos/illumos-gate@20fea7a47472aceb64d3ed48cc2a3ea268bc4795
https://github.com/illumos/illumos-gate/commit/20fea7a47472aceb64d3ed48cc2a3ea26
8bc4795

https://www.illumos.org/issues/6879
  In libzfs_sendrecv, there's a typo:
  case DRR_SPILL:
              if (byteswap) {
                  drr->drr_u.drr_write.drr_length =
                      BSWAP_64(drr->drr_u.drr_spill.drr_length);
              }
  Instead of drr_write.drr_length, we should be assigning the result of the
  byteswap to drr_spill.drr_length.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Dan Kimmel <dan.kimmel@delphix.com>

7 years agoMFC r305201: MFV r302653:
mav [Wed, 12 Oct 2016 05:09:22 +0000 (05:09 +0000)]
MFC r305201: MFV r302653:
6111 zfs send should ignore datasets created after the ending snapshot

illumos/illumos-gate@4a20c933b148de8a1c1d3538391c64284e636653
https://github.com/illumos/illumos-gate/commit/4a20c933b148de8a1c1d3538391c64284
e636653

https://www.illumos.org/issues/6111
  If you create a zfs child folder, zfs send returns an error when a recursive
  incremental send is done between two snapshots made prior to the folder
  creation.
  The problem can be reproduced with the following steps.
  root@zfs:/# zfs create pool/test
  root@zfs:/# zfs snapshot pool/test@snap1
  root@zfs:/# zfs snapshot pool/test@snap2
  root@zfs:/# zfs create pool/test/child
  root@zfs:/# zfs send -R -I pool/test@snap1 pool/test@snap2 > /dev/null
  WARNING: could not send pool/test/child@snap2: does not exist
  WARNING: could not send pool/test/child@snap2: does not exist
  root@zfs:/# echo $?
  1
  root@zfs:/# zfs snapshot -r pool/test@snap3
  root@zfs:/# zfs send -R -I pool/test@snap1 pool/test@snap3 > /dev/null
  root@zfs:/# echo $?
  0
  root@zfs:/# zfs send -R -I pool/test@snap2 pool/test@snap3 > /dev/null
  root@zfs:/# echo $?
  0
  Since pool/test/child was created after snap2, zfs send should not expect snap2
  to be in pool/test/child when doing a recursive send. It should examine the
  compare the creation time of the snapshot and each child folder to decide if
  the folder will be sent. The next incremental send between snap2 and snap3
  would properly create the child folder and snap3 which first appears in the
  child folder.
  The problem is identical if '-i' is used instead of '-I'.

Reviewed by: Alex Aizman alex.aizman@nexenta.com
Reviewed by: Alek Pinchuk alek.pinchuk@nexenta.com
Reviewed by: Roman Strashkin roman.strashkin@nexenta.com
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Alex Deiter <alex.deiter@nexenta.com>

7 years agoMFC r305197: MFV r302646:
mav [Wed, 12 Oct 2016 05:08:09 +0000 (05:08 +0000)]
MFC r305197: MFV r302646:
6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch

illumos/illumos-gate@ea4a67f462de0a39a9adea8197bcdef849de5371
https://github.com/illumos/illumos-gate/commit/ea4a67f462de0a39a9adea8197bcdef84
9de5371

https://www.illumos.org/issues/6980
  doing zfs send -i snap1 snap2 >testfile results in
  internal error: Invalid argument
  Abort (core dumped)

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305194: MFV r302642:
mav [Wed, 12 Oct 2016 05:04:36 +0000 (05:04 +0000)]
MFC r305194: MFV r302642:
6876 Stack corruption after importing a pool with a too-long name

illumos/illumos-gate@c971037baa5d64dfecf6d87ed602fc3116ebec41
https://github.com/illumos/illumos-gate/commit/c971037baa5d64dfecf6d87ed602fc3116ebec41

https://www.illumos.org/issues/6876
  Calling dsl_dataset_name on a dataset with a 256 byte buffer is asking for
  trouble. We should check every dataset on import, using a 1024 byte buffer and
  checking each time to see if the dataset's new name is longer than 256 bytes.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Paul Dagnelie <pcd@delphix.com>

7 years agoMFC r305628: intro(2),_exit(2): Update for reaper (procctl(PROC_REAP_ACQUIRE)).
jilles [Tue, 11 Oct 2016 21:59:22 +0000 (21:59 +0000)]
MFC r305628: intro(2),_exit(2): Update for reaper (procctl(PROC_REAP_ACQUIRE)).

7 years agoUse the sponsors/vendors entities in the errata docs.
gjb [Tue, 11 Oct 2016 17:47:54 +0000 (17:47 +0000)]
Use the sponsors/vendors entities in the errata docs.

Sponsored by: The FreeBSD Foundation

7 years agoAdd missing ThunderX release notes
emaste [Tue, 11 Oct 2016 17:12:26 +0000 (17:12 +0000)]
Add missing ThunderX release notes

Reviewed by: gjb
Differential Revision: https://reviews.freebsd.org/D8217

7 years agoSwitch stable/11 to -STABLE following the release.
gjb [Tue, 11 Oct 2016 16:38:39 +0000 (16:38 +0000)]
Switch stable/11 to -STABLE following the release.

Reminded by: Piotr Smyrak
Sponsored by: The FreeBSD Foundation

7 years agoMFC r305207: MFV r302659: 6931 lib/libzfs: cleanup gcc warnings
mav [Tue, 11 Oct 2016 16:33:43 +0000 (16:33 +0000)]
MFC r305207: MFV r302659: 6931 lib/libzfs: cleanup gcc warnings

illumos/illumos-gate@88f61dee20b358671b1b643e9d1dbf220a1d69be
https://github.com/illumos/illumos-gate/commit/88f61dee20b358671b1b643e9d1dbf220a1d69be

https://www.illumos.org/issues/6931
  need cleanup:
  CERRWARN += -_gcc=-Wno-switch
  CERRWARN += -_gcc=-Wno-parentheses
  CERRWARN += -_gcc=-Wno-unused-function

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Igor Kozhukhov <ikozhukhov@gmail.com>

7 years agoMFC r305200: MFV r302651:
mav [Tue, 11 Oct 2016 16:32:49 +0000 (16:32 +0000)]
MFC r305200: MFV r302651:
7054 dmu_tx_hold_t should use refcount_t to track space

illumos/illumos-gate@0c779ad424a92a84d1e07d47cab7f8009189202b
https://github.com/illumos/illumos-gate/commit/0c779ad424a92a84d1e07d47cab7f8009
189202b

https://www.illumos.org/issues/7054
  upstream:
  ee0003de7d3e598499be7ac3fe6b61efcc47cb7f
  DLPX-40399 dmu_tx_hold_t should use refcount_t to track space

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFC r305199: MFV r302648: 7019 zfsdev_ioctl skips secpolicy when FKIOCTL is set
mav [Tue, 11 Oct 2016 16:31:55 +0000 (16:31 +0000)]
MFC r305199: MFV r302648: 7019 zfsdev_ioctl skips secpolicy when FKIOCTL is set

Note that the bulk of the upstream change is not applicable to FreeBSD
and the affected files are not even in the vendor area.

illumos/illumos-gate@45b1747515a17db45e8971501ee84a26bdff37b2
https://github.com/illumos/illumos-gate/commit/45b1747515a17db45e8971501ee84a26bdff37b2

https://www.illumos.org/issues/7019
  Currently zfsdev_ioctl, when confronted by a request with the FKIOCTL flag set,
  skips all processing of secpolicy functions. This means that ZFS is not doing
  any kind of verification of the credentials or access rights of the caller and
  assuming that (as it is an in-kernel client) all such checks have already been
  done.
  This turns out to be quite a dangerous assumption, especially with respect to
  sdev. In general I don't think it's particularly reasonable to offload this
  enforcement of access rights onto other kernel subsystems when ZFS has some
  particular local semantics in this area (delegated datasets etc) and does not
  provide any kind of API to allow other subsystems to avoid code duplication
  when doing it. ZFS should apply its normal access policy to requests from
  within the kernel, and callers should take care to give it the correct
  credentials and call it from the correct context in order to get the results
  they need.
  You can observe the currently unfortunate consequences of this bug in any non-
  global zone that has access to /dev/zvol or any subset of it via sdev profiles.
  In particular, a zone used to contain a KVM or similar which has a single zvol
  passed through to it using a <device match= block in its zone XML.
  Even though sdev makes something of an attempt to control for whether the
  caller should have access to nodes in /dev/zvol, it doesn't do this correctly,
  or really at all in the lookup call path. So, if we have a zone that's been
  given access to any part of /dev/zvol, it can simply look up the full path to
  any other zvol on the entire system, and the node will appear and be able to be
  used.

Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Alex Wilson <alex.wilson@joyent.com>

7 years agoMFC r305198: MFV r302647:
mav [Tue, 11 Oct 2016 16:30:49 +0000 (16:30 +0000)]
MFC r305198: MFV r302647:
6922 Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux device

illumos/illumos-gate@63364b0ee2604783e7a55f8425888867768eafa4
https://github.com/illumos/illumos-gate/commit/63364b0ee2604783e7a55f84258888677
68eafa4

https://www.illumos.org/issues/6922
  ZFS does not do a config_sync after removing an aux (spare, log, or cache)
  device. AFAICT this isn't being done because it is slow and was deemed
  unnecessary. However, it should be such a rare operation that speed doesn't
  matter, and not doing it results in two problems:
  1) It is theoretically possible to remove an aux device from one pool and
  attach it to another, then lose power. When power is restored, both pools woul
d
  think that they own the aux device.
  2) Removal of the aux device doesn't send any useful sysevents to userland.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Alan Somers <asomers@gmail.com>

7 years agoMFC r305195: MFV r302643:
mav [Tue, 11 Oct 2016 16:29:43 +0000 (16:29 +0000)]
MFC r305195: MFV r302643:
6902 speed up listing of snapshots if requesting name only and sorting by name

This was our change from the beginning, so just reduce the upstream diff.