summaryrefslogtreecommitdiff
path: root/cddl
Commit message (Collapse)AuthorAgeFilesLines
* The IP, TCP, and UDP provider report IP addresses as strings.Michael Tuexen2018-06-183-8/+8
| | | | | | | | | | | | | | | | In some cases, the required information is not available and the UDP provider reported an empty string in this case and the IP and TCP provider reported a NULL pointer. This patch changes the value provided in this case to the string "<unknown>". This make the behaviour consistent and in-line with the behaviour of Solaris. Reviewed by: markj@, dteske@, gnn@ Differential Revision: https://reviews.freebsd.org/D15855 Notes: svn path=/head/; revision=335325
* Fix markup in zfs(8); no content changeEric van Gyzen2018-06-151-1/+3
| | | | | | | Sponsored by: Dell EMC Notes: svn path=/head/; revision=335206
* Process CUs with a language attribute of DW_LANG_Mips_Assembler.Mark Johnston2018-06-111-1/+2
| | | | | | | | | | | At the moment ctfconvert(1) does not do much with such CUs, but that may not be true in the future, and we run ctfconvert on several assembly files during the build. X-MFC with: r334883 Notes: svn path=/head/; revision=334961
* Don't process DWARF generated from non-C/C++ code.Mark Johnston2018-06-091-3/+22
| | | | | | | | | | | | ctfconvert(1) is not designed to handle DWARF generated from such code, and will generally fail in non-obvious ways. Use an explicit check to help catch such potential failures. Reported by: Johannes Lundberg <johalun0@gmail.com> MFC after: 2 weeks Notes: svn path=/head/; revision=334883
* This originated from ZFS On Linux, asSean Eric Fagan2018-06-086-65/+98
| | | | | | | | | | | | | | | | | | https://github.com/zfsonlinux/zfs/commit/d4a72f23863382bdf6d0ae33196f5b5decbc48fd During scans (scrubs or resilvers), it sorts the blocks in each transaction group by block offset; the result can be a significant improvement. (On my test system just now, which I put some effort to introduce fragmentation into the pool since I set it up yesterday, a scrub went from 1h2m to 33.5m with the changes.) I've seen similar rations on production systems. Approved by: Alexander Motin Obtained from: ZFS On Linux Relnotes: Yes (improved scrub performance, with tunables) Differential Revision: https://reviews.freebsd.org/D15562 Notes: svn path=/head/; revision=334844
* Unbreak dtrace runtime for udp after svn r334719 SO_REUSEPORT commit.Sean Bruno2018-06-071-4/+4
| | | | | | | | Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Limeligght Networks Notes: svn path=/head/; revision=334788
* Load balance sockets with new SO_REUSEPORT_LB option.Sean Bruno2018-06-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new socket option, SO_REUSEPORT_LB, which allow multiple programs or threads to bind to the same port and incoming connections will be load balanced using a hash function. Most of the code was copied from a similar patch for DragonflyBSD. However, in DragonflyBSD, load balancing is a global on/off setting and can not be set per socket. This patch allows for simultaneous use of both the current SO_REUSEPORT and the new SO_REUSEPORT_LB options on the same system. Required changes to structures: Globally change so_options from 16 to 32 bit value to allow for more options. Add hashtable in pcbinfo to hold all SO_REUSEPORT_LB sockets. Limitations: As DragonflyBSD, a load balance group is limited to 256 pcbs (256 programs or threads sharing the same socket). This is a substantially different contribution as compared to its original incarnation at svn r332894 and reverted at svn r332967. Thanks to rwatson@ for the substantive feedback that is included in this commit. Submitted by: Johannes Lundberg <johalun0@gmail.com> Obtained from: DragonflyBSD Relnotes: Yes Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D11003 Notes: svn path=/head/; revision=334719
* dwatch(1): Update manual to reference actual releaseDevin Teske2018-06-031-1/+1
| | | | | | | | | MFC after: 3 days X-MFC-to: stable/11 Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=334594
* dwatch(1): Fix "-t test" for post-processing profilesDevin Teske2018-05-291-3/+3
| | | | | | | | | | | | | Profiles that perform post-processing of the DTrace output were dropping the "-t test" option on the floor. Fix handling of this option for said profiles. X-MFC-to: stable/11 X-MFC-with: r334261-334262 Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=334359
* dwatch(1): Eliminate ANSI dimming in developer modeDevin Teske2018-05-271-4/+0
| | | | | | | | | | | | | "Developer mode" (passing of "-dev" options), which enables debugging features on compilation error, used to dim lines unrelated to error. That proved distracting and feedback from testers also confirmed that simply highlighting the line the compiler complains about is enough. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=334262
* dwatch(1): Guard against error when given -t "*..."Devin Teske2018-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | dwatch allows you to customnize the predicate (condition) for when information is displayed. The DTrace syntax for this is: probe[, ...] /predicate/ { [actions] } But if predicate is something like "*args[1]!=NULL" to test that the first pointer in an array is non-NULL, the syntax produced is: probe[, ...] /*arg1!=NULL/ { [actions] } The issue being that "/*" is the beginning of a comment and thus the following error is emitted: dtrace: failed to compile script /dev/stdin: line 535: /* encountered inside a comment This patch adds whitespace around the argument given to -t, producing: probe[, ...] / *arg1!=NULL / { [actions] } Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=334261
* ctf dwarf: don't report "no dwarf entry" as if it were an errorMatt Macy2018-05-191-3/+6
| | | | Notes: svn path=/head/; revision=333885
* ctfconvert: silence useless enum has too many values warningMatt Macy2018-05-191-2/+0
| | | | Notes: svn path=/head/; revision=333872
* dwatch(1): Refactor sendrecv profileDevin Teske2018-05-121-17/+29
| | | | | | | | | | The profile for send(2)/recv(2) observation has been refactored to eliminate alloca() in favor of translations available in HEAD. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333519
* dwatch(1): Expose process for ip/tcp/udpDevin Teske2018-05-123-63/+0
| | | | | | | | | | | Knowing the value of execname during these probes is of some value even if it is commonly the interrupt kernel thread (intr[12]) -- quite often it is not, but that depends on the probe. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333518
* dwatch(1): Allow `-E code' to override profile EVENT_DETAILSDevin Teske2018-05-1217-0/+34
| | | | | | | | | This allows quick changes to the formatted output of a profile. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333517
* dwatch(1): Export ARGV to profiles loaded via load_profile()Devin Teske2018-05-121-0/+43
| | | | | | | | | | | | A module that wishes to post-process the output needs to know which arguments were passed in order to re-execute a child in a pipe-chain. Further, the expansion of ARGV needs to be such that items are escaped properly. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333516
* dwatch(1): Simplify info message testDevin Teske2018-05-121-1/+1
| | | | | | | | | The info() function already tests $QUIET Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333515
* dwatch(1): Separate default values so `-[BK] num' don't affect usageDevin Teske2018-05-121-4/+10
| | | | | | | | | | | | | | | If you were to pass an invalid option after `-B num' or `-K num' you would see that the usage statement would show the value you passed instead of the actual default. Moving the default values to separate variables that are unaffected by the options-parsing allows the usage statement to correctly show the hard-coded default values if no flags are used. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333514
* dwatch(1): Bugfix, usage displayed with `-1Q'Devin Teske2018-05-121-3/+2
| | | | | | | | | | | A return statement should have been an exit in list_profiles(). If the user passed `-Q' to list profiles and asked for one-line per profile (`-1'), list_profiles() would not exit as should. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=333513
* Cleanup sundry clang warnings for code that is not upstream in illumos.Sean Bruno2018-05-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/illumos/illumos-gate/edit/master/usr/src/lib/libzfs/common/libzfs_sendrecv.c Patch our version of it to quiesce warnings until someone decides to sync up our code: libzfs_sendrecv.c:2555:30: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] sprintf(guidname, "%lu", thisguid); ~~~ ^~~~~~~~ %llu libzfs_sendrecv.c:2612:29: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] sprintf(guidname, "%lu", parent_fromsnap_guid); ~~~ ^~~~~~~~~~~~~~~~~~~~ %llu libzfs_sendrecv.c:2645:29: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] sprintf(guidname, "%lu", parent_fromsnap_guid); ~~~ ^~~~~~~~~~~~~~~~~~~~ %llu Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D15325 Notes: svn path=/head/; revision=333307
* zpool(8): correct list of default properties in 'list'.Eitan Adler2018-04-281-2/+4
| | | | | | | | | | | | | | | | | The default provides output in the following form: ``` NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT ``` this corrects the man page. Also submitted upstream as https://github.com/openzfs/openzfs/pull/632/files (with slightly different changes needed) Notes: svn path=/head/; revision=333081
* Revert r332894 at the request of the submitter.Sean Bruno2018-04-241-4/+4
| | | | | | | | Submitted by: Johannes Lundberg <johalun0_gmail.com> Sponsored by: Limelight Networks Notes: svn path=/head/; revision=332967
* Load balance sockets with new SO_REUSEPORT_LB optionSean Bruno2018-04-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new socket option, SO_REUSEPORT_LB, which allow multiple programs or threads to bind to the same port and incoming connections will be load balanced using a hash function. Most of the code was copied from a similar patch for DragonflyBSD. However, in DragonflyBSD, load balancing is a global on/off setting and can not be set per socket. This patch allows for simultaneous use of both the current SO_REUSEPORT and the new SO_REUSEPORT_LB options on the same system. Required changes to structures Globally change so_options from 16 to 32 bit value to allow for more options. Add hashtable in pcbinfo to hold all SO_REUSEPORT_LB sockets. Limitations As DragonflyBSD, a load balance group is limited to 256 pcbs (256 programs or threads sharing the same socket). Submitted by: Johannes Lundberg <johanlun0@gmail.com> Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D11003 Notes: svn path=/head/; revision=332894
* dwatch(1): Remove the line used to demonstrate `-dev' optionDevin Teske2018-04-221-1/+0
| | | | | | | | | | | In recently added sendrecv profile, there was a line purposefully added to introduce a compilation error in which `-dev' is used to debug the entry. Removing the entry. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=332867
* dwatch(1): Add profile for send(2)/recv(2) syscallsDevin Teske2018-04-222-0/+223
| | | | | | | Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=332866
* dwatch(1): Add `-dev' option to aid debugging of profilesDevin Teske2018-04-221-1/+63
| | | | | | | | | | | | | | | | | | | The options `-d' (debug), `-e' (exit after compile), and `-v' (verbose) when combined in any order (though best remembered as `-dev') will run the conflated script through dtrace(1), test for error conditions, and show the line that dtrace(1) failed at (with context). If no errors are found, the output is the same as `-e[v]'. When writing a new profile for dwatch(1), you can quickly test to make sure it compiles by running `dwatch -devX profile_name' where profiles live in /usr/libexec/dwatch or /usr/local/libexec/dwatch (the latter being where profiles installed via ports should go). Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=332865
* MFV man pages update from r329502: 7614 zfs device evacuation/removal.Alexander Motin2018-04-173-13/+111
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=332641
* allow ZFS pool to have temporary name for duration of current importAndriy Gapon2018-04-123-24/+106
| | | | | | | | | | | | | | | | | | | | | | | | The change adds -t <name> option to zpool create and -t option to zpool import in its form with an old name and a new name. This allows to import (or create) a pool under a name that's different from its real, permanent name without affecting that name. This is useful when working with VM images or images of other physical systems if they happen to have a ZFS pool with the same name as the host system. The changes come from ZoL with some small tweaks. The porting has been done by julian. The change is being submitted to OpenZFS: https://github.com/openzfs/openzfs/pull/600 Submitted by: julian Reviewed by: smh MFC after: 2 weeks Sponsored by: Panzura (porting) Differential Revision: https://reviews.freebsd.org/D14972 Notes: svn path=/head/; revision=332426
* MFV r331712:Alexander Motin2018-03-281-10/+10
| | | | | | | | | | | | | | 9280 Assertion failure while running removal_with_ganging test with 4K devices illumos/illumos-gate@243952c7eeef020886e3e2e3df99a513df40584a Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: John Kennedy <john.kennedy@delphix.com> Approved by: Garrett D'Amore <garrett@damore.org> Author: Matt Ahrens <Matt.Ahrens@delphix.com> Notes: svn path=/head/; revision=331713
* MFV r331706:Alexander Motin2018-03-285-21/+24
| | | | | | | | | | | | | | | | | | | | | | | | | 9235 rename zpool_rewind_policy_t to zpool_load_policy_t illumos/illumos-gate@5dafeea3ebd2dd77affc802bcb90f63faf01589f We want to be able to pass various settings during import/open of a pool, which are not only related to rewind. Instead of adding a new policy and duplicate a bunch of code, we should just rename rewind_policy to a more generic term like load_policy. For instance, we'd like to set spa->spa_import_flags from the nvlist, rather from a flags parameter passed to spa_import as in some cases we want those flags not only for the import case, but also for the open case. One such flag could be ZFS_IMPORT_MISSING_LOG (as used in zdb) which would allow zfs to open a pool when logs are missing. Reviewed by: Matt Ahrens <matt@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Pavel Zakharov <pavel.zakharov@delphix.com> Notes: svn path=/head/; revision=331707
* MFV r331695, 331700: 9166 zfs storage pool checkpointAlexander Motin2018-03-2812-145/+1316
| | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@8671400134a11c848244896ca51a7db4d0f69da4 The idea of Storage Pool Checkpoint (aka zpool checkpoint) deals with exactly that. It can be thought of as a “pool-wide snapshot” (or a variation of extreme rewind that doesn’t corrupt your data). It remembers the entire state of the pool at the point that it was taken and the user can revert back to it later or discard it. Its generic use case is an administrator that is about to perform a set of destructive actions to ZFS as part of a critical procedure. She takes a checkpoint of the pool before performing the actions, then rewinds back to it if one of them fails or puts the pool into an unexpected state. Otherwise, she discards it. With the assumption that no one else is making modifications to ZFS, she basically wraps all these actions into a “high-level transaction”. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: John Kennedy <john.kennedy@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com> Notes: svn path=/head/; revision=331701
* Partial MFV r329753:Alexander Motin2018-03-282-115/+119
| | | | | | | | | | | | | | | | | 8809 libzpool should leverage work done in libfakekernel illumos/illumos-gate@f06dce2c1f0f3af78581e7574f65bfba843ddb6e Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: Gordon Ross <gordon.w.ross@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Andrew Stormont <astormont@racktopsystems.com> We do not have libfakekernel, but need to reduce code divergence. Notes: svn path=/head/; revision=331699
* ctfconvert: Fix minor memory leaks in STABS parserConrad Meyer2018-03-271-1/+5
| | | | | | | | | | | In an error case, free leaked objects. Does anything use STABS anymore? Probably not. Reported by: Coverity Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=331656
* ctfconvert/ctfmerge: Fix a memory leak enumerating DWARF filesConrad Meyer2018-03-261-0/+1
| | | | | | | | Reported by: Coverity Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=331600
* libctf: Don't construct pointers to out of bounds array offsetsConrad Meyer2018-03-261-3/+5
| | | | | | | | | | | | Just attempting to do the pointer arithmetic is undefined behavior. No functional change intended. Reported by: Coverity Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=331595
* libctf: Appease Coverity overrun warningsConrad Meyer2018-03-261-2/+2
| | | | | | | | | | | | | Rather than zeroing and reading into the a smaller union member the full union size, just zero and read directly into the union. No functional change intended. Reported by: Coverity Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=331594
* MFV r331407: 9213 zfs: sytem typoAlexander Motin2018-03-232-2/+2
| | | | | | | | | | | | illumos/illumos-gate@edc8ef7d921c96b23969898aeb766cb24960bda7 Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Approved by: Joshua M. Clulow <josh@sysmgr.org> Author: Toomas Soome <tsoome@me.com> Notes: svn path=/head/; revision=331408
* MFV r331400: 8484 Implement aggregate sum and use for arc countersAlexander Motin2018-03-231-0/+1
| | | | | | | | | | | | | | | In pursuit of improving performance on multi-core systems, we should implements fanned out counters and use them to improve the performance of some of the arc statistics. These stats are updated extremely frequently, and can consume a significant amount of CPU time. Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@joyent.com> Author: Paul Dagnelie <pcd@delphix.com> Notes: svn path=/head/; revision=331404
* Given hidden visibility to symbols referenced by the DOF section.Mark Johnston2018-03-191-2/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=331222
* Use __syscall(2) rather than syscall(2) in syscall/tst.args.c.Mark Johnston2018-03-181-1/+1
| | | | | | | | | Some of mmap(2)'s arguments are 64 bits wide. MFC after: 3 days Notes: svn path=/head/; revision=331135
* libdtrace: Fix another uninitialized dtt_flags UBConrad Meyer2018-03-161-3/+5
| | | | | | | | | | | | | Like r331073, eliminate a UB by fully initializing the struct with a designated initializer. Note that the similar src_dtt is not fully used, so a similar treatment was not absolutely required. I chose to leave it alone. It wouldn't hurt to do the same thing, though. Reported by: Coverity Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=331076
* libdtrace: Eliminate a minor UB by fully initializing parameter structConrad Meyer2018-03-161-3/+4
| | | | | | | | | | | The dtt_flags value is dereferenced by dt_type_pointer() and must be initialized first. Reported by: Coverity Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=331073
* Fix display of wrong pid from dtrace_sched(4)Devin Teske2018-03-081-2/+2
| | | | | | | | | Fix a comment while here. Sponsored by: Smule, Inc. Notes: svn path=/head/; revision=330672
* Bump dwatch(1) internal version from 1.0-beta-91 to 1.0Devin Teske2018-03-061-1/+1
| | | | Notes: svn path=/head/; revision=330560
* Introduce dwatch(1) as a tool for making DTrace more usefulDevin Teske2018-03-0623-0/+4241
| | | | | | | | | | Reviewed by: markj, gnn, bdrewery (earlier version) Relnotes: yes Sponsored by: Smule, Inc. Differential Revision: https://reviews.freebsd.org/D10006 Notes: svn path=/head/; revision=330559
* ZFS: fix adding vdevs to very large poolsAlan Somers2018-03-021-0/+1
| | | | | | | | | | | | | | | | | r323791 changed the return value of zpool_read_label. Error paths that previously returned 0 began to return -1 instead. However, not all error paths initialized errno. When adding vdevs to a very large pool, errno could be prepopulated with ENOMEM, causing the operation to fail. Fix the bug by setting errno=ENOENT in the case that no ZFS label is found. PR: 226096 Submitted by: Nikita Kozlov Reviewed by: avg MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D13088 Notes: svn path=/head/; revision=330295
* Consistent casing for fallback SIGCHLD (s/Unknown/unknown/)Devin Teske2018-02-261-1/+1
| | | | Notes: svn path=/head/; revision=329996
* Updates and enhancements to signal.d to aid DTrace scriptingDevin Teske2018-02-251-0/+52
| | | | | | | | | | | | | + Add missing signals SIGTHR (32) and SIGLIBRT (33) + Add inline for converting SIG* int to string + Add inline for converting CLD_* int to string Reviewed by: markj Sponsored by: Smule, Inc. Differential Revision: https://reviews.freebsd.org/D14497 Notes: svn path=/head/; revision=329995
* Don't declare __assfail as staticAlan Somers2018-02-251-0/+1
| | | | | | | | | | | | It gets called by dmu_buf_init_user, which is inline but not static. So it needs global linkage itself. Reported by: GCC-6 MFC after: 17 days X-MFC-With: 329722 Notes: svn path=/head/; revision=329984