600 Commits

Author SHA1 Message Date
ngie
fded02003e MFC nv(3) and part of nv(9) to stable/10
This includes the following revisions from head:

r258065,r258594,r259430,r260222,r261407,r261408,r263479,r264021,r266351,
r269603,r271026,r271027,r271028,r271241,r271578,r271579,r271847,r272102,
r272843,r273752,r277920,r277921,r277925,r277926,r277927,r279421,r279422,
r279423,r279424,r279425,r279426,r279427,r279428,r279429,r279430,r279431,
r279432,r279434,r279435,r279436,r279438,r279439,r279440,r279760,r282122,
r282254,r282257,r282304,r282312,r285339,r288340

This change reverts stable/10@r282122 and stable/10@r288340, and re-MFCs the
series again (r282122, r285339, and r288340).

More changes are pending to nv(9)/pci(4) after further review/work. Please see
the Phabricator review for more details (both https://reviews.freebsd.org/D4232
and https://reviews.freebsd.org/D4249 ).

- Tested with:
-- Booting VMware Fusion 8.1.0 running on a Haswell Apple Macbook Pro
-- Booting a Haswell machine with zfs and running some stress workloads with
   VirtualBox guests
-- make tinderbox
-- kyua test -k /usr/tests/lib/libnv

Differential Revision: https://reviews.freebsd.org/D4249 (part of a larger diff)
Relnotes: yes
Reviewed by: oshogbo (implicit), sbruno (implicit)
Submitted by: Kevin Bowling <kevin.bowling@kev009.com>
Sponsored by: EMC / Isilon Storage Division
2015-12-31 03:28:14 +00:00
bdrewery
2dfe4da949 MFC r289393:
Add more SUBDIR_PARALLEL.
2015-12-04 18:14:31 +00:00
smh
46bf441574 MFC r291071:
Fix zfs(8) set options

Sponsored by:	Multiplay
2015-11-23 12:19:36 +00:00
mav
eb4386d821 Fix build on stable/10. 2015-11-13 10:32:34 +00:00
mav
0c1b503089 MFC r289562: 6328 Fix cstyle errors in zfs codebase
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>

illumos/illumos-gate@9a686fbc18
2015-11-13 09:50:08 +00:00
mav
e2e0737ec7 MFC r289536: 5767 fix several problems with zfs test suite
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: John Wren Kennedy <john.kennedy@delphix.com>

illumos/illumos-gate@52244c0958

In fact, only unrelated part of that commit is applicable:
8. zpool list -v doesn't print spares
It also doesn't correctly identify log devices.
2015-11-13 09:48:43 +00:00
mav
503dafdd83 MFC r289531: 5847 libzfs_diff should check zfs_prop_get() return
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Alexander Eremin <a.eremin@nexenta.com>

illumos/illumos-gate@8430278980
2015-11-13 09:47:37 +00:00
mav
b470ddeee2 MFC r289528: Reduce diff from upstream.
Should be no functional change.
2015-11-13 09:46:28 +00:00
mav
ac5dc15cb6 MFC r289527:
5561 support root pools on EFI/GPT partitioned disks
5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks)

Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Hans Rosenfeld <hans.rosenfeld@nexenta.com>

illumos/illumos-gate@1a902ef862

This is NOP changes for FreeBSD.
2015-11-13 09:45:33 +00:00
mav
5f4b8bb389 MFC r289500: 6298 zfs_create_008_neg and zpool_create_023_neg need to be
updated for large block support.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Joe Stein <joe.stein@delphix.com>

illumos/illumos-gate@e9316f7696
2015-11-13 09:42:59 +00:00
mav
1c6d93b28d MFC r289499: Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 13967:92bec6d87f59

Illumos ZFS issues:
  3557 dumpvp_size is not updated correctly when a dump zvol's size is
       changed
  3558 setting the volsize on a dump device does not return back ENOSPC
  3559 setting a volsize larger than the space available sometimes succeeds
2015-11-13 09:41:34 +00:00
mav
6ee6a24dc3 MFC r289497: 5745 zfs set allows only one dataset property to be set at a time
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Reviewed by: Richard PALO <richard@NetBSD.org>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Approved by: Rich Lowe <richlowe@richlowe.net>
Author: Chris Williamson <chris.williamson@delphix.com>

illumos/illumos-gate@30925561c2
2015-11-13 09:39:55 +00:00
mav
1f288e511e MFC r289422:
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@45818ee124

This is only a partial merge of respective ZFS infrastructure changes.
At this moment FreeBSD kernel has no those crypto algorithms, so the
parts of the code to enable them are commented out.  When they are
implemented, it will be trivial to plug them in.
2015-11-13 09:32:04 +00:00
mav
76f98aa10a MFC r289362, r289445: 2605 want to resume interrupted zfs send
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Arne Jansen <sensille@gmx.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@9c3fd1216f

