563 Commits

Author SHA1 Message Date
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
delphij
7c0c64012e MFC r279366:
Set altroot if the user have specified it via -o altroot.
2015-03-13 01:18:46 +00:00
delphij
c2a80f71df MFC r277433: MFV r277432:
Plug various memory leaks in libzfs import implementation.

Illumos issue:
    5518 Memory leaks in libzfs import implementation
2015-02-04 00:51:50 +00:00
smh
e788b18c4e MFC r277239:
Eliminate illumos whole disk special case when searching for a ZFS vdev

Sponsored by:	Multiplay
2015-01-30 01:05:50 +00:00
smh
d9e79da5d7 MFC r276446:
Use the correct state name for unavailable pools in zpool list

Sponsored by:	Multiplay
2015-01-30 01:04:17 +00:00
smh
c46b18f753 MFC r276226:
Enhancements to zpool upgrade processing

Sponsored by:	Multiplay
2015-01-26 13:59:39 +00:00
smh
e2d4209626 MFC r276194:
Prevent zpool upgrade failing due to unavailable pools

Sponsored by:	Multiplay
2015-01-24 00:40:42 +00:00
delphij
6cd815aece MFC r275552: MFV r260710 + 275532:
Add a new method, nvlist_print_json to allow libnvpair to emit JSON.
2015-01-23 18:40:47 +00:00
delphij
429a0a7af7 MFC r275812: MFV r275784:
Plug a memory leak in libzfs.  In zfs_iter_bookmarks, an nvlist is allocated
before calling lzc_get_bookmarks, which allocates the nvlist again (and
overwrites the pointer to previously allocated list).

Illumos issue:
    5427 memory leak in libzfs when doing rollback
2015-01-23 18:36:21 +00:00
delphij
b84208b123 MFC r275811: MFV r275783:
Convert ARC flags to use enum.  Previously, public flags are defined in
arc.h and private flags are defined in arc.c which can lead to confusion
and programming errors.

Consistently use 'hdr' (when referencing arc_buf_hdr_t) instead of 'buf'
or 'ab' because arc_buf_t are often named 'buf' as well.

Illumos issue:
    5369 arc flags should be an enum
    5370 consistent arc_buf_hdr_t naming scheme
2015-01-23 18:33:50 +00:00
delphij
9ef0e2ecd5 MFC r275782: MFV r275551:
Remove "dbuf phys" db->db_data pointer aliases.

Use function accessors that cast db->db_data to the appropriate
"phys" type, removing the need for clients of the dmu buf user
API to keep properly typed pointer aliases to db->db_data in order
to conveniently access their data.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c:
        In zap_leaf() and zap_leaf_byteswap, now that the pointer alias
        field l_phys has been removed, use the db_data field in an on
        stack dmu_buf_t to point to the leaf's phys data.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c:
        Remove the db_user_data_ptr_ptr field from dbuf and all logic
        to maintain it.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c:
        Modify the DMU buf user API to remove the ability to specify
        a db_data aliasing pointer (db_user_data_ptr_ptr).

cddl/contrib/opensolaris/cmd/zdb/zdb.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_leaf.h:
        Create and use the new "phys data" accessor functions
        dsl_dir_phys(), dsl_dataset_phys(), zap_m_phys(),
        zap_f_phys(), and zap_leaf_phys().

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h:
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_leaf.h:
        Remove now unused "phys pointer" aliases to db->db_data
        from clients of the DMU buf user API.

Illumos issue:
    5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS
2015-01-23 18:30:32 +00:00
delphij
049d5b632d MFC r275739: MFV r275547:
Port Illumos 'zfs allow' examples update.  While I'm there also fix
a typo.

Illumos issue:
    4181 zfs(1m): 'zfs allow' examples in the man page are outdated
2015-01-23 18:14:29 +00:00
delphij
a249d7c4fb MFC r274418 (gjb):
Fix an mdoc(7) macro that is not an option in the provided
description.

Bump Dd.

As CDDL License dictates, update the Copyright accordingly.

Sponsored by:	The FreeBSD Foundation
2015-01-23 18:11:48 +00:00
delphij
fb31f7e88b MFC r275595:
Use calloc() instead of malloc() + bzero().  This also gets rid of a warning
because bzero is defined by strings.h which is not included in thread_pool.c.
2015-01-23 00:54:56 +00:00
delphij
9eb8a0d403 MFC r275579: MFV r275537:
Illumos issue:
   5316 allow smbadm join to use RPC

(Due to our lack of smbsrv this is mostly no-op on
FreeBSD)
2015-01-23 00:40:43 +00:00
delphij
cbce4fcc9a MFC r275563: MFV r275536:
Illumos issue:
    3363 Mark non-returning functions in ctftools
2015-01-23 00:36:17 +00:00
markj
6a7ad12086 MFC r276250:
DOF tables are aligned according to the DOF section's alignment constraint,
so take this into account when iterating over DOF tables.

PR:	195555
2015-01-06 02:13:49 +00:00
ngie
d4c625976a MFC r264400,r265836:
r264400:

  NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
  and finish the job. ncurses is now the only Makefile in the tree that
  uses it since it wasn't a simple mechanical change, and will be
  addressed in a future commit.

r265836:

  Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
  what is needed.
2014-12-31 23:25:37 +00:00
markj
f296437898 MFC r272671:
Treat D keywords as identifiers in certain postfix expressions. This allows
one to, for example, access the "provider" field of a struct g_consumer,
even though "provider" is a D keyword.

