summaryrefslogtreecommitdiffstats
path: root/cddl/contrib
Commit message (Collapse)AuthorAgeFilesLines
* MFC r280125:markj2015-03-181-1/+1
| | | | | | Add a missing format string argument. PR: 197391
* MFC r279366:delphij2015-03-131-0/+2
| | | | Set altroot if the user have specified it via -o altroot.
* MFC r277433: MFV r277432:delphij2015-02-042-33/+47
| | | | | | | Plug various memory leaks in libzfs import implementation. Illumos issue: 5518 Memory leaks in libzfs import implementation
* MFC r277239:smh2015-01-301-0/+6
| | | | | | Eliminate illumos whole disk special case when searching for a ZFS vdev Sponsored by: Multiplay
* MFC r276446:smh2015-01-301-1/+2
| | | | | | Use the correct state name for unavailable pools in zpool list Sponsored by: Multiplay
* MFC r276226:smh2015-01-261-21/+72
| | | | | | Enhancements to zpool upgrade processing Sponsored by: Multiplay
* MFC r276194:smh2015-01-241-0/+15
| | | | | | Prevent zpool upgrade failing due to unavailable pools Sponsored by: Multiplay
* MFC r275552: MFV r260710 + 275532:delphij2015-01-232-0/+405
| | | | Add a new method, nvlist_print_json to allow libnvpair to emit JSON.
* MFC r275812: MFV r275784:delphij2015-01-231-4/+1
| | | | | | | | | 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
* MFC r275811: MFV r275783:delphij2015-01-231-1/+1
| | | | | | | | | | | | | 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
* MFC r275782: MFV r275551:delphij2015-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC r275739: MFV r275547:delphij2015-01-231-32/+23
| | | | | | | | 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
* MFC r274418 (gjb):delphij2015-01-231-2/+3
| | | | | | | | | | | 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
* MFC r275579: MFV r275537:delphij2015-01-232-19/+48
| | | | | | | | Illumos issue: 5316 allow smbadm join to use RPC (Due to our lack of smbsrv this is mostly no-op on FreeBSD)
* MFC r275563: MFV r275536:delphij2015-01-231-4/+4
| | | | | Illumos issue: 3363 Mark non-returning functions in ctftools
* MFC r276250:markj2015-01-061-1/+4
| | | | | | | DOF tables are aligned according to the DOF section's alignment constraint, so take this into account when iterating over DOF tables. PR: 195555
* MFC r272671:markj2014-12-261-0/+23
| | | | | | | | 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
* MFC r275011:markj2014-12-261-3/+3
| | | | | | | | 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.
* MFC r274337,r274673,274681,r275515:delphij2014-12-2211-39/+180
| | | | | | | | | | | | | | | | | | | | | 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
* MFC r271695:markj2014-12-052-3/+3
| | | | Fix some incorrect endianness checks.
* MFC r274276: MFV r274271:delphij2014-12-041-2/+25
| | | | | | | | | | | | 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
* MFC r274303:delphij2014-12-041-0/+2
| | | | | | | | | | | | 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.
* MFC r264852smh2014-11-131-0/+1
| | | | | | Silence compiler warning Sponsored by: Multiplay
* MFC r258902:markj2014-10-241-8/+0
| | | | | The uaddr, ufunc, umod and usym functions all seem to work as expected on FreeBSD, so stop hiding them behind a "#if defined(sun)".
* MFC r272806: MFV r272802:delphij2014-10-231-4/+22
| | | | | | | | | | | | | | - 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
* MFC r272599: MFV r272588:delphij2014-10-201-0/+5
| | | | | | | Handle old format deadlist. Illumos issue: 5178 zdb -vvvvv on old-format pool fails in dump_deadlist()
* MFC r272598: MFV r272585:delphij2014-10-201-4/+6
| | | | | | | | Split the godfather zio into CPU number's to reduce lock contention. Illumos issue: 5176 lock contention on godfather zio
* MFC r272502: MFV r272493:delphij2014-10-132-37/+62
| | | | | | | Show individual disk capacity when doing zpool list -v. Illumos issue: 5147 zpool list -v should show individual disk capacity
* MFC r261893: zfs.8: fix garbled options in a sample zfs send -R command lineavg2014-10-071-1/+1
|
* MFC r261892: zpool.8: fix typo in option description of labelclear commandavg2014-10-071-1/+1
|
* MFC r271527: MFV r271511:delphij2014-10-021-12/+6
| | | | | | | | | Use fnvlist_* to make code more readable. Illumos issue: 5135 zpool_find_import_cached() can use fnvlist_* Approved by: re (gjb)
* MFC r271227: MFV r271225:delphij2014-09-251-17/+18
| | | | | | | | | | | | 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)
* MFC r271934:smh2014-09-241-3/+8
| | | | | | | | Output boot code warning when zpool upgrade -a is used to add features. PR: 188328 Approved by: re (marius) Sponsored by: Multiplay
* MFC r271222:delphij2014-09-101-1/+1
| | | | | | | Fix typo. Submitted by: Dmitry Morozovsky <marck rinet ru> Approved by: re (gjb)
* MFC r269524:markj2014-08-203-11/+14
| | | | | | Preserve the errno value of an ioctl before calling free(3). Previously, errno was very occasionally being clobbered, resulting in a bogus error from dt_consume() and thus an error from dtrace(1).
* MFC r269430: MFV r269426:delphij2014-08-181-1/+1
| | | | | | | | Double test device size for ztest(1). Illumos issue: 5039 ztest should default to larger device sizes Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r267875:pfg2014-08-161-2/+7
| | | | | | | | | | | | 4251 libdtrace leaks open file handles Illumos commit: 93ed8d0d4b068b95d0bb50d57bb854df462a8485 (partial) Reference: https://www.illumos.org/issues/4251 Discussed with: Robert Mustacchi Obtained from: Illumos
* MFC r257877:markj2014-08-141-3/+1
| | | | | | | | | | | | | Don't try to use the 32-bit drti.o unless the data model is explicitly set to ILP32. Otherwise dtrace -G will attempt to use it on amd64 if it can't determine which data model to use, which happens when -64 is omitted and no object files are provided, e.g. with # dtrace -G -n BEGIN This would result in a linker error, but now works properly. Also remove an unnecessary #ifdef.
* MFC r269776rpaulo2014-08-131-52/+0
| | | | Remove the BROKEN_LIBELF section.
* MFC r269229,269404,269466: MFV r269223:delphij2014-08-121-5/+34
| | | | | | | Change dn->dn_dbufs from linked list to AVL tree. Illumos issues: 4873 zvol unmap calls can take a very long time for larger datasets
* MFC r269118: MFV r269010:delphij2014-08-105-41/+144
| | | | | | | | | | | | | Import Illumos changes to address the following Illumos issues: 4976 zfs should only avoid writing to a failing non-redundant top-level vdev 4978 ztest fails in get_metaslab_refcount() 4979 extend free space histogram to device and pool 4980 metaslabs should have a fragmentation metric 4981 remove fragmented ops vector from block allocator 4982 space_map object should proactively upgrade when feature is enabled 4984 device selection should use fragmentation metric
* MFC r269100:delphij2014-08-082-7/+16
| | | | Diff reduction against Illumos.
* MFC r268621 (smh) + r268625:delphij2014-08-082-2/+4
| | | | | | | | | | | | | Don't report non-native block-size pools under zpool status -x zpool status -x is used to identify pools that are exhibiting errors or are otherwise unavailable, therefore non-native block-size pools shouldn't be reported. Also update man page to clarify other additional conditions which won't cause a pool to be displayed under zpool status -x. Sponsored by: Multiplay
* MFC the cddl/contrib/opensolaris/cmd/zpool portion of r267803 (joel):delphij2014-08-081-1/+0
| | | | mdoc: remove superfluous paragraph macros.
* MFC r265631:markj2014-08-081-1/+1
| | | | | | | | | | Re-apply r248644. This fixes an annoying problem which caused dtrace -c to fail to attach to stripped binaries. With the _r_debug_postinit symbol, dtrace(1) can now set a breakpoint in the victim process after it has registered its DOF table(s) with the kernel. r_debug_state cannot be used for this purpose since it is called before DOF is made available, in which case dtrace(1) cannot create USDT probes before the program begins execution.
* MFC r256571:markj2014-08-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Add a function, memstr, which can be used to convert a buffer of null-separated strings to a single string. This can be used to print the full arguments of a process using execsnoop (from the DTrace toolkit) or with the following one-liner: dtrace -n 'syscall::execve:return {trace(curpsinfo->pr_psargs);}' Note that this relies on the process arguments being cached via the struct proc, which means that it will not work for argvs longer than kern.ps_arg_cache_limit. However, the following rather non-portable script can be used to extract any argv at exec time: fbt::kern_execve:entry { printf("%s", memstr(args[1]->begin_argv, ' ', args[1]->begin_envv - args[1]->begin_argv)); } The debug.dtrace.memstr_max sysctl limits the maximum argument size to memstr().
* MFC r268855: MFV r268848:delphij2014-08-021-6/+37
| | | | | | | | | | | | | | | | | | Instead of asserting all zio's be properly aligned, only assert on the logical ones. Cap uberblocks at 8k, otherwise with ashift=17, there would be only one uberblock. This fixes a problem that zdb would trip assert on pools with ashift >= 0xe (8k). While there, also change the code so it only attempt to condense space map unless the uncondensed size consumes greater than zfs_metaslab_condense_block_threshold blocks. Illumos issue: 4958 zdb trips assert on pools with ashift >= 0xe
* MFC r264486:markj2014-07-291-0/+5
| | | | | Use the correct format specifiers for wide characters and strings of wide characters.
* MFC r262669:markj2014-07-291-30/+58
| | | | | | | | | | When our linker merges .SUNW_dof sections from multiple files, it simply concatenates the DOF tables into one section. Previously, the USDT init code in drti.o would only look at the first table in the DOF section; with this change, it iterates over all the tables, passing each DOF table to the kernel. PR: 186821
* MFC r268720: MFV r268714:delphij2014-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve extreme rewind import. When doing an "extreme rewind" import ("zpool import -XF"), we attempt to verify all data in the pool, essentially scrubbing the entire pool. The problem is that spa_load_verify_cb() issues an unbounded number of concurrent scrub i/os. This can lead to all of memory being used for these zio's, wedging the system. Like normal scrub, we need to put a cap on the number of outstanding i/os, and have the traverse thread block when we reach this cap. For this purpose the cap can be very large (10,000) to optimize the elevator algorithm. Three kernel tunables have been added: vfs.zfs.spa_load_verify_maxinflight vfs.zfs.spa_load_verify_metadata vfs.zfs.spa_load_verify_data The latter two tunables controls whether metadata and/or user data when doing extreme rewind. Make 'zpool import -T' imply scrub. Make zpool import -T <txg> accept hexadecimal values for the txg when prefixed with 0x. Skip txg's for which there is no uberblock when doing extreme rewind. Skip reading all user data twice by skipping prefetches when doing extreme rewinds as we do not access via the ARC. Illumos issues: 4970 need controls on i/o issued by zpool import -XF 4971 zpool import -T should accept hex values 4972 zpool import -T implies extreme rewind, and thus a scrub 4973 spa_load_retry retries the same txg 4974 spa_load_verify() reads all data twice
OpenPOWER on IntegriCloud