For more info, see:
 - slides http://www.slideshare.net/MatthewAhrens/openzfs-send-and-receive
 - video https://www.youtube.com/watch?v=iY44jPMvxog
 - manpage changes (for zfs resume -s and zfs send -t)
 - upcoming talk at the OpenZFS Developer Summit

The TL;DR is:
Use "zfs receive -s" to save the partially received state on failure.
On failure, get the receive token with "zfs get receive_resume_token <fs>"
Resume the send with "zfs send -t <token_value>"

Relnotes:       yes
2015-11-13 09:30:17 +00:00
mav
49d28de1a8 MFC r289313: 5764 "zfs send -nv" directs output to stderr
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Basil Crow <basil.crow@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Manoj Joseph <manoj.joseph@delphix.com>

illumos/illumos-gate@dc5f28a3c3
2015-11-13 09:25:47 +00:00
markj
8a2f0f6fa4 MFC r289866:
DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_count
attribute rather than DW_AT_upper_bound. Teach ctfconvert about this so that
array type sizes are encoded correctly.

PR:           203772
2015-11-13 01:27:20 +00:00
ngie
73c3857204 MFC r283144:
Articulate dependencies for cddl/lib/libdtrace and cddl/lib/libzfs

Parallelize the build in this subdirectory

Sponsored by: EMC / Isilon Storage Division
2015-10-25 22:34:49 +00:00
avg
6087342130 MFC r288339: remove unused sgsmsg utility (originally imported from opensolaris) 2015-10-23 08:35:17 +00:00
avg
b51c19847a MFC r284409: Fix circular dependency between libzfs and libzfs_core
By bapt.
2015-10-23 08:12:00 +00:00
avg
fbbd0de7f1 MFC r288340: define aok in libnvpair which is linked to all zfs
libraries that need aok
2015-10-23 08:01:46 +00:00
avg
faf581f88b MFC r288337: remove an extra copy of avl.c from illumos contrib code 2015-10-23 07:48:28 +00:00
markj
69ff7e3539 MFC r272455:
Have dtrace(1) handle SIGPIPE, and handle signals when in list mode (-l).
In particular, make sure to detach from child processes before exiting.
2015-10-17 20:38:40 +00:00
mav
3a9f042f34 MFC r287771: 5695 dmu_sync'ed holes do not retain birth time
(userland portion that was not merged in r286677)

Update zdb to also print ltime, type, and level information
for these new style holes. Previously, only the logical birth
time would be printed.
2015-10-03 11:41:27 +00:00
mav
3d7c92eff7 MFV r287703, r287705 (by delphij):
6091 avl_add doesn't assert on non-debug builds

Use assfail() from libuutil instead of ASSERT() in userland
AVL avl_add.

illumos/illumos-gate@faa2b6be2f

Illumos issues:

    6091 avl_add doesn't assert on non-debug builds
    https://www.illumos.org/issues/6091
2015-10-03 11:37:00 +00:00
mav
2ceef49597 MFC r287335 (by allanjude):
Remove duplicate defines introduced in initial ZFS import (r168404)

This change reduces compiler warnings by removing duplicate defines

Line numbers are from r168404 (and r284648)
#define lbolt: lines 384 and 459 (531 and 648) (original was renamed later)
#define lbolt64: lines 385 and 460 (532 and 649) (original was renamed later)
#define gethrestime_sec: lines 390 and 465 (540 and 653)
uint64_t physmem: lines 402 and 463 (561 and 651)
2015-10-03 11:27:23 +00:00
mav
06f0381373 MFC r286708: 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>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@ca0cc3918a

A ZFS feature flags (large blocks) tracks its refcounts as the number of
datasets that have ever used the feature. Several features of this type
are planned to be added (new checksum functions). This code should be made
common infrastructure rather than duplicating the code for each feature.
2015-10-03 08:05:33 +00:00
mav
b50fb3b803 MFC r286705: 5960 zfs recv should prefetch indirect blocks
5925 zfs receive -o origin=

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>

While running 'zfs recv' we noticed that every 128th 8K block required a
read. We were seeing that restore_write() was calling dmu_tx_hold_write()
and the indirect block was not cached. We should prefetch upcoming indirect
blocks to avoid having to go to disk and blocking the restore_write().

Allow an incremental send stream to be received as a clone, even if the
stream does not mark it as a clone.
2015-10-03 08:03:36 +00:00
mav
2c79b8a95c MFC r286683: 5765 add support for estimating send stream size with
lzc_send_space when source is a bookmark

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Albert Lee <trisk@nexenta.com>
Author: Max Grossman <max.grossman@delphix.com>

illumos/illumos-gate@643da460c8
2015-10-03 07:57:32 +00:00
mav
5905fe5beb MFC r286603: 5810 zdb should print details of bpobj
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Will Andrews <will@freebsd.org>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@732885fca0
2015-10-03 07:47:33 +00:00
mav
6fb81cd9a4 MFC r286587: 5746 more checksumming in zfs send
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Albert Lee <trisk@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@98110f08fa
2015-10-03 07:33:27 +00:00
mav
1762d85b03 MFC r286547:
5661 ZFS: "compression = on" should use lz4 if feature is enabled

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Xin LI <delphij@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Justin T. Gibbs <justing@spectralogic.com>

illumos/illumos-gate@db1741f555
2015-10-03 07:23:19 +00:00
delphij
2fecae512b MFC r287770: MFV r277429:
Document -S option when zfs inherit fails on quota and
in manual pages.

Illumos ZFS issues:

    5410 Document -S option to zfs inherit
    https://illumos.org/issues/5410

    5412 Mention -S option when zfs inherit fails on quota
    https://illumos.org/issues/5412

illumos/illumos-gate@5ff8cfa92e
2015-09-28 18:58:27 +00:00
markj
91390cb1b5 MFC r287807:
Remove an unneeded typedef of ip6_t from the DTrace ip provider library.

PR:	203092
2015-09-22 00:45:16 +00:00
markj
16ff73dbec MFC r274569, r276848, r287234:
Only compare visitation counters if they've both been set for the current
type graph walk.
2015-09-11 02:53:22 +00:00
markj
4cb94d4d86 MFC r286169:
Perform bounds checking when constructing a format string.

PR:	201657
2015-08-27 23:46:11 +00:00
delphij
31d28b6b02 MFC r286737:
Plug a memory leak.
2015-08-27 01:02:01 +00:00
gjb
3b38a8c36e MFC r286092:
Fix a rendering issue in the zfs(8) manual.

Sponsored by:	The FreeBSD Foundation
2015-08-03 16:30:03 +00:00
avg
b6a3e408bb MFC r284304: MFV r284030: 5818 zfs {ref}compressratio is incorrect with 4k sector size
Note: no MFC to stable/9 because r268075 (vendor r267565) has not been MFC-ed.
2015-07-01 10:47:13 +00:00
avg
97017b18a6 MFC r284297: several lockstat improvements 2015-07-01 10:15:49 +00:00
avg
91e9d26e11 MFC r284308: MFV r284042: 1778 Assertion failed: rn->rn_nozpool == B_FALSE 2015-06-25 08:11:39 +00:00
avg
77286cbd99 MFC r284309: zfs clone should not mount the clone if canmount == noauto 2015-06-24 14:30:04 +00:00
markj
96bd137d40 MFC r282739:
ctf_add_type(): when looking up an integer or floating point type in the
list of pending dynamic type definitions, a match on the type name is not
sufficient - we need to compare the type encodings as well. For example,
bitfields have their own distinct type definitions which share the name of
the underlying integer type, and these types aren't generally
interchangeable.

This bug was causing the following libdtrace error when attempting to trace
the th_flags member of a struct tcphdr:
  cg: bad field: off 104 type <32877> bits 539620016
2015-06-07 19:48:21 +00:00
markj
f524c33842 MFC r283025:
As dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler may
return an error if one of the depends_on directives in a library is not
satisfied. In this case, libdtrace is supposed to ignore the library and
carry on. However, the remainder of the library may still be buffered by
the lexer, causing libdtrace to erroneously continue processing it on the
next call to yyparse(). Fix this by explicitly flushing the input buffer
each time the compiler state is reset.
2015-06-07 19:46:12 +00:00
ngie
c6889f35c8 MFC r283147:
Build cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are
freestanding (they require libraries build via make libraries in buildworld)

Sponsored by: EMC / Isilon Storage Division
2015-05-31 23:00:35 +00:00
avg
9807f933b7 MFC r282121: dump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAY 2015-05-11 08:30:57 +00:00
gnn
f5cf32d13f MFC: 273293
Update the TCP structure used by DTrace to show the smoothed RTT.
This will allow similar functionality to SIFTR to be built with DTrace.

Submitted by:	Grenville Armitage
2015-05-09 22:59:11 +00:00
markj
a0a30f026e MFC r279862:
Fix a possible infinite loop in ctf_discard().

MFC r279864:
Use CTF_TYPE_TO_INDEX when comparing type indices to the dynamic type
threshold.

MFC r279869:
If the destination container contains only a forward declaration for the
input type in ctf_add_type(), search its dynamic type list before adding
a new type.
2015-04-12 21:45:34 +00:00
markj
d81fd232dc MFC r280882:
Fix a misparenthesization that could cause a crash if TERM is not set.
2015-04-12 21:38:18 +00:00
markj
6a076d8809 MFC r278114:
libdtrace: Let the standard deviation of the empty set be 0.

PR:	197260
2015-04-12 21:35:13 +00:00
markj
9e983ced1b MFC r280125:
Add a missing format string argument.

PR:		197391
2015-03-18 02:29:51 +00:00