PR:	169657
2014-12-26 22:52:44 +00:00
markj
73aece4781 MFC r275011:
The module load address always needs to be included when setting the dm_*_va
fields of dt_module_t. Previously, this was only done on architectures where
kernel modules have type ET_REL; this change fixes that. As a result, symbol
name resolution in the stack() action now works properly for kernel modules
on i386.
2014-12-26 22:50:34 +00:00
delphij
1ad38ed4f0 MFC r274337,r274673,274681,r275515:
ZFS large block support.  The default recordsize remains at 128KB.

A new tunable/sysctl variable, vfs.zfs.max_recordsize is added to
allow adjusting the permitted maximum record size, or
zfs_max_recordsize, with a default of 1MB.  ZFS will not allow
setting recordsize greater than zfs_max_recordsize as a safety
belt, because larger recordsize means greater read and write
latency and more memory usage.

Please note that booting from datasets that have recordsize greater
than 128KB is not supported (but it's Okay to enable the feature on
the pool).

Limited safety belt is provided for mounted root filesystem but use
caution when using a larger value.

Illumos issue:
    5027 zfs large block support
2014-12-22 20:58:51 +00:00
markj
dd6a87838b MFC r271695:
Fix some incorrect endianness checks.
2014-12-05 18:55:31 +00:00
delphij
a26baf65aa MFC r274276: MFV r274271:
Improve zdb -b performance:

 - Reduce gethrtime() call to 1/100th of blkptr's;
 - Skip manipulating the size-ordered tree;
 - Issue more (10, previously 3) async reads;
 - Use lighter weight testing in traverse_visitbp();

Illumos issue:
    5243 zdb -b could be much faster
2014-12-04 23:20:44 +00:00
delphij
0c96bfd67d MFC r274303:
Apply upstream 13597:3eac1e8e0f4c (git: illumos-gate@aa846ad9):

Initialize tqent_flags in the userland taskq implementation.  Without
this the assertion of tq->tq_freelist != NULL may fail in taskq_destroy.

The problem is that tqent_flags is never initialized in the userland
implementation while the kernel one does initialize it.  Without proper
initialization, the flag may have its lowest bit set, making it treated
as TQENT_FLAG_PREALLOC and never removing taskq_ent_t from tq_freelist.
2014-12-04 23:17:35 +00:00
rodrigc
0475e04762 MFC r272484:
Add dependencies to various libraries to libzfs and libzpool.

Submitted by:	sef
2014-11-29 08:33:54 +00:00
smh
009b631caf MFC r264852
Silence compiler warning

Sponsored by:	Multiplay
2014-11-13 16:45:25 +00:00
markj
1c649cc8f3 MFC r273370:
Correct the calculation of tcps_rto in the struct tcpcb -> tcpsinfo_t
translator.
2014-10-28 06:17:25 +00:00
markj
372e35ccad MFC r258902:
The uaddr, ufunc, umod and usym functions all seem to work as expected on
FreeBSD, so stop hiding them behind a "#if defined(sun)".
2014-10-24 17:24:29 +00:00
delphij
5295b89f11 MFC r272806: MFV r272802:
- Limit ARC for zdb at 256MB.  zdb do not typically revisit data
   in the ARC.
 - Increase default max_inflight from 200 to 1000 (can be overriden
   by -I) so we can queue more I/Os when doing scrubbing.
 - Print status while loading meataslabs for leak detection.

Illumos issues:

    5169 zdb should limit its ARC size
    5170 zdb -c should create more scrub i/os by default
    5171 zdb should print status while loading metaslabs for leak detection
2014-10-23 01:36:43 +00:00
delphij
2f84271419 MFC r272599: MFV r272588:
Handle old format deadlist.

Illumos issue:
    5178 zdb -vvvvv on old-format pool fails in dump_deadlist()
2014-10-20 22:18:21 +00:00
delphij
e02ec23db8 MFC r272598: MFV r272585:
Split the godfather zio into CPU number's to reduce lock
contention.

Illumos issue:
    5176 lock contention on godfather zio
2014-10-20 22:13:50 +00:00
delphij
56f7d0497e MFC r272502: MFV r272493:
Show individual disk capacity when doing zpool list -v.

Illumos issue:
    5147 zpool list -v should show individual disk capacity
2014-10-13 18:53:56 +00:00
avg
e7a471ff5e MFC r261893: zfs.8: fix garbled options in a sample zfs send -R command line 2014-10-07 13:23:52 +00:00
avg
7d7d42cd16 MFC r261892: zpool.8: fix typo in option description of labelclear command 2014-10-07 13:20:04 +00:00
delphij
81242229b8 MFC r271527: MFV r271511:
Use fnvlist_* to make code more readable.

Illumos issue:
    5135 zpool_find_import_cached() can use fnvlist_*

Approved by:	re (gjb)
2014-10-02 22:16:00 +00:00
delphij
fae0398507 MFC r271227: MFV r271225:
Iterate through all the children instead of returning error when we hit
the first error.  This makes the error message give more information
rather than just the first device that causes problem.

Illumos issue:
    5118 When verifying or creating a storage pool, error messages only
       show one device

Approved by:	re (gjb)
2014-09-25 21:45:07 +00:00
smh
971865d1c7 MFC r271934:
Output boot code warning when zpool upgrade -a is used to add features.

PR:		188328
Approved by:	re (marius)
Sponsored by:	Multiplay
2014-09-24 09:59:48 +00:00
delphij
81bb44f925 MFC r271222:
Fix typo.

Submitted by:	Dmitry Morozovsky <marck rinet ru>
Approved by:	re (gjb)
2014-09-10 13:13:30 +00:00