summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib/opensolaris/common
Commit message (Collapse)AuthorAgeFilesLines
* MFC r305211: MFV r302662: 6447 handful of nvpair cleanupsmav2016-10-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@759e89be359f2af635e4122d147df56bce948773 https://github.com/illumos/illumos-gate/commit/759e89be359f2af635e4122d147df56bc e948773 https://www.illumos.org/issues/6447 I got a patch from someone who uses nvpair code outside of illumos. It fixes a couple of gcc warnings/bugs for him. 1. silence uninitialized use warnings 2. add parentheses around assignment used as truth value 3. fix printf format specifier (ll is for integers only) 4. strstr, strspn, strcspn, and strcmp are declared in string.h, not strings.h. 5. avoid scanning integer into boolean variable Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Robert Mustacchi <rm@joyent.com> Author: Steve Dougherty <sdougherty@barracuda.com>
* MFC r305209: MFV r302660: 6314 buffer overflow in dsl_dataset_namemav2016-10-121-14/+4
| | | | | | | | | | | | | | | | | illumos/illumos-gate@9adfa60d484ce2435f5af77cc99dcd4e692b6660 https://github.com/illumos/illumos-gate/commit/9adfa60d484ce2435f5af77cc99dcd4e6 92b6660 https://www.illumos.org/issues/6314 Callers of dsl_dataset_name pass a buffer of size ZFS_MAXNAMELEN, but dsl_dataset_name copies the datasets' name PLUS the snapshot name to it, resulting in a max of 2 * ZFS_MAXNAMELEN + '@'. Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r305197: MFV r302646:mav2016-10-122-3/+140
| | | | | | | | | | | | | | | | | | 6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch illumos/illumos-gate@ea4a67f462de0a39a9adea8197bcdef849de5371 https://github.com/illumos/illumos-gate/commit/ea4a67f462de0a39a9adea8197bcdef84 9de5371 https://www.illumos.org/issues/6980 doing zfs send -i snap1 snap2 >testfile results in internal error: Invalid argument Abort (core dumped) Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r305207: MFV r302659: 6931 lib/libzfs: cleanup gcc warningsmav2016-10-111-2/+4
| | | | | | | | | | | | | | | illumos/illumos-gate@88f61dee20b358671b1b643e9d1dbf220a1d69be https://github.com/illumos/illumos-gate/commit/88f61dee20b358671b1b643e9d1dbf220a1d69be https://www.illumos.org/issues/6931 need cleanup: CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-function Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Igor Kozhukhov <ikozhukhov@gmail.com>
* Revert r299454 and r299448.mav2016-06-301-12/+4
| | | | | | | | | | | Those changes were found confusing FreeBSD libc ACL code, that doesn't differentiate ACL for directories and files, and report ACLs for all directories created after those patches as non-trivial. On the other side these changes were considered wrong from POSIX and NFSv4 points of view. Until further investigation done upstream, revert those changes locally in preparation for FreeBSD 11.0 release. Approved by: re (hrs)
* Connect the SHA-512t256 and Skein hashing algorithms to ZFSallanjude2016-05-313-5/+5
| | | | | | | | | | | | | | | | Support for the new hashing algorithms in ZFS was introduced in r289422 However it was disconnected because FreeBSD lacked implementations of SHA-512 (truncated to 256 bits), and Skein. These implementations were introduced in r300921 and r300966 respectively This commit connects them to ZFS and enabled these new checksum algorithms This new algorithms are not supported by the boot blocks, so do not use them on your root dataset if you boot from ZFS. Relnotes: yes Sponsored by: ScaleEngine Inc.
* MFV r299442: 6762 POSIX write should imply DELETE_CHILD on directories - andmav2016-05-111-4/+12
| | | | | | | | | | some additional considerations Reviewed by: Gordon Ross <gwr@nexenta.com> Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Author: Kevin Crowe <kevin.crowe@nexenta.com> openzfs/openzfs@d316fffc9c361532a482208561bbb614dac7f916
* Add new IOCTL compat shims for ABI breakage caused by r296510:mav2016-03-092-136/+429
| | | | MFV r296505: 6531 Provide mechanism to artificially limit disk performance
* MFV r296527: 6659 nvlist_free(NULL) is a no-opmav2016-03-081-2/+1
| | | | | | | | | Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Marcel Telka <marcel@telka.sk> Approved by: Robert Mustacchi <rm@joyent.com> Author: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> illumos/illumos-gate@aab83bb83be7342f6cfccaed8d5fe0b2f404855d
* MFV r296518: 5027 zfs large block support (add copyright)mav2016-03-084-0/+4
| | | | | | Author: Matthew Ahrens <matt@mahrens.org> illumos/illumos-gate@c3d26abc9ee97b4f60233556aadeb57e0bd30bb9
* Fix the open solaris atomic functions on arm64. Without this we may use theandrew2015-11-051-0/+87
| | | | | | | | | | | | | | | wrong value in the comparison, leading to incorrectly setting the new value. This has been observed in the ZFS code. Without this we can lose track of the reference count in a zrlock object. We should move to use the generic atomic functions, however as this has been observed I would prefer to have this working, then move to the generic functions. PR: 204037 Sponsored by: ABT Systems Ltd
* MFV r289561: 6328 Fix cstyle errors in zfs codebasemav2015-10-191-1/+2
| | | | | | | | | | | Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Alex Reece <alex@delphix.com> Reviewed by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed by: Jorgen Lundman <lundman@lundman.net> Approved by: Robert Mustacchi <rm@joyent.com> Author: Paul Dagnelie <pcd@delphix.com> illumos/illumos-gate@9a686fbc186e8e2a64e9a5094d44c7d6fa0ea167
* Fix ZFS ABI compat shims for `zfs receive` after r289362.mav2015-10-171-0/+10
| | | | Difference appeared much less drammatic then seemed originally.
* MFV r289310:mav2015-10-165-16/+63
| | | | | | | | | | | | | | | | | | 4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com> Reviewed by: Richard Lowe <richlowe@richlowe.net> Approved by: Garrett D'Amore <garrett@damore.org> Author: Matthew Ahrens <mahrens@delphix.com> illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f This is only a partial merge of respective ZFS infrastructure changes. At this moment FreeBSD kernel has no those crypto algorithms, so the parts of the code to enable them are commented out. When they are implemented, it will be trivial to plug them in.
* MFV r289312: 2605 want to resume interrupted zfs sendmav2015-10-153-31/+145
| | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed by: Xin Li <delphij@freebsd.org> Reviewed by: Arne Jansen <sensille@gmx.net> Approved by: Dan McDonald <danmcd@omniti.com> Author: Matthew Ahrens <mahrens@delphix.com> illumos/illumos-gate@9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8 For more info, see: - slides http://www.slideshare.net/MatthewAhrens/openzfs-send-and-receive - video https://www.youtube.com/watch?v=iY44jPMvxog - manpage changes (for zfs resume -s and zfs send -t) - upcoming talk at the OpenZFS Developer Summit The TL;DR is: Use "zfs receive -s" to save the partially received state on failure. On failure, get the receive token with "zfs get receive_resume_token <fs>" Resume the send with "zfs send -t <token_value>" Relnotes: yes
* define aok in libnvpair which is linked to all zfs libraries that need aokavg2015-09-281-0/+8
| | | | | | | | This removes the circular dependency of libnvpair on libzfs / libzpool. PR: 199811 Obtained from: bapt MFC after: 23 days
* MFV r287684: 6091 avl_add doesn't assert on non-debug buildsdelphij2015-09-121-3/+7
| | | | | | | | | | | | Use assfail() from libuutil instead of ASSERT() in userland AVL avl_add. illumos/illumos-gate@faa2b6be2fc102adf9ed584fc1a667b4ddf50d78 Illumos issues: 6091 avl_add doesn't assert on non-debug builds https://www.illumos.org/issues/6091
* MFV 286707: 5959 clean up per-dataset feature count codemav2015-08-122-32/+40
| | | | | | | | | | | | | | | Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: George Wilson <george@delphix.com> Reviewed by: Alex Reece <alex@delphix.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Matthew Ahrens <mahrens@delphix.com> illumos/illumos-gate@ca0cc3918a1789fa839194af2a9245f801a06b1a A ZFS feature flags (large blocks) tracks its refcounts as the number of datasets that have ever used the feature. Several features of this type are planned to be added (new checksum functions). This code should be made common infrastructure rather than duplicating the code for each feature.
* Rename zfs nvpair files to not colidate with our nvlist.oshogbo2015-07-093-0/+0
| | | | | PR: 201356 Approved by: pjd (mentor)
* nvpair_type_is_array: DATA_TYPE_INT8_ARRAY was not recognizedavg2015-04-281-0/+1
| | | | | To do: upstream (https://www.illumos.org/issues/5778) MFC after: 10 days
* Mechanically convert cddl sun #ifdef's to illumossmh2015-01-171-1/+1
| | | | | | | | | | | | 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
* MFV r274273:delphij2014-11-104-3/+16
| | | | | | | | | | | | | | | | 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
* Copy strtolctype.h to sys/cddl/contrib/opensolaris/common/util to keeprpaulo2014-07-311-0/+79
| | | | | | the kernel self-contained. Requested by: jhb
* MFV r269223:delphij2014-07-291-0/+28
| | | | | | | | | 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 after: 2 weeks
* MFV r269010:delphij2014-07-261-1/+3
| | | | | | | | | | | | | | | 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 after: 2 weeks
* Remove ia64.marcel2014-07-071-93/+0
| | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan
* MFV r268122:delphij2014-07-011-0/+2
| | | | | | | | 4929 want prevsnap property illumos/illumos-gate@b461c7460e5e77cf65f00151162e654220c6e2fb MFC after: 2 weeks
* MFV r268121:delphij2014-07-011-1/+2
| | | | | | | | 4924 LZ4 Compression for metadata illumos/illumos-gate@b8289d24d866c1af02d7007348f7f057693c15d3 MFC after: 2 weeks
* - Fix handling of "new" style of ioctl in compatiblity mode [1];delphij2014-07-011-2/+10
| | | | | | | | - Reorganize code and reduce diff from upstream; - Improve forward compatibility shims for previous kernel; Reported by: sbruno [1] X-MFC-With: r268075
* MFV r267566:delphij2014-07-011-0/+2
| | | | | | 4390 i/o errors when deleting filesystem/zvol can lead to space map corruption MFC after: 2 weeks
* MFV r267565:delphij2014-07-014-10/+173
| | | | | | | 4757 ZFS embedded-data block pointers ("zero block compression") 4913 zfs release should not be subject to space checks MFC after: 2 weeks
* Reduce some warnings in the Solaris unicode support.pfg2014-06-291-7/+6
| | | | | | Clean some warnings from parenthesis and minor style issues. MFC after: 3 days
* MFV r266766:delphij2014-05-271-1/+12
| | | | | | | | | | | | | | | | | | | | | Add a new zfs property, "redundant_metadata" which can have values "all" or "most". The default will be "all", which is the current behavior. When set to all, ZFS stores an extra copy of all metadata. If a single on-disk block is corrupt, at worst a single block of user data (which is recordsize bytes long) can be lost. Setting to "most" will cause us to only store 1 copy of level-1 indirect blocks of user data files. This can improve performance of random writes, because less metadata has to be written. In practice, at worst about 100 blocks (of recordsize bytes each) of user data can be lost if a single on-disk block is corrupt. The exact behavior of which metadata blocks are stored redundantly may change in future releases. Illumos issue: 3835 zfs need not store 2 copies of all metadata MFC after: 2 weeks
* MFV r264830:delphij2014-04-231-5/+6
| | | | | | 4745 fix AVL code misspellings MFC after: 2 weeks
* MFV r264829:delphij2014-04-233-0/+22
| | | | | | 3897 zfs filesystem and snapshot limits MFC after: 2 weeks
* Add property and sysctl to control how ZVOLs are exposed to OS.mav2014-04-051-0/+12
| | | | | | | | | | | | | | | | | | | | New ZFS property volmode and sysctl vfs.zfs.vol.mode allow switching ZVOL between three modes: geom -- existing fully functional behavior (default); dev -- exposing volumes only as raw disk device file in devfs; none -- not exposing volumes outside ZFS. The "dev" mode is less functional (can't be partitioned, mounted, etc), but it is faster, and in some scenarios with untrusted consumers safer. It can be useful for NAS, VM block storages, etc. The "none" mode may be convenient for backup servers, etc. that don't need direct data access. Due to the way ZVOL is integrated with main ZFS code, those property and sysctl are checked only during pool import and volume creation. MFC after: 1 month Sponsored by: iXsystems, Inc.
* In atomic_or_8_nv() load 1 and not 8 bytes from the addressmarcel2014-01-061-1/+1
| | | | given. Note that atomic_or_8_nv() is not used at this time.
* MFV r260154 + 260182:delphij2014-01-028-41/+54
| | | | | | | | | 4369 implement zfs bookmarks 4368 zfs send filesystems from readonly pools Illumos/illumos-gate@78f171005391b928aaf1642b3206c534ed644332 MFC after: 2 weeks
* MFV r259170:delphij2014-01-012-7/+48
| | | | | | | | | | | | | 4370 avoid transmitting holes during zfs send 4371 DMU code clean up illumos/illumos-gate@43466aae47bfcd2ad9bf501faec8e75c08095e4f NOTE: Make sure the boot code is updated if a zpool upgrade is done on boot zpool. MFC after: 2 weeks
* MFV r258374:delphij2013-12-242-32/+31
| | | | | | | | | | | 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
* MFV r258371,r258372: 4101 metaslab_debug should allow for fine-grained controlavg2013-11-282-2/+6
| | | | | | | | | | | | | | | | | | | 4101 metaslab_debug should allow for fine-grained control 4102 space_maps should store more information about themselves 4103 space map object blocksize should be increased 4104 ::spa_space no longer works 4105 removing a mirrored log device results in a leaked object 4106 asynchronously load metaslab illumos/illumos-gate@0713e232b7712cd27d99e1e935ebb8d5de61c57d Note that some tunables have been removed and some new tunables have been added. Of particular note, FreeBSD-only knob vfs.zfs.space_map_last_hope is removed as it was a nop for some time now (after one of the previous merges from upstream). MFC after: 11 days Sponsored by: HybridCluster [merge]
* MFV r254750:delphij2013-09-213-0/+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)
* MFV r253781 + r253871:delphij2013-07-301-0/+2
| | | | | | | Illumos ZFS issues: 3894 zfs should not allow snapshot of inconsistent dataset MFC after: 2 weeks
* ZFS expects a copyout of zfs_cmd_t on an ioctl error. Our sys_ioctl()mm2013-04-092-5/+19
| | | | | | | | | | | | | | | 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 r247580:mm2013-03-193-10/+98
| | | | | | | | | | | 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.
* Move common zfs ioctl compatibility functions (userland) into libzfs_compat.cmm2013-03-181-1/+3
| | | | Introduce additional constants for zfs ioctl versions
* Fix accidentially changed ioc variable for old v15 compatibilitymm2013-03-171-1/+1
|
* libzfs_core:mm2013-03-172-19/+289
| | | | | | - 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
* WiP merge of libzfs_core (MFV r238590, r238592)mm2013-03-055-6/+19
| | | | not yet working, ioctl handling needs to be changed
* MFV r247316:mm2013-03-011-1/+5
| | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud