summaryrefslogtreecommitdiff
path: root/cddl
Commit message (Collapse)AuthorAgeFilesLines
* MFC r271527: MFV r271511:Xin LI2014-10-021-12/+6
| | | | | | | | | | | | Use fnvlist_* to make code more readable. Illumos issue: 5135 zpool_find_import_cached() can use fnvlist_* Approved by: re (gjb) Notes: svn path=/stable/10/; revision=272453
* MFC r271227: MFV r271225:Xin LI2014-09-251-17/+18
| | | | | | | | | | | | | | | Iterate through all the children instead of returning error when we hit the first error. This makes the error message give more information rather than just the first device that causes problem. Illumos issue: 5118 When verifying or creating a storage pool, error messages only show one device Approved by: re (gjb) Notes: svn path=/stable/10/; revision=272136
* MFC r271934:Steven Hartland2014-09-241-3/+8
| | | | | | | | | | | Output boot code warning when zpool upgrade -a is used to add features. PR: 188328 Approved by: re (marius) Sponsored by: Multiplay Notes: svn path=/stable/10/; revision=272063
* MFC r271222:Xin LI2014-09-101-1/+1
| | | | | | | | | | Fix typo. Submitted by: Dmitry Morozovsky <marck rinet ru> Approved by: re (gjb) Notes: svn path=/stable/10/; revision=271390
* MFC r269524:Mark Johnston2014-08-203-11/+14
| | | | | | | | | Preserve the errno value of an ioctl before calling free(3). Previously, errno was very occasionally being clobbered, resulting in a bogus error from dt_consume() and thus an error from dtrace(1). Notes: svn path=/stable/10/; revision=270214
* MFC r269430: MFV r269426:Xin LI2014-08-181-1/+1
| | | | | | | | | | | Double test device size for ztest(1). Illumos issue: 5039 ztest should default to larger device sizes Author: Matthew Ahrens <mahrens@delphix.com> Notes: svn path=/stable/10/; revision=270126
* MFC r267875:Pedro F. Giffuni2014-08-161-2/+7
| | | | | | | | | | | | | | | 4251 libdtrace leaks open file handles Illumos commit: 93ed8d0d4b068b95d0bb50d57bb854df462a8485 (partial) Reference: https://www.illumos.org/issues/4251 Discussed with: Robert Mustacchi Obtained from: Illumos Notes: svn path=/stable/10/; revision=270030
* MFC r257877:Mark Johnston2014-08-141-3/+1
| | | | | | | | | | | | | | | | Don't try to use the 32-bit drti.o unless the data model is explicitly set 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. Notes: svn path=/stable/10/; revision=269986
* MFC r269776Rui Paulo2014-08-131-52/+0
| | | | | | | Remove the BROKEN_LIBELF section. Notes: svn path=/stable/10/; revision=269912
* MFC r269229,269404,269466: MFV r269223:Xin LI2014-08-121-5/+34
| | | | | | | | | | 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 Notes: svn path=/stable/10/; revision=269845
* MFC r269118: MFV r269010:Xin LI2014-08-105-41/+144
| | | | | | | | | | | | | | | | 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 Notes: svn path=/stable/10/; revision=269773
* MFC r269100:Xin LI2014-08-082-7/+16
| | | | | | | Diff reduction against Illumos. Notes: svn path=/stable/10/; revision=269736
* MFC r268621 (smh) + r268625:Xin LI2014-08-082-2/+4
| | | | | | | | | | | | | | | | Don't report non-native block-size pools under zpool status -x zpool status -x is used to identify pools that are exhibiting errors or are otherwise unavailable, therefore non-native block-size pools shouldn't be reported. Also update man page to clarify other additional conditions which won't cause a pool to be displayed under zpool status -x. Sponsored by: Multiplay Notes: svn path=/stable/10/; revision=269735
* MFC the cddl/contrib/opensolaris/cmd/zpool portion of r267803 (joel):Xin LI2014-08-081-1/+0
| | | | | | | mdoc: remove superfluous paragraph macros. Notes: svn path=/stable/10/; revision=269734
* MFC r265631:Mark Johnston2014-08-081-1/+1
| | | | | | | | | | | | | Re-apply r248644. This fixes an annoying problem which caused dtrace -c to fail to attach to stripped binaries. With the _r_debug_postinit symbol, dtrace(1) can now set a breakpoint in the victim process after it has registered its DOF table(s) with the kernel. r_debug_state cannot be used for this purpose since it is called before DOF is made available, in which case dtrace(1) cannot create USDT probes before the program begins execution. Notes: svn path=/stable/10/; revision=269724
* MFC r256571:Mark Johnston2014-08-042-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a function, memstr, which can be used to convert a buffer of 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(). Notes: svn path=/stable/10/; revision=269520
* MFC r268855: MFV r268848:Xin LI2014-08-021-6/+37
| | | | | | | | | | | | | | | | | | | | | Instead of asserting all zio's be properly aligned, only assert on the logical ones. Cap uberblocks at 8k, otherwise with ashift=17, there would be only one uberblock. This fixes a problem that zdb would trip assert on pools with ashift >= 0xe (8k). While there, also change the code so it only attempt to condense space map unless the uncondensed size consumes greater than zfs_metaslab_condense_block_threshold blocks. Illumos issue: 4958 zdb trips assert on pools with ashift >= 0xe Notes: svn path=/stable/10/; revision=269416
* MFC r264486:Mark Johnston2014-07-291-0/+5
| | | | | | | | Use the correct format specifiers for wide characters and strings of wide characters. Notes: svn path=/stable/10/; revision=269263
* MFC r262669:Mark Johnston2014-07-291-30/+58
| | | | | | | | | | | | | When our linker merges .SUNW_dof sections from multiple files, it simply concatenates the DOF tables into one section. Previously, the USDT init code in drti.o would only look at the first table in the DOF section; with this change, it iterates over all the tables, passing each DOF table to the kernel. PR: 186821 Notes: svn path=/stable/10/; revision=269245
* MFC r268720: MFV r268714:Xin LI2014-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve extreme rewind import. When doing an "extreme rewind" import ("zpool import -XF"), we attempt to verify all data in the pool, essentially scrubbing the entire pool. The problem is that spa_load_verify_cb() issues an unbounded number of concurrent scrub i/os. This can lead to all of memory being used for these zio's, wedging the system. Like normal scrub, we need to put a cap on the number of outstanding i/os, and have the traverse thread block when we reach this cap. For this purpose the cap can be very large (10,000) to optimize the elevator algorithm. Three kernel tunables have been added: vfs.zfs.spa_load_verify_maxinflight vfs.zfs.spa_load_verify_metadata vfs.zfs.spa_load_verify_data The latter two tunables controls whether metadata and/or user data when doing extreme rewind. Make 'zpool import -T' imply scrub. Make zpool import -T <txg> accept hexadecimal values for the txg when prefixed with 0x. Skip txg's for which there is no uberblock when doing extreme rewind. Skip reading all user data twice by skipping prefetches when doing extreme rewinds as we do not access via the ARC. Illumos issues: 4970 need controls on i/o issued by zpool import -XF 4971 zpool import -T should accept hex values 4972 zpool import -T implies extreme rewind, and thus a scrub 4973 spa_load_retry retries the same txg 4974 spa_load_verify() reads all data twice Notes: svn path=/stable/10/; revision=269219
* MFC r268473: MFV r268455:Xin LI2014-07-232-5/+9
| | | | | | | Use reserved space for ZFS administrative commands. Notes: svn path=/stable/10/; revision=269006
* MFC r260156: MFV r260152:Xin LI2014-07-231-2/+2
| | | | | | | 4208 Typo in zfs_main.c: "posxiuser" Notes: svn path=/stable/10/; revision=269005
* MFC r268470: MFV r268454:Xin LI2014-07-231-10/+10
| | | | | | | | | | Refresh zpool list for each interval in order to produce fresh output. Illumos issue: 4966 zpool list iterator does not update output Notes: svn path=/stable/10/; revision=269004
* MFC r268469: MFV r268453:Xin LI2014-07-232-19/+19
| | | | | | | Diff reduction against Illumos. Notes: svn path=/stable/10/; revision=269003
* MFC r268116:Xin LI2014-07-171-10/+17
| | | | | | | | | | | - Fix handling of "new" style of ioctl in compatiblity mode [1]; - Reorganize code and reduce diff from upstream; - Improve forward compatibility shims for previous kernel; Reported by: sbruno [1] Notes: svn path=/stable/10/; revision=268786
* MFC r268126: MFV r268121:Xin LI2014-07-151-9/+12
| | | | | | | 4924 LZ4 Compression for metadata Notes: svn path=/stable/10/; revision=268658
* MFC r268123: MFV r268119:Xin LI2014-07-153-20/+24
| | | | | | | 4914 zfs on-disk bookmark structure should be named *_phys_t Notes: svn path=/stable/10/; revision=268657
* MFC r268086: MFV r267570:Xin LI2014-07-151-1/+3
| | | | | | | 4756 metaslab_group_preload() could deadlock Notes: svn path=/stable/10/; revision=268656
* MFC r268084: MFV r267568:Xin LI2014-07-154-7/+49
| | | | | | | 4891 want zdb option to dump all metadata Notes: svn path=/stable/10/; revision=268653
* MFC r268079: MFV r267566:Xin LI2014-07-152-2/+3
| | | | | | | | 4390 i/o errors when deleting filesystem/zvol can lead to space map corruption Notes: svn path=/stable/10/; revision=268650
* MFC r268075: MFV r267565:Xin LI2014-07-1514-56/+287
| | | | | | | | 4757 ZFS embedded-data block pointers ("zero block compression") 4913 zfs release should not be subject to space checks Notes: svn path=/stable/10/; revision=268649
* MFC r260142: MFV r258972:Xin LI2014-07-152-4/+123
| | | | | | | 4373 add block contents print to zstreamdump Notes: svn path=/stable/10/; revision=268648
* MFC r266771: MFV r266766:Xin LI2014-07-151-2/+49
| | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/stable/10/; revision=268647
* MFC r267572: MFV r249332 (illumos-gate 14005:55fc53126003)Xin LI2014-07-151-1/+38
| | | | | | | | Illumos ZFS issues: 3654 zdb should print number of ganged blocks Notes: svn path=/stable/10/; revision=268645
* MFC 267929, 267937, 267939, 267940, 267941, 267942, 267987, 268006:Rui Paulo2014-07-1284-164/+5580
| | | | | | | | | | | | | | | | | | | 2915 DTrace in a zone should see "cpu", "curpsinfo", et al 2916 DTrace in a zone should be able to access fds[] 2917 DTrace in a zone should have limited provider access 4477 DTrace should speak JSON Add stubs for CTF functions which are not yet implemented. 4474 DTrace Userland CTF Support 4475 DTrace userland Keyword 4476 DTrace tests should be better citizens 4479 pid provider types 4480 dof emulation is missing checks 4471 DTrace count() with histogram 4472 DTrace full width distribution histograms 4473 DTrace frequency trails Notes: svn path=/stable/10/; revision=268578
* MFC r267513:Pedro F. Giffuni2014-06-203-0/+168
| | | | | | | | | | | | Merge from r258379 missed the tests. 4248 dtrace(1M) should never create DOF with empty probes section 4249 Only probes from the first DTrace object file will be included Illumos Revision: 54a20ab41aadcb81c53e72fc65886e964e9add59 Notes: svn path=/stable/10/; revision=267676
* MFC r266520:Xin LI2014-05-271-2/+2
| | | | | | | | | | | | | | | Explicitly link libzfs against libavl as it is done in OpenSolaris (4543:12bb2876a62e). Without this, some third party applications may break because the lack of AVL related symbols. FreeBSD base system are not affected because the FreeBSD ZFS command line tools were all linked against libavl and thus hide the underlying issue. PR: bin/183081 Notes: svn path=/stable/10/; revision=266758
* MFC r262329:Mark Johnston2014-05-253-43/+0
| | | | | | | | | | | | | Define the KM_NORMALPRI flag for kmem_alloc(), as it is used in some upstream DTrace code. MFC r262330: 1452 DTrace buffer autoscaling should be less violent illumos/illumos-gate@6fb4854bed54ce82bd8610896b64ddebcd4af706 Notes: svn path=/stable/10/; revision=266667
* MFC r265689:Alexander Motin2014-05-244-30/+599
| | | | | | | | | | | | | | | Import adapted OpenSolaris' thread pool API implementation. The thread pool is used by libzfs to implement parallel disk scanning. Without this change our dummy wrapper made `zpool import ZZZ` command to scan all disks sequentially from the single thread when searching for pools. This change makes it use two threads per CPU, same as in OpenSolaris. On system with 200 HDDs this change reduces ZFS pool import time from 35 to 22 seconds. Notes: svn path=/stable/10/; revision=266612
* MFC r265821:Alexander Motin2014-05-243-0/+10
| | | | | | | | | | | Comment out some pointless device open/close around reading device IDs. FreeBSD ZFS port unlike OpenSolaris does not use device IDs, and does not implement respective devid_*() fuctions. It is pointless to open devices just to close them back immediately. Notes: svn path=/stable/10/; revision=266611
* MFC r264835 (MFV r264829):Xin LI2014-05-094-3/+115
| | | | | | | 3897 zfs filesystem and snapshot limits Notes: svn path=/stable/10/; revision=265744
* MFC r264669: MFV r264666:Xin LI2014-05-093-10/+10
| | | | | | | | | 4374 dn_free_ranges should use range_tree_t illumos/illumos-gate@bf16b11e8deb633dd6c4296d46e92399d1582df4 Notes: svn path=/stable/10/; revision=265740
* MFC r264145:Alexander Motin2014-05-081-1/+33
| | | | | | | | | | | | | | | | | | | | | | Add property and sysctl to control how ZVOLs are exposed to OS. 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. Notes: svn path=/stable/10/; revision=265678
* MFC r264851Steven Hartland2014-05-081-6/+5
| | | | | | | | | Eliminated optarg global being used outside of the function which called getopt Sponsored by: Multiplay Notes: svn path=/stable/10/; revision=265650
* MFC r262542:Mark Johnston2014-05-031-0/+2
| | | | | | | | Move some files that are identical on i386 and amd64 to an x86 subdirectory rather than keeping duplicate copies. Notes: svn path=/stable/10/; revision=265273
* MFC r264040:Pedro F. Giffuni2014-05-023-8/+23
| | | | | | | | | | | | | | | | 4248 dtrace(1M) should never create DOF with empty probes section 4249 Only probes from the first DTrace object file will be included Illumos Revision: 4a20ab41aadcb81c53e72fc65886e964e9add59 Reference: https://www.illumos.org/issues/4248 https://www.illumos.org/issues/4249 Obtained from: Illumos Notes: svn path=/stable/10/; revision=265234
* MFC r264467:Xin LI2014-04-282-7/+54
| | | | | | | | | | | | Take into account when zpool history block grows exceeding 128KB in zpool(8) and zdb(8) by growing the buffer on demand with a cap of 1GB (specified in spa_history_create_obj()). PR: bin/186574 Submitted by: Andrew Childs <lorne cons org nz> (with changes) Notes: svn path=/stable/10/; revision=265039
* MFC r264741: Add placeholder Kyuafiles for various top-level hierarchies.Julio Merino2014-04-2810-2/+77
| | | | | | | This is "make tinderbox" clean. Notes: svn path=/stable/10/; revision=265037
* MFC r262596:Mark Johnston2014-04-231-0/+97
| | | | | | | | | 4478 dtrace_dof_maxsize is far too small illumos/illumos-gate@d339a29bb4765c4b6883a935cf69b669cd05bca0 Notes: svn path=/stable/10/; revision=264796
* MFC r263889 (MFV r263887):Xin LI2014-04-115-30/+154
| | | | | | | | 3993 zpool(1M) and zfs(1M) should support -p for "list" and "get" 4700 "zpool get" doesn't support -H or -o options Notes: svn path=/stable/10/; revision=264335