summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove duplicate defines introduced in initial ZFS import (r168404)allanjude2015-08-311-7/+0
| | | | | | | | | | | | | | | 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) Reviewed by: smh, delphij Approved by: bapt (mentor) Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D2878
* MFV r286704: 5960 zfs recv should prefetch indirect blocksmav2015-08-124-23/+52
| | | | | | | | | | | | | | | | 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.
* MFV r286682: 5765 add support for estimating send stream size withmav2015-08-121-5/+17
| | | | | | | | | | | | | 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@643da460c8ca583e39ce053081754e24087f84c8
* MFV 286586: 5746 more checksumming in zfs sendmav2015-08-101-73/+70
| | | | | | | | | | 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@98110f08fa182032082d98be2ddb9391fcd62bf1
* Perform bounds checking when constructing a format string.markj2015-08-021-5/+17
| | | | | | | | This was detected by the FORTIFY_SOURCE build. PR: 201657 Reported by: pfg MFC after: 2 weeks
* First cut of DTrace for AArch64.br2015-07-012-3/+156
| | | | | | Reviewed by: andrew, emaste Sponsored by: ARM Limited Differential Revision: https://reviews.freebsd.org/D2738
* MFV r284042: 1778 Assertion failed: rn->rn_nozpool == B_FALSE, fileavg2015-06-121-4/+1
| | | | | | | | | ../common/libzfs_import.c, line 1077, function zpool_open_func illumos/illumos-gate@bd0f709169e67f4bd34526e186a7c34f595f0d9b Author: Andrew Stormont <andyjstormont@gmail.com> MFC after: 13 days
* libdtrace: allow D libraries to declare dependencies on kernel modulesmarkj2015-06-065-0/+100
| | | | | | | | | | | | The "depends_on module" pragma can be used to declare a dependency on a DTrace module, which for kernel probes corresponds to a KLD. Such dependencies cannot be checked if the KLD is compiled into the kernel. Therefore, allow a module dependency to be satisfied if either a kernel module or a KLD with the specified name is loaded. Differential Revision: https://reviews.freebsd.org/D2653 Reviewed by: gnn, rpaulo Reported by: gnn
* Fix a typo that snuck in with r283024, and remove the EXFAIL annotation frommarkj2015-05-171-1/+1
| | | | a test which now passes as a result of that change.
* Respect the libdir option when linking drti.o, rather than hardcoding themarkj2015-05-172-16/+14
| | | | | | default path of /usr/lib(32)/dtrace. MFC after: 3 weeks
* As dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler maymarkj2015-05-171-0/+1
| | | | | | | | | | | 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. MFC after: 3 weeks
* When in lazyload mode, write the DOF to a temporary file and rename itmarkj2015-05-171-13/+16
| | | | | | rather than writing directly to the output file. CID: 1147172
* dump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAYavg2015-04-281-0/+11
| | | | | To do: upstream (https://www.illumos.org/issues/5752) MFC after: 10 days
* libdtrace: add support for lazyload mode.markj2015-04-083-17/+79
| | | | | | | | | | | Passing "-x lazyload" to dtrace -G during compilation causes dtrace(1) to not link drti.o into the output object file, so the USDT probes are not created during process startup. Instead, dtrace(1) will automatically discover and create probes on the process' behalf when attaching. Differential Revision: https://reviews.freebsd.org/D2203 Reviewed by: rpaulo MFC after: 1 month
* Fix a misparenthesization that could cause a crash if TERM is not set.markj2015-03-311-2/+2
| | | | | | Reported by: Coverity (internal) MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* Remove drti.o's dependency on libelf. This makes it possible to add DTracemarkj2015-02-185-72/+86
| | | | | | | | | | | | | | | | | | | probes to userland programs and libraries without also needing to link libelf. dtrace -G places the __SUNW_dof symbol at the beginning of the DOF (DTrace probe and provider metdata) section in the generated object file; drti.o now just uses this symbol to locate the section. A complication occurs when multiple dtrace-generated object files are linked together, since the __SUNW_dof symbol defined in each file is global. This is handled by using objcopy(1) to convert __SUNW_dof to a local symbol once drti.o has been linked with the generated object file. Upstream, this is done using a linker feature not present in GNU ld. Differential Revision: https://reviews.freebsd.org/D1757 Reviewed by: rpaulo MFC after: 1 month Relnotes: yes
* Initial version of DTrace on ARM32.gnn2015-02-101-0/+190
| | | | | Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj
* Let the standard deviation of the empty set be 0. This is consistent withmarkj2015-02-021-0/+3
| | | | | | | | | | the behaviour for averages, and fixes a crash that can occur when attempting to print a stddev aggregation containing no elements: dtrace:::BEGIN { @ = stddev(0); clear(@); printa("%@d", @); } PR: 197260 MFC after: 2 week
* Follow up to r277449 by fixing the remaining NSEC_TO_TICK macro to have the samengie2015-01-211-1/+1
| | | | | | named parameters Reported by: Ben Perrault <ben.perrault@gmail.com>, Willem Jan Withagen <wjw@digiware.nl>
* MFV r277432:delphij2015-01-202-33/+47
| | | | | | | | | Plug various memory leaks in libzfs import implementation. Illumos issue: 5518 Memory leaks in libzfs import implementation MFC after: 2 weeks
* Mechanically convert cddl sun #ifdef's to illumossmh2015-01-1736-241/+240
| | | | | | | | | | | | Since the upstream for cddl code is now illumos not sun, mechanically convert all sun #ifdef's to illumos #ifdef's which have been used in all newer code for some time. Also do a manual pass to correct the use if #ifdef comments as per style(9) as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos. MFC after: 1 month Sponsored by: Multiplay
* Eliminate illumos whole disk special case when searching for a ZFS vdevsmh2015-01-161-0/+6
| | | | | | | | | | This special case prevented locating vdevs which start with c[0-9] e.g. gptid/c6cde092-504b-11e4-ba52-c45444453598 hence it was impossible to online a vdev via its path. Submitted by: Peter Xu <xzpeter@gmail.com> MFC after: 2 weeks Sponsored by: Multiplay
* Use the correct state name for unavailable pools in zpool listsmh2014-12-311-1/+2
| | | | | | | | This corrects inconsitencies between zpool list and zpool status which are both described as displaying the pool <state> however zpool list would use this hardcoded FAULTED instead of the correct UNAVAIL. MFC after: 1 month
* Add PowerPC64 function descriptor support for dt_link.cjhibbits2014-12-281-14/+27
| | | | | | | | | | | | | | | | | | | | | | | Summary: PowerPC64 uses function descriptors in a section .opd, exporting the descriptors to the symbol table. This adds support for these into dt_link.c so that dtrace USDT probes can be compiled. Test Plan: Tested only on powerpc64. No regression testing has been performed, so I want someone with x86 hardware to regression test this. Tested on amd64 by markj Reviewers: #dtrace, markj Reviewed By: #dtrace, markj Subscribers: markj Differential Revision: https://reviews.freebsd.org/D1267 MFC after: 3 weeks
* DOF tables are aligned according to the DOF section's alignment constraint,markj2014-12-261-1/+4
| | | | | | | | so take this into account when iterating over DOF tables. PR: 195555 Submitted by: Fedor Indutny <fedor@indutny.com> (original version) MFC after: 1 week
* We can stop iterating once we've found the DOF section.markj2014-12-231-0/+1
| | | | Submitted by: Fedor Indutny <fedor@indutny.com>
* Initialize an argument to NULL instead of expecting dlinfo() to do it.will2014-12-171-1/+1
| | | | | | | | | | dlinfo() is a weak reference that may not be initialized at the time of execution. The default implementation (in lib/libc/gen/dlfcn.c) neither modifies the address pointed to by the third argument nor returns an error. Differential Revision: https://reviews.freebsd.org/D1326 Reviewed by: markj MFC after: 1 week
* MFV r275784:delphij2014-12-151-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 after: 2 weeks
* MFV r272851:markj2014-12-081-0/+1140
| | | | | | 5202 want ctf(4) illumos/illumos-gate@fe2e029eea29fd49d0d9058dbd5b79a252667e6b
* MFV r275537:delphij2014-12-071-13/+39
| | | | | | | | | | Illumos issue: 5316 allow smbadm join to use RPC (Due to our lack of smbsrv this is mostly no-op on FreeBSD) MFC after: 2 weeks
* MFV r260710 + 275532:delphij2014-12-062-0/+405
| | | | | | Add a new method, nvlist_print_json to allow libnvpair to emit JSON. MFC after: 1 month
* Adjust some checks missed in r274637, now that pi_rname can be NULL.markj2014-11-251-2/+3
| | | | | | | | Additionally fix a misparenthesization in the same check, noticed while fixing the first bug. This bug only appears to cause problems if the same USDT probe appears twice within a static function. X-MFC-With: r274637
* The module load address always needs to be included when setting the dm_*_vamarkj2014-11-251-3/+3
| | | | | | | | | | | | 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. Reported by: Shrikanth Kamath <shrikanth07@gmail.com> Tested by: Shrikanth Kamath Discussed with: avg MFC after: 2 weeks
* DTrace imposes a 128-byte limit on the length of the function component ofmarkj2014-11-173-22/+21
| | | | | | | | | | | | | | | | | a probe name. When dtrace -G builds up a DOF section for the specified provider(s), the probe function names are truncated to fit in this limit. The DOF is later used to build the symbol table for the generated object file, so the table can end up with truncated references, causing link errors. Instead of potentially truncating symbol table entries, write the full function name to the DOF string table and allow the kernel to enforce the 128-byte function name limit when a process attempts to load its DOF. PR: 194757 Differential Revision: https://reviews.freebsd.org/D1175 Reviewed by: rpaulo MFC after: 2 weeks
* MFV r274273:delphij2014-11-105-19/+47
| | | | | | | | | | | | | | | | ZFS large block support. 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). This *may* remain unchanged because of memory constraint. Limited safety belt is provided for mounted root filesystem but use caution is advised. Illumos issue: 5027 zfs large block support MFC after: 1 month
* MFV r274272 and diff reduction with upstream.delphij2014-11-091-0/+4
| | | | | | | | Illumos issue: 5244 zio pipeline callers should explicitly invoke next stage Tested with: ztest plus ZFS over GELI configuration MFC after: 1 month
* Apply upstream 13597:3eac1e8e0f4c (git: illumos-gate@aa846ad9):delphij2014-11-091-0/+2
| | | | | | | | | | | | 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 after: 2 weeks
* Treat D keywords as identifiers in certain postfix expressions. This allowsmarkj2014-10-061-0/+23
| | | | | | | | | | one to, for example, access the "provider" field of a struct g_consumer, even though "provider" is a D keyword. PR: 169657 MFC after: 2 months Discussed with: Bryan Cantrill Sponsored by: EMC / Isilon Storage Division
* MFV r272493:delphij2014-10-041-5/+11
| | | | | | | | | Show individual disk capacity when doing zpool list -v. Illumos issue: 5147 zpool list -v should show individual disk capacity MFC after: 1 week
* Hook up support for userland CTF support in DTrace. This required somemarkj2014-10-031-19/+1
| | | | | | | | | | | | | | | | | | modifications to libproc to support fetching the CTF info for a given file. With this change, dtrace(1) is able to resolve type info for function and USDT probe arguments, and function return values. In particular, the args[n] syntax should now work for referencing arguments of userland probes, provided that the requisite CTF info is available. The uctf tests pass if the test programs are compiled with CTF info. The current infrastructure around the DTrace test suite doesn't support this yet. Differential Revision: https://reviews.freebsd.org/D891 MFC after: 1 month Relnotes: yes Sponsored by: EMC / Isilon Storage Division
* Remove an incorrect close(2) call that was added in r271413.markj2014-09-221-1/+0
| | | | | | Reported by: Coverity CID: 1238923 X-MFC-With: r271413
* Remove some variables that are no longer used as of r271413.markj2014-09-221-10/+4
| | | | | | Reported by: Coverity CID: 1238924 X-MFC-With: r271413
* zfs_setprop_error(): Handle errno value E2BIG.will2014-09-181-0/+6
| | | | | | | | | | | | | | | | | | | | This errno value is emitted by dsl_props_set_check() in sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c, and is used to mean that the property value is too long. For the record, the maximum length is ZAP_MAXVALUELEN, which is 8*1024 bytes. Instead of claiming an unknown error (and abort()ing), provide something more specific to the scenario involved. As far as I can tell, E2BIG is not emitted for any other scenario. MFC after: 1 week Sponsored by: Spectra Logic Affects: All ZFS versions starting 27 Feb 2009 (illumos ccba0801) This change modified the value returned by dsl_props_set_check(), so that it can distinguish between a name that's too long and a value that's too long, but libzfs was not updated accordingly. MFSpectraBSD: r1051499 on 2014/03/28 11:07:59
* Fix some incorrect endianness checks.markj2014-09-172-3/+3
| | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* MFV r271516:delphij2014-09-131-0/+3
| | | | | | | | | | Enable debug printf's when ZFS_DEBUG or debug= is set. Illumos issue: 5134 if ZFS_DEBUG or debug= is set, libzpool should enable debug prints MFC after: 2 weeks
* MFV r271511:delphij2014-09-131-12/+6
| | | | | | | | | Use fnvlist_* to make code more readable. Illumos issue: 5135 zpool_find_import_cached() can use fnvlist_* MFC after: 2 weeks
* Use the linker to perform relocations in the SUNW_dof section rather thanmarkj2014-09-112-212/+23
| | | | | | | | | | | doing them in drti during startup. This fixes a number of problems with using USDT probes in stripped executables and shared libraries, and with USDT probes in static functions. Reviewed by: rpaulo MFC after: 1 month Sponsored by: EMC / Isilon Storage Division Phabric: D751
* Make DTrace stuff compile with C99 standard.delphij2014-08-224-0/+12
|
* Remove the BROKEN_LIBELF section.rpaulo2014-08-101-52/+0
| | | | | | This problem was fixed by Kai Wang in 2011. MFC after: 3 days
* Quiesce a printf warning from clang, %ul -> %lusbruno2014-08-081-1/+1
| | | | | Phabric: https://phabric.freebsd.org/D472 Reviewed by: mahrens delphij
OpenPOWER on IntegriCloud