aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/lib
Commit message (Collapse)AuthorAgeFilesLines
* MFV r260154 + 260182:Xin LI2014-01-028-60/+364
| | | | | | | | | | | | 4369 implement zfs bookmarks 4368 zfs send filesystems from readonly pools Illumos/illumos-gate@78f171005391b928aaf1642b3206c534ed644332 MFC after: 2 weeks Notes: svn path=/head/; revision=260183
* MFV r242733:Xin LI2013-12-312-1/+80
| | | | | | | | | | | | | | | | | | 3306 zdb should be able to issue reads in parallel 3321 'zpool reopen' command should be documented in the man page and help message illumos/illumos-gate@31d7e8fa33fae995f558673adb22641b5aa8b6e1 FreeBSD porting notes: the kernel part of this changeset depends on Solaris buf(9S) interfaces and are not really applicable for our use. vdev_disk.c is patched as-is to reduce diverge from upstream, but vdev_file.c is left intact. MFC after: 2 weeks Notes: svn path=/head/; revision=260138
* When clearing relocations to __dtrace* symbols, handle both SHT_REL andMark Johnston2013-12-291-4/+11
| | | | | | | | | | | SHT_RELA sections properly instead of assuming that the relocation section is of type SHT_REL. Submitted by: Prashanth Kumar <pra_udupi@yahoo.co.in> (original version) MFC after: 1 month Notes: svn path=/head/; revision=260051
* MFV r258384:Xin LI2013-12-252-8/+10
| | | | | | | | | | | 2583 Add -p (parsable) option to zfs list illumos/illumos-gate@43d68d68c1ce08fb35026bebfb141af422e7082e MFC after: 2 weeks Notes: svn path=/head/; revision=259850
* MFV r258374:Xin LI2013-12-241-6/+5
| | | | | | | | | | | | | | 4171 clean up spa_feature_*() interfaces 4172 implement extensible_dataset feature for use by other zpool features illumos/illumos-gate@2acef22db7808606888f8f92715629ff3ba555b9 MFC after: 2 weeks Notes: svn path=/head/; revision=259813
* Don't even try to read vdev labels from devices smaller then SPA_MINDEVSIZEAlexander Motin2013-12-101-2/+9
| | | | | | | | | (64MB). Even if we would find one somehow, ZFS kernel code rejects such devices. It is funny to look on attempts to read 4 256K vdev labels from 1.44MB floppy, though it is not very practical and quite slow. Notes: svn path=/head/; revision=259168
* The uaddr, ufunc, umod and usym functions all seem to work as expected onMark Johnston2013-12-041-8/+0
| | | | | | | | | FreeBSD, so stop hiding them behind a "#if defined(sun)". Reported by: Prashanth Kumar <pra_udupi@yahoo.co.in> Notes: svn path=/head/; revision=258902
* Use mkstemp(3) to create the temporary file used in the FreeBSD-specificMark Johnston2013-12-031-8/+10
| | | | | | | portions of dtrace_program_link(). Notes: svn path=/head/; revision=258861
* MFV r255255: 4045 zfs write throttle & i/o scheduler performance workAndriy Gapon2013-11-261-0/+3
| | | | | | | | | | | | | | | | illumos/illumos-gate@69962b5647e4a8b9b14998733b765925381b727e Please note the following changes: - zio_ioctl has lost its priority parameter and now TRIM is executed with 'now' priority - some knobs are gone and some new knobs are added; not all of them are exposed as tunables / sysctls yet MFC after: 10 days Sponsored by: HybridCluster [merge] Notes: svn path=/head/; revision=258632
* 734 taskq_dispatch_prealloc() desiredAndriy Gapon2013-11-262-34/+83
| | | | | | | | | | | | | | | | | | | | | | | 943 zio_interrupt ends up calling taskq_dispatch with TQ_SLEEP illumos/illumos-gate@5aeb94743e3be0c51e86f73096334611ae3a058e Essentially FreeBSD taskqueues already operate in a mode that was added to Illumos with taskq_dispatch_ent change. We even exposed the superior FreeBSD interface as taskq_dispatch_safe. Now we just rename taskq_dispatch_safe to taskq_dispatch_ent and struct struct ostask to taskq_ent_t, so that code differences will be minimal. After this change sys/cddl/compat/opensolaris/sys/taskq.h header is no longer needed. Note that this commit is not an MFV because the upstream change was not individually committed to the vendor area. MFC after: 8 days Notes: svn path=/head/; revision=258630
* Don't try to use the 32-bit drti.o unless the data model is explicitly setMark Johnston2013-11-091-3/+1
| | | | | | | | | | | | | | | | | 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 after: 2 weeks Notes: svn path=/head/; revision=257877
* Quiesce warning regarding %llf which has no effect.Sean Bruno2013-11-041-1/+1
| | | | | | | | | Submitted as illumos issue #4284 Reviewed by: delphij Notes: svn path=/head/; revision=257638
* Add a function, memstr, which can be used to convert a buffer ofMark Johnston2013-10-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(). Thanks to Brendan Gregg for helpful comments on freebsd-dtrace. Tested by: Fabian Keil (earlier version) MFC after: 2 weeks Notes: svn path=/head/; revision=256571
* Add fasttrap for PowerPC. This is the last piece of the dtrace/ppc puzzle.Justin Hibbits2013-10-152-12/+215
| | | | | | | | | | It's incomplete, it doesn't contain full instruction emulation, but it should be sufficient for most cases. MFC after: 1 month Notes: svn path=/head/; revision=256543
* MFV r254750:Xin LI2013-09-211-11/+8
| | | | | | | | | | | | | | | | Add support of Illumos dumps on zvol over RAID-Z. Note that this only adds the features. FreeBSD would still need more work to support dumping on zvols. Illumos ZFS issues: 2932 support crash dumps to raidz, etc. pools MFC after: 1 month Approved by: re (ZFS blanket) Notes: svn path=/head/; revision=255750
* MFV r247844 (illumos-gate 13975:ef6409bc370f)Xin LI2013-09-102-0/+37
| | | | | | | | | | | | | | Illumos ZFS issues: 3582 zfs_delay() should support a variable resolution 3584 DTrace sdt probes for ZFS txg states Provide a compatibility shim for Solaris's cv_timedwait_hires to help aid future porting. Approved by: re (ZFS blanket) Notes: svn path=/head/; revision=255437
* MFV r254748:Xin LI2013-08-241-1/+5
| | | | | | | | | | Fix memory leak in libzfs's iter_dependents_cb(). Illumos ZFS issues: 4061 libzfs: memory leak in iter_dependents_cb() Notes: svn path=/head/; revision=254755
* MFV r254746:Xin LI2013-08-231-15/+42
| | | | | | | | | | | | | To quote original Illumos ticket: libctf thinks that any ELF file containing more than 65536 sections is corrupt, because it doesn't understand the SHN_XINDEX magic. Illumos DTrace issues: 4005 libctf can't deal with extended sections Notes: svn path=/head/; revision=254752
* Enhance the ZFS vdev layer to maintain both a logical and a physicalJustin T. Gibbs2013-08-214-35/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | minimum allocation size for devices. Use this information to automatically increase ZFS's minimum allocation size for new top-level vdevs to a value that more closely matches the optimum device allocation size. Use GEOM's stripesize attribute, if set, as the physical sector size of the GEOM. Calculate the minimum blocksize of each metaslab class. Use the calculated value instead of SPA_MINBLOCKSIZE (512b) when determining the likelyhood of compression yeilding a reduction in physical space usage. Report devices with sub-optimal block size configuration in "zpool status". Also properly fail attempts to attach devices with a logical block size greater than 8kB, since this will cause corruption to ZFS's label area. Sponsored by: Spectra Logic Corporaion MFC after: 2 weeks Background ========== Many modern devices use physical allocation units that are much larger than the minimum logical allocation size accessible by external commands. Two prevalent examples of this are 512e disk drives (512b logical sector, 4K physical sector) and flash devices (512b logical sector, 4K or larger allocation block size, and 128k or larger erase block size). Operations that modify less than the physical sector size result in a costly read-modify-write or garbage collection sequence on these devices. Simply exporting the true physical sector of the device to ZFS would yield optimal performance, but has two serious drawbacks: 1) Existing pools created with devices that have different logical and physical block sizes, but were configured to use the logical block size (e.g. because the OS version used for pool construction reported the logical block size instead of the physical block size) will suddenly find that the vdev allocation size has increased. This can be easily tolerated for active members of the array, but ZFS would prevent replacement of a vdev with another identical device because it now appears that the smaller allocation size required by the pool is not supported by the new device. 2) The device's physical block size may be too large to be supported by ZFS. The optimal allocation size for the vdev may be quite large. For example, a RAID controller may export a vdev that requires read-modify-write cycles unless accessed using 64k aligned/sized requests. ZFS currently has an 8k minimum block size limit. Reporting both the logical and physical allocation sizes for vdevs solves these problems. A device may be used so long as the logical block size is compatible with the configuration. By comparing the logical and physical block sizes, new configurations can be optimized and administrators can be notified of any existing pools that are sub-optimal. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h: Add the SPA_ASHIFT constant. ZFS currently has a hard upper limit of 13 (8k) for ashift and this constant is used to both document and enforce this limit. sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h: Add the VDEV_AUX_ASHIFT_TOO_BIG error code. Add fields for exporting the configured, logical, and physical ashift to the vdev_stat_t structure. Add VDEV_STAT_VALID() macro which can be used to verify the presence of required vdev_stat_t fields in nvlist data. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c: Provide a SYSCTL_PROC handler for "max_auto_ashift". Since the limit is only referenced long after boot when a create operation occurs, there's no compelling need for it to be a boot time configurable tunable. This also allows the validation code for the max_auto_ashift value to be contained within the sysctl handler. Populate the new fields in the vdev_stat_t structure. Fail vdev opens if the vdev reports an ashift larger than SPA_MAXASHIFT. Propogate vdev_logical_ashift and vdev_physical_ashift between child and parent vdevs as is done for vdev_ashift. In vdev_open(), restore code that fails opens for devices where vdev_ashift grows. This can only happen now if the device's logical ashift grows, which means it really isn't safe to use the device. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c: Update the vdev_open() API so that both logical (what was just ashift before) and physical ashift are reported. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h: Add two new fields, vdev_physical_ashift and vdev_logical_ashift, to vdev_t. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c: Add vdev_ashift_optimize(). Call it anytime a new top-level vdev is allocated. cddl/contrib/opensolaris/cmd/zpool/zpool_main.c: Add text for the VDEV_AUX_ASHIFT_TOO_BIG error. For each sub-optimally configured leaf vdev, report configured and native block sizes. cddl/contrib/opensolaris/cmd/zpool/zpool_main.c: cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c: Introduce a new zpool status: ZPOOL_STATUS_NON_NATIVE_ASHIFT. This status is reported on healthy pools containing vdevs configured to use a block size smaller than their reported physical block size. cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c: Update find_vdev_problem() and supporting functions to provide the full vdev_stat_t structure to problem checking routines, and to allow decent into replacing vdevs. Add a vdev_non_native_ashift() validator which is used on the full vdev tree to check for ZPOOL_STATUS_NON_NATIVE_ASHIFT. cddl/contrib/opensolaris/lib/libzpool/common/kernel.c: cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h: Enhance sysctl userland stubs now that a SYSCTL_PROC handler is used in vdev.c. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h: When the group membership of a metaslab class changes (i.e. when a vdev is added or removed from a pool), walk the group list to determine the smallest block size currently available and record this in the metaslab class. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c: Add the metaslab_class_get_minblocksize() accessor. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In zio_compress_data(), take the minimum blocksize as an input parameter instead of assuming SPA_MINBLOCKSIZE. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In l2arc_compress_buf(), pass SPA_MINBLOCKSIZE as the minimum blocksize of the device. The l2arc code performs has it's own code for deciding if compression is worth while, so this effectively disables zio_compress_data() from second guessing the original decision. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c: In zio_write_bp_init(), use the minimum blocksize of the normal metaslab class when compressing data. Notes: svn path=/head/; revision=254591
* MFV r254421:Xin LI2013-08-213-12/+29
| | | | | | | | Illumos ZFS issues: 3996 want a libzfs_core API to rollback to latest snapshot Notes: svn path=/head/; revision=254587
* Load the dtraceall module if /dev/dtrace/dtrace doesn't exist.Rui Paulo2013-08-101-1/+11
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=254197
* MFV r253781 + r253871:Xin LI2013-07-301-4/+11
| | | | | | | | | | Illumos ZFS issues: 3894 zfs should not allow snapshot of inconsistent dataset MFC after: 2 weeks Notes: svn path=/head/; revision=253819
* MFV r253784:Steven Hartland2013-07-301-2/+2
| | | | | | | | | | | | | | | Fix zfs send -D hang after processing requiring a CTRL+C to interrupt due to pthread_join prior to fd close. This was introduced by r251646 (MFV r251644) Illumos ZFS issue: 3909 "zfs send -D" does not work MFC after: 1 day Notes: svn path=/head/; revision=253818
* DTrace: re-apply r249426 now that the underlying issues have been solved.Pedro F. Giffuni2013-07-283-5/+9
| | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=253726
* DTrace: re-merge remainder of r249367 (original from Illumos).Pedro F. Giffuni2013-07-2810-125/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | Bring back some important fixes from Illumos: 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 We particularly avoid the LD_NOLAZYLOAD changes that Illumos made as those don't apply to FreeBSD and were causing problems in interactive mode. Illumos Revision: 13758:23432da34147 Reference: https://www.illumos.org/issues/3022 https://www.illumos.org/issues/3023 https://www.illumos.org/issues/3024 MFC after: 1 month Tested by: markj Notes: svn path=/head/; revision=253725
* MFV r252215:Xin LI2013-06-252-26/+26
| | | | | | | | | | | | | | | Restore a previous behavior before r251646, where when destructing ZFS snapshot, the ioctl would return ENOENT when it hit any of them in the errlist (the new behavior was only return ENOENT when all returns error). Illumos ZFS issues: 3829 fix for 3740 changed behavior of zfs destroy/hold/release ioctl MFC after: 1 week Notes: svn path=/head/; revision=252219
* Diff reduction against Illumos, no real change to code itself.Xin LI2013-06-251-0/+1
| | | | | | | | | | This marks vendor branch revision 252213 as merged, the actual code was committed in r245479. MFC after: 1 week Notes: svn path=/head/; revision=252218
* MFV r251644:Xin LI2013-06-124-133/+155
| | | | | | | | | | | | | | Poor ZFS send / receive performance due to snapshot hold / release processing (by smh@) Illumos ZFS issues: 3740 Poor ZFS send / receive performance due to snapshot hold / release processing MFC after: 2 weeks Notes: svn path=/head/; revision=251646
* MFV r251623:Xin LI2013-06-111-16/+0
| | | | | | | | | | | | zpool create should treat -O mountpoint and -m the same Illumos ZFS issues: 3745 zpool create should treat -O mountpoint and -m the same MFC after: 2 weeks Notes: svn path=/head/; revision=251634
* MFV r251619:Xin LI2013-06-111-0/+5
| | | | | | | | | | | | ZFS needs better comments. Illumos ZFS issues: 3741 zfs needs better comments MFC after: 2 weeks Notes: svn path=/head/; revision=251629
* Remove a block of code that was not intended to be part of the previousMark Johnston2013-05-201-7/+0
| | | | | | | | | revision. X-MFC with: r250812 Notes: svn path=/head/; revision=250820
* Re-introduce another part of r249367. This commit fixes a register leak inMark Johnston2013-05-196-97/+157
| | | | | | | | | | | | | | | dt_cg_ptrsize() and generally cleans up some of the error handling around register allocation. This change corresponds to part of illumos-gate commit e5803b76927480: 3025 register leak in D code generation Reviewed by: pfg Obtained from: illumos MFC after: 1 month Notes: svn path=/head/; revision=250812
* Bring back part of r249367 by adding DTrace's temporal option, which allowsMark Johnston2013-05-126-152/+619
| | | | | | | | | | | | | | | | | | | | | | | | | | | users to guarantee that the output of DTrace scripts will be time-ordered. This option is enabled by adding the line #pragma D option temporal to the beginning of a script, or by adding '-x temporal' to the arguments of dtrace(1). This change fixes a bug in the original port of the temporal option. This bug was causing some assertions to fail, so they had been disabled; in this revision the assertions are working properly and are enabled. The DTrace version number has been bumped from 1.9.0 to 1.9.1 to reflect the language change that's being introduced. This change corresponds to part of illumos-gate commit e5803b76927480: 3021 option for time-ordered output from dtrace(1M) Reviewed by: pfg Obtained from: illumos MFC after: 1 month Notes: svn path=/head/; revision=250574
* revert r248644 because of the regression for usdt probesAndriy Gapon2013-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 Notes: svn path=/head/; revision=249884
* Respect the enoent_ok flag if reporting error for holding an non-existingMartin Matuska2013-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 Notes: svn path=/head/; revision=249883
* DTrace: Revert r249426Pedro F. Giffuni2013-04-173-9/+5
| | | | | | | | | This change actually depends on r249367 which had to be reverted Pointy Hat: pfg Notes: svn path=/head/; revision=249575
* DTrace: Revert r249367Pedro F. Giffuni2013-04-1720-1144/+388
| | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=249573
* DTrace: print() should try to resolve function pointersPedro F. Giffuni2013-04-161-4/+47
| | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=249563
* Correct error message.Pawel Jakub Dawidek2013-04-161-1/+1
| | | | | | | Reported by: Dirk Engling <erdgeist@erdgeist.org> Notes: svn path=/head/; revision=249547
* Dtrace: resolve const types from fbt and other fixes.Pedro F. Giffuni2013-04-123-5/+9
| | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=249426
* DTrace: option for time-ordered outputPedro F. Giffuni2013-04-1120-388/+1144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=249367
* Fix libzfs to report error instead of returning zero if trying to hold orMartin Matuska2013-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 Notes: svn path=/head/; revision=249357
* ZFS expects a copyout of zfs_cmd_t on an ioctl error. Our sys_ioctl()Martin Matuska2013-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 Notes: svn path=/head/; revision=249319
* MFV r248217:Martin Matuska2013-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 Notes: svn path=/head/; revision=249195
* Commit a patch that fixes a problem in the #pragma statement when searchingGeorge V. Neville-Neil2013-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 Notes: svn path=/head/; revision=248848
* Dtrace: Add SUN MDB-like type-aware print() action.Pedro F. Giffuni2013-03-2510-70/+889
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=248708
* Dtrace: add toupper()/tolower() and enhancements to lltostr().Pedro F. Giffuni2013-03-251-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=248706
* Dtrace: add optional size argument to tracemem().Pedro F. Giffuni2013-03-244-10/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=248690
* dtrace: ensure that we can always catch a process (e.g. when -c is used)Andriy Gapon2013-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 Notes: svn path=/head/; revision=248644
* MFV r247580:Martin Matuska2013-03-198-143/+394
| | | | | | | | | | | | | | 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. Notes: svn path=/projects/libzfs_core/; revision=248498