summaryrefslogtreecommitdiffstats
path: root/cddl
Commit message (Collapse)AuthorAgeFilesLines
* Work around the implementation of LIBRARIES_ONLY. It causes drti.o tobrooks2013-05-071-0/+8
| | | | | | | | | | not be installed in /usr/lib32 on systems with compat-32 support. This fix has two parts. First, the build is forced by linking drti.o into a dummy internal library. Second, the object file is installed manually in the LIBRARIES_ONLY case. MFC after: 3 days
* revert r248644 because of the regression for usdt probesavg2013-04-251-1/+1
| | | | | | | | | | | | | | | USDT probes are advertised to kernel by initialization code with atrribute((constructor))). It seems that on Solaris the .init-ish code of the main object is executed before RD_PREINIT point is hit. On FreeBSD that is not the case. And because on FreeBSD there is no other well-defined point between RD_PREINIT and main() we have to parse a DTrace script when main is hit, for time being. A footnote: currently we actually post RD_POSTINIT event, but that's a bug because the event is triggered by hitting r_debug_state which happens before any init code is executed. Reported by: markj
* Respect the enoent_ok flag if reporting error for holding an non-existingmm2013-04-251-4/+7
| | | | | | | | | | snapshot. Related illumos ZFS issue: 3699 zfs hold or release of a non-existent snapshot does not output error Reported by: Steven Hartland <smh@FreeBSD.org> MFC after: 3 days
* Fix -Wmissing-variable-declarations compiler warnings.ed2013-04-194-8/+8
| | | | | References: https://www.illumos.org/issues/3700
* DTrace: NFS translators should be split into client/server piecespfg2013-04-182-31/+59
| | | | | | | | | | Belatedly update the provider with changes from OpenSolaris: PSARC 2008/050 DTrace NFS v3 Provider 6696397 NFS v3 provider reports all UDP clients as 0.0.0.0 6711844 assert: vp->v_shrlocks Obtained from: Illumos
* DTrace: Revert r249426pfg2013-04-1717-160/+23
| | | | | | This change actually depends on r249367 which had to be reverted Pointy Hat: pfg
* DTrace: Revert r249367pfg2013-04-1759-2096/+770
| | | | | | | | | | | | | | | | | | | | | | The following change from illumos brought caused DTrace to pause in an interactive environment: 3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider This was not detected during testing because it doesn't affect scripts. We shouldn't be changing the environment, especially since the LD_NOLAZYLOAD option doesn't apply to our (GNU) ld. Unfortunately the change from upstream was made in such a way that it is very difficult to separate this change from the others so, at least for now, it's better to just revert everything. Reference: https://www.illumos.org/issues/3026 Reported by: Navdeep Parhar and Mark Johnston
* DTrace: print() should try to resolve function pointerspfg2013-04-163-4/+84
| | | | | | | | | | | | | | | | Merge changes from illumos: 3675 DTrace print() should try to resolve function pointers 3676 dt_print_enum hardcodes a value of zero Illumos Revision: b1fa6326238973aeaf12c34fcda75985b6c06be1 Reference: https://www.illumos.org/issues/3675 https://www.illumos.org/issues/3676 Obtained from: Illumos MFC after: 1 month
* Correct error message.pjd2013-04-161-1/+1
| | | | Reported by: Dirk Engling <erdgeist@erdgeist.org>
* DTrace: NFS translators should be split into client/server piecespfg2013-04-152-19/+55
| | | | | | | | | | | | | | | | Merge change from illumos: 1731 DTrace NFS translators should be split into client/server pieces Illumos Revision: 13523:6763769941d2 This code seems to be currently unused on FreeBSD. Reference: https://www.illumos.org/issues/1731 Obtained from: Illumos MFC after: 1 week
* Dtrace: resolve const types from fbt and other fixes.pfg2013-04-1217-23/+160
| | | | | | | | | | | | | | | | | | | | Merge change from illumos: 3519 DTrace fails to resolve const types from fbt 3520 dtrace internal error -- token type 316 is not a valid D compilation token 3521 clean up dtrace unit tests Illumos Revision: e98f46c Reference: https://www.illumos.org/issues/3519 https://www.illumos.org/issues/3520 https://www.illumos.org/issues/3521 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 month
* DTrace: option for time-ordered outputpfg2013-04-1159-770/+2096
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge changes from illumos: 3021 option for time-ordered output from dtrace(1M) 3022 DTrace: keys should not affect the sort order when sorting by value 3023 it should be possible to dereference dynamic variables 3024 D integer narrowing needs some work 3025 register leak in D code generation 3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider This brings yet another feature implemented in upstream DTrace. A complete description is available here: http://dtrace.org/blogs/ahl/2012/07/28/my-new-dtrace-favorite/ This change bumps the DT_VERS_* number to 1.9.1 in accordance to what is done in illumos. This change was somewhat complicated because upstream is mixed many changes in an individual commit and some of the tests don't really apply to us. There are also appear to be differences in timestamping with Solaris so we had to workaround some assertions making sure no regression happened. Special thanks to Fabian Keil for changes and testing. Illumos Revisions: 13758:23432da34147 Reference: https://www.illumos.org/issues/3021 https://www.illumos.org/issues/3022 https://www.illumos.org/issues/3023 https://www.illumos.org/issues/3024 https://www.illumos.org/issues/3025 https://www.illumos.org/issues/1694 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 months
* Fix libzfs to report error instead of returning zero if trying to hold ormm2013-04-111-4/+24
| | | | | | | | | | release a non-existing snapshot of a existing dataset. In recursive case error is reported if no snapshots with the requested name have been found. Problem and proposed solution reported to illumos: 3699 zfs hold or release of a non-existent snapshot does not output error MFC after: 8 days
* ZFS expects a copyout of zfs_cmd_t on an ioctl error. Our sys_ioctl()mm2013-04-091-1/+3
| | | | | | | | | | | | | | | doesn't copyout in this case. To solve this issue a new struct zfs_iocparm_t is introduced consisting of: - zfs_ioctl_version (future backwards compatibility purposes) - user space pointer to zfs_cmd_t (copyin and copyout) - size of zfs_cmd_t (verification purposes) The copyin and copyout of zfs_cmd_t is now done the illumos (vendor) way what makes porting of new changes easier and ensures correct behavior if returning an error. MFC after: 10 days
* MFV r249185:mm2013-04-061-24/+65
| | | | | | | | | Allow zdb to output a histogram of compressed block sizes. Illumos ZFS issues: 3641 want a histogram of compressed block sizes MFC after: 3 weeks
* MFV r248217:mm2013-04-062-5/+81
| | | | | | | | | | Merge change from vendor to reduce diff only. ZFS dtrace probes are not supported on FreeBSD yet. Illumos ZFS issues: 3598 want to dtrace when errors are generated in zfs MFC after: 3 weeks
* Follow up to r247960 and rr247960 by also amending ctfmerge. For thedim2013-04-011-2/+5
| | | | | | | | | | only other case where STT_FILE symbols are used, in symit_next() in cddl/contrib/opensolaris/tools/ctf/cvt/input.c, save the basename of the symbol, instead of the full pathname. Reported by: avg Tested by: avg, jimharris MFC after: 1 week
* Dtrace: enablings on defunct providers prevent providers from unregisteringpfg2013-04-014-2/+371
| | | | | | | | | | | | | | | | | | | | | | Merge change from illumos: 1368 enablings on defunct providers prevent providers from unregistering We try to address some underlying differences between the Solaris and FreeBSD implementations: dtrace_attach() / dtrace_detach() are currently unimplemented in FreeBSD but the new code from illumos makes use of taskq so some adaptations were made to dtrace_open() and dtrace_close() to handle them appropriately. Illumos Revision: r13430:8e6add739e38 Reference: https://www.illumos.org/issues/1368 Reviewed by: gnn Tested by: Fabian Keil Obtained from: Illumos MFC after: 3 weeks
* Commit a patch that fixes a problem in the #pragma statement when searchinggnn2013-03-281-3/+27
| | | | | | | | | for and loading dependent modules. This addresses a bug seen with io.d where it was being doubly included. PR: 171678 Submitted by: Mark Johnston MFC after: 2 weeks
* Revert previous change in favor of a fix to the actual dtracegnn2013-03-281-0/+2
| | | | libraries that addresses a #pragma issue.
* Remove dependency code that caused a double inclusion.gnn2013-03-281-2/+0
| | | | Pointed out by: rpaulo and others
* Dtrace: dtrace.c erroneously checks for memory alignment on amd64.pfg2013-03-261-20/+29
| | | | | | | | | | | | | | Merge change from illumos: 3511 dtrace.c erroneously checks for memory alignment on amd64 Illumos Revision: c93cc65 Reference: https://www.illumos.org/issues/3511 Obtained from: Illumos MFC after: 3 weeks
* Dtrace: Add SUN MDB-like type-aware print() action.pfg2013-03-2522-70/+1244
| | | | | | | | | | | | | | | | | | | | | | | | | | | Merge change from illumos: 1694 Add type-aware print() action This is a very nice feature implemented in upstream Dtrace. A complete description is available here: http://dtrace.org/blogs/eschrock/2011/10/26/your-mdb-fell-into-my-dtrace/ This change bumps the DT_VERS_* number to 1.9.0 in accordance to what is done in illumos. While here also include some minor cleanups to ease further merging and appease clang with a fix by Fabian Keil. Illumos Revisions: 13501:c3a7090dbc16 13483:f413e6c5d297 Reference: https://www.illumos.org/issues/1560 https://www.illumos.org/issues/1694 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 month
* Dtrace: add toupper()/tolower() and enhancements to lltostr().pfg2013-03-2511-3/+705
| | | | | | | | | | | | | | | | | | | | | | | | | Merge changes from illumos: 1451 DTrace needs toupper()/tolower() subroutines 1457 lltostr() D subroutine should take an optional base This change bumps the DT_VERS_* number to 1.8.1 in accordance to what is done in illumos. The test suite we currently include is outdated and doesnt support some updates in tst.subr.d which had to be left out for now. Illumos Revisions: r13458 5e394d8db762 r13459 c3454574dd1a Reference: https://www.illumos.org/issues/1451 https://www.illumos.org/issues/1457 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 month
* Dtrace: add optional size argument to tracemem().pfg2013-03-248-21/+1451
| | | | | | | | | | | | | | | | | | | | | | | | | Merge change from illumos: 1455 DTrace tracemem() should take an optional size argument Our local enhancements to dt_print_bytes were equivalent to those in illumos but we made it match the illumos version to ease further code merges. For now leave out tst.smallsize.d and tst.smallsize.d.out since those don't seem to work cleanly on FreeBSD. This change bumps the DT_VERS_* number to 1.7.1 in accordance to what is done in illumos. Illumos Revision: 13457:571b0355c2e3 Reference: https://www.illumos.org/issues/1455 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 month
* dtrace: ensure that we can always catch a process (e.g. when -c is used)avg2013-03-231-1/+1
| | | | | | | | | It is not guaranteed that a program has a symbol table entry for main and thus that it would be possible to set a breakpoint on it. Reviewed by: rpaulo Discussed with: rpaulo MFC after: 13 days
* Merge libzfs_core branch:mm2013-03-2130-647/+1984
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | includes MFV 238590, 238592, 247580 MFV 238590, 238592: In the first zfs ioctl restructuring phase, the libzfs_core library was introduced. It is a new thin library that wraps around kernel ioctl's. The idea is to provide a forward-compatible way of dealing with new features. Arguments are passed in nvlists and not random zfs_cmd fields, new-style ioctls are logged to pool history using a new method of history logging. http://blog.delphix.com/matt/2012/01/17/the-future-of-libzfs/ MFV 247580 [1]: To address issues of several deadlocks and race conditions the locking code around dsl_dataset was rewritten and the interface to synctasks was changed. User-Visible Changes: "zfs snapshot" can create more arbitrary snapshots at once (atomically) "zfs destroy" destroys multiple snapshots at once "zfs recv" has improved performance Backward Compatibility: I have extended the compatibility layer to support full backward compatibility by remapping or rewriting the responsible ioctl arguments. Old utilities are fully supported by the new kernel module. Forward Compatibility: New utilities work with old kernels with the following restrictions: - creating, destroying, holding and releasing of multiple snapshots at once is not supported, this includes recursive (-r) commands Illumos ZFS issues: 2882 implement libzfs_core 2900 "zfs snapshot" should be able to create multiple, arbitrary snapshots at once 3464 zfs synctask code needs restructuring References: https://www.illumos.org/issues/2882 https://www.illumos.org/issues/2900 https://www.illumos.org/issues/3464 [1] MFC after: 1 month Sponsored by: Hybrid Logic Inc. [1]
| * MFV r247580:mm2013-03-1913-290/+589
| | | | | | | | | | | | | | | | | | | | | | Merge synctask code restructuring from vendor. Modify forward and backward compatibility to support new change. Illumos ZFS issues: 3464 zfs synctask code needs restructuring Sponsored by: Hybrid Logic Ltd.
| * MFC @248461mm2013-03-184-5/+10
| |\ | |/ |/|
| * Move common zfs ioctl compatibility functions (userland) into libzfs_compat.cmm2013-03-186-76/+122
| | | | | | | | Introduce additional constants for zfs ioctl versions
| * Fix working with zfs_ioctl_version in libzfs_compat.h and include mirrormm2013-03-174-21/+36
| | | | | | | | lzc_ioctl_version in libzfs_core
| * Add forwards compatibility for libzfs_coremm2013-03-175-2/+217
| | | | | | | | Unsupported: creation of multiple snapshots including "zfs snapshot -r"
| * libzfs_core:mm2013-03-171-5/+5
| | | | | | | | | | | | - provide complete backwards compatibility (old utility, new kernel) - add zfs_cmd_t compatibility mapping in both directions - determine ioctl address in zfs_ioctl_compat.c
| * MFC @248093mm2013-03-092-18/+56
| |\
| * | Move libzfs compat functions to libzfs_compat.hmm2013-03-064-60/+97
| | | | | | | | | | | | This header is used by both libzfs_core and libzfs libraries
| * | WiP merge of libzfs_core (MFV r238590, r238592)mm2013-03-0525-333/+1058
| | | | | | | | | | | | not yet working, ioctl handling needs to be changed
* | | MFV r248266:mm2013-03-143-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import minor ZFS changes from vendor Illumos ZFS issues: 3604 zdb should print bpobjs more verbosely (fix zdb hang) 3606 zpool status -x shouldn't warn about old on-disk format MFC after: 3 days
* | | Update zfs.8 manpage date (missing in r247585)mm2013-03-141-1/+1
| |/ |/| | | | | MFC: together with r247585
* | Fix error in r247960: actually assign the basename to match.iim_file.dim2013-03-071-2/+1
| | | | | | | | | | | | | | Pointed out by: avg Pointy hat to: dim MFC after: 1 week X-MFC-With: r247960
* | Make ctfconvert work correctly on clang-compiled object files. Clangdim2013-03-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | puts the full original source filename in the STT_FILE entry of the ELF symbol table, while gcc saves only the basename. Since the DWARF DW_AT_name attribute contains the full source filename, both for clang and gcc, ctfconvert takes just the basename of it, for matching with the STT_FILE entry. So when attempting to match with such an entry, use its basename, if necessary. Reported by: avg MFC after: 1 week
* | MFV r247845:mm2013-03-051-17/+53
|/ | | | | | | | | | | | | | Import ZFS bpobj bugfix from vendor. Illumos ZFS issues: 3603 panic from bpobj_enqueue_subobj() 3604 zdb should print bpobjs more verbosely References: https://www.illumos.org/issues/3603 https://www.illumos.org/issues/3604 MFC after: 1 week
* MFV r247316:mm2013-03-011-0/+33
| | | | | | | | | | | | | Merge new read-only zfs properties from vendor (illumos) Illumos ZFS issues: 3588 provide zfs properties for logical (uncompressed) space used and referenced References: https://www.illumos.org/issues/3588 MFC after: 2 weeks
* Fix the zfs_ioctl compat layer to support zfs_cmd size change introducedmm2013-03-011-9/+26
| | | | | | | | | | | | | | | in r247265 (ZFS deadman thread). Both new utilities now support the old kernel and new kernel properly detects old utilities. For future backwards compatibility, the vfs.zfs.version.ioctl read-only sysctl has been introduced. With this sysctl zfs utilities will be able to detect the ioctl interface version of the currently loaded zfs module. As a side effect, the zfs utilities between r247265 and this revision don't support the old kernel module. If you are using HEAD newer or equal than r247265, install the new kernel module (or whole kernel) first. MFC after: 10 days
* MFV 247176, 247178, 247315:mm2013-02-271-6/+6
| | | | | | | | | | | | | | | | | | | Import metaslab_sync() speedup from vendor (illumos). Illumos ZFS issues: 3552 condensing one space map burns 3 seconds of CPU in spa_sync() thread 3564 spa_sync() spends 5-10% of its time in metaslab_sync() (when not condensing) 3578 transferring the freed map to the defer map should be constant time 3579 ztest trips assertion in metaslab_weight() References: https://www.illumos.org/issues/3552 https://www.illumos.org/issues/3564 https://www.illumos.org/issues/3578 https://www.illumos.org/issues/3579 MFC after: 2 weeks
* MFV v242732:mm2013-02-254-9/+100
| | | | | | | | | | | | | | | | | | | | | Merge the ZFS I/O deadman thread from vendor (illumos). This feature panics the system on hanging ZFS I/O, helps debugging and resumes failed service. The panic behavior can be controlled with the loader-only tunables: vfs.zfs.deadman_enabled (enable or disable panic on stalled ZFS I/O) vfs.zfs.deadman_synctime (expiration time for stalled ZFS I/O) By default, ZFS I/O deadman is enabled by default on amd64 and i386 excluding virtual guest machines. Illumos ZFS issues: 3246 ZFS I/O deadman thread References: https://www.illumos.org/issues/3246 MFC after: 2 weeks
* Orphaned processes that are being traced are killed by thegibbs2013-02-201-0/+7
| | | | | | | | | | | | | | | | | kernel. Properly restore, continue, and detach from processes being DTraced when DTrace exits with an error so the program being inspected is not terminated. cddl/contrib/opensolaris/cmd/dtrace/dtrace.c: In fatal(), the generic error handler, close the DTrace handle as is done in the "probe/script" error handler dfatal(). fatal() can be invoked after DTrace attaches to processes (e.g. a script specified by command line argument can't be found) and closing the handle will release them. Submitted by: Spectra Logic Corporation Reviewed by: rpaulo, gnn
* Use the right year.delphij2013-02-112-2/+2
| | | | Noticed by: Denis Ahrens <denis h3q com>
* MFV r246392:mm2013-02-111-4/+3
| | | | | | | | | | | | Import vendor ZFS bugfix fixing a possible deadlock in arc_read(). Illumos ZFS issues: 3498 panic in arc_read(): !refcount_is_zero(&pbuf->b_hdr->b_refcnt) References: https://www.illumos.org/issues/3498 MFC after: 2 weeks
* MFV r246388:mm2013-02-101-7/+1
| | | | | | | | | | | | | | Import vendor bugfixes Illumos ZFS issues: 3422 zpool create/syseventd race yield non-importable pool 3425 first write to a new zvol can fail with EFBIG References: https://www.illumos.org/issues/3422 https://www.illumos.org/issues/3425 MFC after: 2 weeks
* Backport vendor changes in zfs(8) manual page (MFV r246389)mm2013-02-101-122/+129
| | | | | | | | | | Illumos ZFS issues: 3380 zfs man page: documentation for zfs allow is confusing References: https://www.illumos.org/issues/3380 MFC after: 2 weeks
OpenPOWER on IntegriCloud