summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r324007, r324012, r324014stable/11manu2017-10-031-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | r324007: mountd: Replace malloc+strcpy to strdup Reviewed by: bapt Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D12503 r324012: mountd: Remove unneeded cast Reported by: kib X MFC With: r324007 r324014: mountd: Avoid memory leak by freeing dp_dirp Introduced in r324007, the data alloced by strdup was never free'ed. While here, remove cast to caddr_t when freeing dp. Reported by: bde X MFC With: r324007
* MFC r324100:bapt2017-10-031-1/+1
| | | | | | | | | man(1): silent the output of mandoc when testing This reduce the spam a user may face when mandoc tries to figure out if it can renders a manpage or fallback on groff(1) Reported by: bdrewery
* MFC 323994: Log signal number passed to PT_STEP requests in KTR_PTRACE traces.jhb2017-10-021-2/+2
|
* MFC r323433,r323793,r323915: MFV r323110: 8558 lwp_create() returns EAGAINavg2017-10-024-10/+42
| | | | | | | | on system with more than 80K ZFS filesystems, and followups r323433: MFV r323110: 8558 lwp_create() returns EAGAIN on system with more than 80K ZFS filesystems r323793: MFV r323792: 8602 remove unused "dp_early_sync_tasks" field from "dsl_pool" structure r323915: MFV r323914: 8661 remove "zil-cw2" dtrace probe
* MFC r323918: MFV r323917: 8648 Fix range locking in ZIL commit codepathavg2017-10-022-4/+13
| | | | This fixes a problem introduced in r315441, MFC of r308782.
* MFC: r323689rmacklem2017-10-011-1/+1
| | | | | | | | | Fix bogus FREAD with NFSV4OPEN_ACCESSREAD. No functional change. The code in nfscl_doflayoutio() bogusly used FREAD instead of NFSV4OPEN_ACCESSREAD. Since both happen to be defined as "1", this worked and the patch doesn't result in a functional change. Found by inspection during development of Flex File Layout support.
* MFC r323873, r324081: Unprotected modification of ng_iface(4)eugen2017-10-011-4/+34
| | | | | | | | | | | private data leads to kernel panic. Fix a race with per-node read-mostly lock and refcounting for a hook. PR: 220076 Tested by: peixoto.cassiano Approved by: mav (mentor) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12435
* MFC r323961alc2017-10-011-1/+1
| | | | | | | | | Since the page "frame" doesn't belong to a vm object, it can't be paged out. Since it can't be paged out, it is never actually enqueued in a paging queue. Nonetheless, passing PQ_INACTIVE to vm_page_unwire() creates the appearance that the page "frame" is being enqueued in the inactive queue. As of r288122, we can avoid this false impression by passing PQ_NONE.
* MFC r323981alc2017-10-011-2/+1
| | | | | | Modernize the use of vm_page_unwire(). Since r288122, vm_page_unwire() has returned TRUE when the wire count transitions to zero, eliminating the need for callers to inspect the page's wire count.
* MFV r323796: fix memory leak in g_bio zone introduced in r320452avg2017-10-011-7/+18
| | | | | | | | | | | | | I overlooked the fact that that ZIO_IOCTL_PIPELINE does not include ZIO_STAGE_VDEV_IO_DONE stage. We do allocate a struct bio for an ioctl zio (a disk cache flush), but we never freed it. This change splits bio handling into two groups, one for normal read/write i/o that passes data around and, thus, needs the abd data tranform; the other group is for "data-less" i/o such as trim and cache flush. PR: 222288
* MFC r323797: add vfs_zfs.abd_chunk_size tunableavg2017-10-011-0/+7
| | | | | | | | It is reported that the default value of 4KB results in a substantial memory use overhead (at least, on some configurations). Using 1KB seems to reduce the overhead significantly. PR: 222377
* MFC r323522: slightly simplify zfs_vptocnpavg2017-10-011-8/+1
|
* MFC r321444,r321446:ngie2017-09-302-20/+4
| | | | | | | | | | | | | | | | | | | | | | r321444: Remove ${MTREE} and leverage etc/mtree/Makefile instead with "make distribution". This also fixes the fact that BSD.debug.dist was being installed if/when ${MK_DEBUG_FILES} != "no" before this commit. r321446: Unconditionally install etc/mtree/BSD.debug.dist again r279248 unconditionally installed BSD.debug.dist for ease-of-developer-use. Restore the previous behavior. While here, add a comment to note that this is intentional to avoid accidental future removal. MFC with: r321444
* MFC r322441:ngie2017-09-301-1/+1
| | | | Delete trailing whitespace
* MFC r322951:ngie2017-09-301-2/+6
| | | | | | | | | | | | | Respect MK_TCSH with build-tools and native-xtools This helps reduce the WORLDTMP footprint slightly. Based on a patch I submitted 5 years ago to GNATS. PR: 174051 Relnotes: yes (anyone who cross-builds with MK_TCSH=yes will run into build failures if the host doesn't have tcsh(1)) Reminded by: Fabian Keil <fk@fabiankeil.de>
* MFC r323391alc2017-09-303-12/+269
| | | | | | | | | | | | | | | | To analyze the allocation of swap blocks by blist functions, add a method for analyzing the radix tree structures and reporting on the number, and sizes, of maximal intervals of free blocks. The report includes the number of maximal intervals, and also the number of them in each of several size ranges, from small (size 1, or 3 to 4) to large (28657 to 46367) with size boundaries defined by Fibonacci numbers. The report is written in the test tool with the 's' command, or in a running kernel by sysctl. The analysis of the radix tree frequently computes the position of the lone bit set in a u_daddr_t, a computation that also appears in leaf allocation. That computation has been moved into a function of its own, and optimized for cases where an inlined machine instruction can replace the usual binary search.
* MFC r322459,322897alc2017-09-302-22/+24
| | | | | | | | | | | | | | | | | | | | | | | The *_meta_* functions include a radix parameter, a blk parameter, and another parameter that identifies a starting point in the memory address block. Radix is a power of two, blk is a multiple of radix, and the starting point is in the range [blk, blk+radix), so that blk can always be computed from the other two. This change drops the blk parameter from the meta functions and computes it instead. (On amd64, for example, this change reduces subr_blist.o's text size by 7%.) It also makes the radix parameters unsigned to address concerns that the calculation of '-radix' might overflow without the -fwrapv option. (See https://reviews.freebsd.org/D11819.) Correct a regression in the previous change, r322459. Specifically, the removal of the "blk" parameter from blst_meta_alloc() had the unintended effect of generating an out-of-range allocation when the cursor reaches the end of the tree if the number of managed blocks in the tree equals the so-called "radix" (which in the blist code is not the standard notion of what a radix is but rather the maximum number of leaves in a tree of the current height.) In other words, only certain swap configurations were affected, which is why earlier testing did not reveal the problem.
* MFC r323868alc2017-09-302-4/+3
| | | | | | | Modernize calls to vm_page_unwire(). As of r288122, vm_page_unwire() accepts PQ_NONE as the specified queue and returns a Boolean indicating whether the page's wire count transitioned to zero. Use these features in dev/drm2.
* MFC r323786alc2017-09-301-2/+1
| | | | | | In r288122, we changed vm_page_unwire() so that it returns a Boolean indicating whether the page's wire count transitioned to zero. Use that return value in zbuf_page_free() rather than checking the wire count.
* MFC r323785alc2017-09-301-1/+1
| | | | | | | | | | | Sync with amd64/arm/arm64/i386/mips pmap change r288256: Exploit r288122 to address a cosmetic issue. Since PV chunk pages don't belong to a vm object, they can't be paged out. Since they can't be paged out, they are never enqueued in a paging queue. Nonetheless, passing PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages are being enqueued in the inactive queue. As of r288122, we can avoid this false impression by passing PQ_NONE.
* MFC 323631: Add an -a flag to getconf.jhb2017-09-306-8/+154
| | | | | | | When -a is specified, the name and value of all system or path configuration values is reported to standard output. Sponsored by: Chelsio Communications
* MFC r323864kp2017-09-301-0/+1
| | | | | | | | | | bridge: Set module version This ensures that the loader will not load the module if it's also built in to the kernel. PR: 220860 Submitted by: Eugene Grosbein <eugen@freebsd.org>
* Belatedely fill in the dates for clang 5.0.0 update in UPDATING anddim2017-09-292-2/+2
| | | | | | ObsoleteFiles.inc. Noticed by: garga
* MFC r323613:markj2017-09-281-0/+1
| | | | Include _bitset.h to get BITSET_DEFINE, used to define struct slabbits.
* MFC r323290:markj2017-09-283-43/+61
| | | | Speed up vm_page_array initialization.
* MFC r323880:markj2017-09-281-7/+6
| | | | Simplify i915_gem_wire_page() and avoid unneeded page-busying.
* MFC r323813:asomers2017-09-271-8/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFV r323789: 8473 scrub does not detect errors on active spares illumos/illumos-gate@554675eee75dd2d7398d960aa5c81083ceb8505a https://github.com/illumos/illumos-gate/commit/554675eee75dd2d7398d960aa5c81083ceb8505a https://www.illumos.org/issues/8473 Scrubbing is supposed to detect and repair all errors in the pool. However, it wrongly ignores active spare devices. The problem can easily be reproduced in OpenZFS at git rev 0ef125d with these commands: truncate -s 64m /tmp/a /tmp/b /tmp/c sudo zpool create testpool mirror /tmp/a /tmp/b spare /tmp/c sudo zpool replace testpool /tmp/a /tmp/c /bin/dd if=/dev/zero bs=1024k count=63 oseek=1 conv=notrunc of=/tmp/c sync sudo zpool scrub testpool zpool status testpool # Will show 0 errors, which is wrong sudo zpool offline testpool /tmp/a sudo zpool scrub testpool zpool status testpool # Will show errors on /tmp/c, # which should've already been fixed FreeBSD head is partially affected: the first scrub will detect some errors, but the second scrub will detect more. Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Richard Lowe <richlowe@richlowe.net> Sponsored by: Spectra Logic Corp
* MFC r323194:asomers2017-09-271-1/+1
| | | | | | | | | | | | | | | Fix remounting ZFS filesystem with "zfs mount" "zfs mount -o" passes a list of mount options directly to nmount(2) after sanity checking them. In particular, zfs(8) will refuse to mount an already existing file system unless "remount" is specified in the option list. However, the "remount" option only exists in Illumos. FreeBSD's equivalent is "update". PR: 221985 Reviewed by: avg Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12233
* MFC r323193:asomers2017-09-271-7/+5
| | | | | | | | | | | | | Honor all options of "zfs mount -o" The existing code in zmount incorrectly parses the comma-delimited option string. The result is that nmount only honors the last option. AFAICT the parsing has been broken ever since ZFS's initial import in change 168404. PR: 222078 Reviewed by: avg Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12232
* MFC r322868:asomers2017-09-273-2/+15
| | | | | | | | | Fix 100.chksetuid and 110.neggrpperm for mountpoints with spaces Also, fix them for mountpoints with tabs. PR: 48325 Reported by: pguyot@kallisys.net, aaron@baugher.biz
* MFC r323544:markj2017-09-272-7/+13
| | | | Fix a logic error in the item size calculation for internal UMA zones.
* MFC r323564:markj2017-09-271-1/+1
| | | | | | Widen uk_pgoff, the slab header offset field. PR: 218911
* MFC r322965:ed2017-09-271-1/+1
| | | | | | | | | Make _Static_assert() work with GCC in older C++ standards. GCC only activates C11 keywords in C mode, not C++ mode. This means that when targeting an older C++ standard, we cannot fall back to using _Static_assert(). In this case, do define _Static_assert() as a macro that uses a typedef'ed array.
* MFC r323839:ae2017-09-271-8/+2
| | | | | | | Use in_localip() function instead of unlocked access to addresses hash to determine that an address is our local. PR: 220078
* MFC r323836:ae2017-09-275-24/+0
| | | | | | | | | | | | | | | | | | | Do not acquire IPFW_WLOCK when a named object is created and destroyed. Acquiring of IPFW_WLOCK is requried for cases when we are going to change some data that can be accessed during processing of packets flow. When we create new named object, there are not yet any rules, that references it, thus holding IPFW_UH_WLOCK is enough to safely update needed structures. When we destroy an object, we do this only when its reference counter becomes zero. And it is safe to not acquire IPFW_WLOCK, because noone references it. The another case is when we failed to finish some action and thus we are doing rollback and destroying an object, in this case it is still not referenced by rules and no need to acquire IPFW_WLOCK. This also fixes panic with INVARIANTS due to recursive IPFW_WLOCK acquiring. Sponsored by: Yandex LLC
* MFC r323824davidcs2017-09-262-4/+19
| | | | | | | | | | | | | | 1. ql_hw.c: In ql_hw_send() return EINVAL when TSO framelength exceeds max supported length by HW.(davidcs) 2. ql_os.c: In qla_send() call bus_dmamap_unload before freeing mbuf or recreating dmmamap.(davidcs) In qla_fp_taskqueue() Add additional checks for IFF_DRV_RUNNING Fix qla_clear_tx_buf() call bus_dmamap_sync() before freeing mbuf. Submitted by: David.Bachu@netapp.com
* MFC r323781davidcs2017-09-261-34/+34
| | | | Update minidump template for version 5.4.66
* MFC r323782davidcs2017-09-262-1/+10
| | | | Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval
* Merge clang, llvm, lld, lldb, compiler-rt and libc++ 5.0.0 release.dim2017-09-265468-253321/+501046
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r309126 (by emaste): Correct lld llvm-tblgen dependency file name MFC r309169: Get rid of separate Subversion mergeinfo properties for llvm-dwarfdump and llvm-lto. The mergeinfo confuses Subversion enormously, and these directories will just use the mergeinfo for llvm itself. MFC r312765: Pull in r276136 from upstream llvm trunk (by Wei Mi): Use ValueOffsetPair to enhance value reuse during SCEV expansion. In D12090, the ExprValueMap was added to reuse existing value during SCEV expansion. However, const folding and sext/zext distribution can make the reuse still difficult. A simplified case is: suppose we know S1 expands to V1 in ExprValueMap, and S1 = S2 + C_a S3 = S2 + C_b where C_a and C_b are different SCEVConstants. Then we'd like to expand S3 as V1 - C_a + C_b instead of expanding S2 literally. It is helpful when S2 is a complex SCEV expr and S2 has no entry in ExprValueMap, which is usually caused by the fact that S3 is generated from S1 after const folding. In order to do that, we represent ExprValueMap as a mapping from SCEV to ValueOffsetPair. We will save both S1->{V1, 0} and S2->{V1, C_a} into the ExprValueMap when we create SCEV for V1. When S3 is expanded, it will first expand S2 to V1 - C_a because of S2->{V1, C_a} in the map, then expand S3 to V1 - C_a + C_b. Differential Revision: https://reviews.llvm.org/D21313 This should fix assertion failures when building OpenCV >= 3.1. PR: 215649 MFC r312831: Revert r312765 for now, since it causes assertions when building lang/spidermonkey24. Reported by: antoine PR: 215649 MFC r316511 (by jhb): Add an implementation of __ffssi2() derived from __ffsdi2(). Newer versions of GCC include an __ffssi2() symbol in libgcc and the compiler can emit calls to it in generated code. This is true for at least GCC 6.2 when compiling world for mips and mips64. Reviewed by: jmallett, dim Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D10086 MFC r318601 (by adrian): [libcompiler-rt] add bswapdi2/bswapsi2 This is required for mips gcc 6.3 userland to build/run. Reviewed by: emaste, dim Approved by: emaste Differential Revision: https://reviews.freebsd.org/D10838 MFC r318884 (by emaste): lldb: map TRAP_CAP to a trace trap In the absense of a more specific handler for TRAP_CAP (generated by ENOTCAPABLE or ECAPMODE while in capability mode) treat it as a trace trap. Example usage (testing the bug in PR219173): % proccontrol -m trapcap lldb usr.bin/hexdump/obj/hexdump -- -Cv -s 1 /bin/ls ... (lldb) run Process 12980 launching Process 12980 launched: '.../usr.bin/hexdump/obj/hexdump' (x86_64) Process 12980 stopped * thread #1, stop reason = trace frame #0: 0x0000004b80c65f1a libc.so.7`__sys_lseek + 10 ... In the future we should have LLDB control the trapcap procctl itself (as it does with ASLR), as well as report a specific stop reason. This change eliminates an assertion failure from LLDB for now. MFC r319796: Remove a few unneeded files from libllvm, libclang and liblldb. MFC r319885 (by emaste): lld: ELF: Fix ICF crash on absolute symbol relocations. If two sections contained relocations to absolute symbols with the same value we would crash when trying to access their sections. Add a check that both symbols point to sections before accessing their sections, and treat absolute symbols as equal if their values are equal. Obtained from: LLD commit r292578 MFC r319918: Revert r319796 for now, it can cause undefined references when linking in some circumstances. Reported by: Shawn Webb <shawn.webb@hardenedbsd.org> MFC r319957 (by emaste): lld: Add armelf emulation mode Obtained from: LLD r305375 MFC r321369: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 5.0.0 (trunk r308421). Upstream has branched for the 5.0.0 release, which should be in about a month. Please report bugs and regressions, so we can get them into the release. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. MFC r321420: Add a few more object files to liblldb, which should solve errors when linking the lldb executable in some cases. In particular, when the -ffunction-sections -fdata-sections options are turned off, or ineffective. Reported by: Shawn Webb, Mark Millard MFC r321433: Cleanup stale Options.inc files from the previous libllvm build for clang 4.0.0. Otherwise, these can get included before the two newly generated ones (which are different) for clang 5.0.0. Reported by: Mark Millard MFC r321439 (by bdrewery): Move llvm Options.inc hack from r321433 for NO_CLEAN to lib/clang/libllvm. The files are only ever generated to .OBJDIR, not to WORLDTMP (as a sysroot) and are only ever included from a compilation. So using a beforebuild target here removes the file before the compilation tries to include it. MFC r321664: Pull in r308891 from upstream llvm trunk (by Benjamin Kramer): [CodeGenPrepare] Cut off FindAllMemoryUses if there are too many uses. This avoids excessive compile time. The case I'm looking at is Function.cpp from an old version of LLVM that still had the giant memcmp string matcher in it. Before r308322 this compiled in about 2 minutes, after it, clang takes infinite* time to compile it. With this patch we're at 5 min, which is still bad but this is a pathological case. The cut off at 20 uses was chosen by looking at other cut-offs in LLVM for user scanning. It's probably too high, but does the job and is very unlikely to regress anything. Fixes PR33900. * I'm impatient and aborted after 15 minutes, on the bug report it was killed after 2h. Pull in r308986 from upstream llvm trunk (by Simon Pilgrim): [X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914) D35067/rL308322 attempted to support up to 4 load pairs for memcmp inlining which resulted in regressions for some optimized libc memcmp implementations (PR33914). Until we can match these more optimal cases, this patch reduces the memcmp expansion to a maximum of 2 load pairs (which matches what we do for -Os). This patch should be considered for the 5.0.0 release branch as well Differential Revision: https://reviews.llvm.org/D35830 These fix a hang (or extremely long compile time) when building older LLVM ports. Reported by: antoine PR: 219139 MFC r321719: Pull in r309503 from upstream clang trunk (by Richard Smith): PR33902: Invalidate line number cache when adding more text to existing buffer. This led to crashes as the line number cache would report a bogus line number for a line of code, and we'd try to find a nonexistent column within the line when printing diagnostics. This fixes an assertion when building the graphics/champlain port. Reported by: antoine, kwm PR: 219139 MFC r321723: Upgrade our copies of clang, llvm, lld and lldb to r309439 from the upstream release_50 branch. This is just after upstream's 5.0.0-rc1. MFC r322320: Upgrade our copies of clang, llvm and libc++ to r310316 from the upstream release_50 branch. MFC r322326 (by emaste): lldb: Make i386-*-freebsd expression work on JIT path * Enable i386 ABI creation for freebsd * Added an extra argument in ABISysV_i386::PrepareTrivialCall for mmap syscall * Unlike linux, the last argument of mmap is actually 64-bit(off_t). This requires us to push an additional word for the higher order bits. * Prior to this change, ktrace dump will show mmap failures due to invalid argument coming from the 6th mmap argument. Submitted by: Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D34776 MFC r322360 (by emaste): lldb: Report inferior signals as signals, not exceptions, on FreeBSD This is the FreeBSD equivalent of LLVM r238549. This serves 2 purposes: * LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/ SIGFPE the way it is suppose to be handled. Prior to this fix these signals will neither create a coredump, nor exit from the debugger or work for signal handling scenario. * eInvalidCrashReason need not report "unknown crash reason" if we have a valid si_signo llvm.org/pr23699 Patch by Karnajit Wangkhem Differential Revision: https://reviews.llvm.org/D35223 Submitted by: Karnajit Wangkhem Obtained from: LLVM r310591 MFC r322474 (by emaste): lld: Add `-z muldefs` option. Obtained from: LLVM r310757 MFC r322740: Upgrade our copies of clang, llvm, lld and libc++ to r311219 from the upstream release_50 branch. MFC r322855: Upgrade our copies of clang, llvm, lldb and compiler-rt to r311606 from the upstream release_50 branch. As of this version, lib/msun's trig test should also work correctly again (see bug 220989 for more information). PR: 220989 MFC r323112: Upgrade our copies of clang, llvm, lldb and compiler-rt to r312293 from the upstream release_50 branch. This corresponds to 5.0.0 rc4. As of this version, the cad/stepcode port should now compile in a more reasonable time on i386 (see bug 221836 for more information). PR: 221836 MFC r323245: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 5.0.0 release (upstream r312559). Release notes for llvm, clang and lld will be available here soon: <http://releases.llvm.org/5.0.0/docs/ReleaseNotes.html> <http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html> <http://releases.llvm.org/5.0.0/tools/lld/docs/ReleaseNotes.html> Relnotes: yes
* MFC r323355: MFV r323107: 8414 Implemented zpool scrub pause/resumeavg2017-09-2614-98/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@1702cce751c5cb7ead878d0205a6c90b027e3de8 https://github.com/illumos/illumos-gate/commit/1702cce751c5cb7ead878d0205a6c90b027e3de8 FreeBSD note: rather than merging the zpool.8 update I copied the zpool scrub section from the illumos zpool.1m to FreeBSD zpool.8 almost verbatim. Now that the illumos page uses the mdoc format, it was an easier option. Perhaps the change is not in perfect compliance with the FreeBSD style, but I think that it is acceptible. https://www.illumos.org/issues/8414 This issue tracks the port of scrub pause from ZoL: https://github.com/zfsonlinux/zfs/pull/6167 Currently, there is no way to pause a scrub. Pausing may be useful when the pool is busy with other I/O to preserve bandwidth. Description This patch adds the ability to pause and resume scrubbing. This is achieved by maintaining a persistent on-disk scrub state. While the state is 'paused' we do not scrub any more blocks. We do however perform regular scan housekeeping such as freeing async destroyed and deadlist blocks while paused. Motivation and Context Scrub pausing can be an I/O intensive operation and people have been asking for the ability to pause a scrub for a while. This allows one to preserve scrub progress while freeing up bandwidth for other I/O. Reviewed by: George Melikov <mail@gmelikov.ru> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Brad Lewis <brad.lewis@delphix.com> Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@joyent.com> Author: Alek Pinchuk <apinchuk@datto.com>
* MFC r323480: zfs_get_vfs: reference a requested filesystem instead of ↵avg2017-09-261-10/+6
| | | | | | vfs_busy-ing it Sponsored by: Panzura
* Synchronize most of libm with head as of r323004. This excludes a fewdim2017-09-2638-449/+1769
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arch-specific updates for powerpcspe, mips and riscv, for which support has not been merged yet. Bump __FreeBSD_version for the addition of cacoshl, cacosl, casinhl, casinl, catanl, catanhl, sincos, sincosf, and sincosl. MFC r305382 (by bde): Add asm versions of fmod(), fmodf() and fmodl() on amd64. Add asm versions of fmodf() amd fmodl() on i387. fmod is similar to remainder, and the C versions are 3 to 9 times slower than the asm versions on x86 for both, but we had the strange mixture of all 6 variants of remainder in asm and only 1 of 6 variants of fmod in asm. MFC r305384 (by bde): Disconnect the "optimized" asm variants of cos(), sin() and tan() from the build on i386. Leave them in the source tree for regression tests. The asm functions were always much less accurate (by a factor of more than 10**18 in the worst case). They were faster on old CPUs. But with each new generation of CPUs they get relatively slower. The double precision C version's average advantage is about a factor of 2 on Haswell. The asm functions were already intentionally avoided in float and long double precision on i386 and in all precisions on amd64. Float precision and amd64 give larger advantages to the C version. The long double precision C code and compilers' understanding of long double precision are not so good, so the i387 is still slightly faster for long double precision, except for the unimportant subcase of huge args where the sub-optimal C code now somehow beats the i387 by about a factor of 2. MFC r305385 (by bde): Oops, the previous i386 version of e_fmodf.S and e_fmodl.S was actually the amd64 version. MFC r306409 (by emaste): libm: fix some unused variable (rcsid) and dangling else warnings s_{fabs,fmax,logb,scalb}{,f,l}.c may be built elsewhere with a higher WARNS setting. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8061 MFC r306410 (by emaste): libm: simplify i387 subdir logic with make's :S substitution MFC r306527 (by emaste): libm: remove unused variables for LDBL_MANT_DIG != 113 Sponsored by: The FreeBSD Foundation MFC r306709 (by emaste): libm: remove unused variables Sponsored by: The FreeBSD Foundation MFC r307066 (by br): Don't use fmaxl/fminl on platforms with no long double support, use fmax/fmin instead. This fixes fmaxmin test failure on MIPS64. Reviewed by: emaste Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D8216 MFC r308172 (by emaste): libm: add braces around initialization of subobjects This cleans up a warning when building libm at higher WARNS levels and makes the intent more clear. By the C standard the values are assigned to subobject members in order so this change introduces no functional change. (6.7.9 20) Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8333 MFC r313761 (by mmokhi): Add casinl() cacosl() catanl() casinhl() cacoshl() catanhl() APIs to msun to improve C11 conformance. PR: 216850 216851 216852 216856 216857 216858 Submitted by: mmokhi Reported by: sgk@troutmask.apl.washington.edu Reviewed by: bde, mat, theraven Approved by: bde (src committer), mat (mentor) Differential Revision: https://reviews.freebsd.org/D9491 MFC r313863 (by mmokhi): Fix building of r313761 on platforms that `long double` is alias of `double` (MIPS, etc) PR: 216850 216851 216852 216856 216857 216858 Reported by: emsate Reviewed by: bde emaste hselasky Approved by: bde emaste hselasky Differential Revision: https://reviews.freebsd.org/D9491 MFC r313864 (by mmokhi): Add documentations related to new APIs of r313761 PR: 216850 216851 216852 216856 216857 216858 Submitted by: sgk@troutmask.apl.washington.edu Reported by: sgk@troutmask.apl.washington.edu Reviewed by: bde emaste hselasky Approved by: bde emaste hselasky Differential Revision: https://reviews.freebsd.org/D9491 MFC r314950 (by ngie): Don't expect :test_large_inputs to fail with i386 anymore Recent changes (maybe a side-effect of the ATF-ification in r314649) invalidate the failure expectation. PR: 205446 Sponsored by: Dell EMC Isilon MFC r317349 (by pfg): msun: Remove trailing space in Sunsoft copyright statement. Submittedby: kargl MFC r319047 (by mmel): Implement sincos, sincosf, and sincosl. The primary benefit of these functions is that argument reduction is done once instead of twice in independent calls to sin() and cos(). * lib/msun/Makefile: . Add s_sincos[fl].c to the build. . Add sincos.3 documentation. . Add appropriate MLINKS. * lib/msun/Symbol.map: . Expose sincos[fl] symbols in dynamic libm.so. * lib/msun/man/sincos.3: . Documentation for sincos[fl]. * lib/msun/src/k_sincos.h: . Kernel for sincos() function. This merges the individual kernels for sin() and cos(). The merger offered an opportunity to re-arrange the individual kernels for better performance. * lib/msun/src/k_sincosf.h: . Kernel for sincosf() function. This merges the individual kernels for sinf() and cosf(). The merger offered an opportunity to re-arrange the individual kernels for better performance. * lib/msun/src/k_sincosl.h: . Kernel for sincosl() function. This merges the individual kernels for sinl() and cosl(). The merger offered an opportunity to re-arrange the individual kernels for better performance. * lib/msun/src/math.h: . Add prototytpes for sincos[fl](). * lib/msun/src/math_private.h: . Add RETURNV macros. This is needed to reset fpsetprec on I386 hardware for a function with type void. * lib/msun/src/s_sincos.c: . Implementation of sincos() where sin() and cos() were merged into one routine and possibly re-arranged for better performance. * lib/msun/src/s_sincosf.c: . Implementation of sincosf() where sinf() and cosf() were merged into one routine and possibly re-arranged for better performance. * lib/msun/src/s_sincosl.c: . Implementation of sincosl() where sinl() and cosl() were merged into one routine and possibly re-arranged for better performance. PR: 215977, 218300 Submitted by: Steven G. Kargl <sgk@troutmask.apl.washington.edu> Differential Revision: https://reviews.freebsd.org/D10765 MFC r321457 (by ngie): Mark :reduction as an expected failure It fails with clang 5.0+. PR: 220989 Reported by: Jenkins MFC r322418 (by rlibby): lib/msun: avoid referring to broken LDBL_MAX LDBL_MAX is broken on i386: https://lists.freebsd.org/pipermail/freebsd-numerics/2012-September/000288.html Gcc has produced +Infinity for LDBL_MAX on i386 and amd64 with -m32 for some time, and newer versions of gcc are now warning that the "floating constant exceeds range of 'long double'". Avoid this by referring to half the value of LDBL_MAX instead. Reviewed by: bde Approved by: markj (mentor) Sponsored by: Dell EMC Isilon MFC r322435 (by rlibby): Revert r322418, LDBL_MAX_EXP unsuitable for macro pasting on some arches Either need a different way to spell HALF_LDBL_MAX, or a different way to spell LDBL_MAX_EXP, or a different approach. Reported by: ian MFC r322921 (by ngie): Revert r321457 It doesn't fail after ^/head@r322855 (the releng_50 clang merge). PR: 220989
* MFC r323479,r323491: zfs: tighten debug versions of ZTOV and VTOZavg2017-09-263-5/+7
| | | | Sponsored by: Panzura
* MFC r323252:dab2017-09-254-2/+8
| | | | | | | | | | | | | Add a new getty/gettytab capability to generate an initial message dynamically. This modification adds a new gettytab(5) option (iM) to specify a program to run that will generate the initial (banner) message that is displayed before the login prompt. Such a capability is useful when dynamic information is needed in the banner message that cannot be supplied by the set of % substitution sequences available in the "im" option. Sponsored by: Dell EMC
* MFC r317801 (by trasz):dab2017-09-251-36/+36
| | | | | | | Fix markup in gettytab(5). Approved by: vangyzen (mentor) Sponsored by: Dell EMC
* MFC: r323840jkim2017-09-251-4/+0
| | | | Remove an ancient comment about the existence of READ(16)/WRITE(16) for MMC.
* MFC r313107 (by danfe):dab2017-09-252-52/+48
| | | | | | | | | | | | | | | | | | | | | | | Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8) There is one capability explicitly documented in gettytab(5) as stupid: he. And it is indeed. It was meant to facilitate system hostname modification, but is hardly usable in practice because it allows very limited editing (e.g., it depends on a particular hostname length, making it non-generic). Replace it with simple implementation that treats ``he'' as POSIX extended regular expression which is matched against the hostname. If there are no parenthesized subexpressions in the pattern, entire matched string is used as the final hostname. Otherwise, use the first matched subexpression. If the pattern does not match, the original hostname is not modified. Using regex(3) gives more freedom, does not complicate the code very much, and makes a lot more sense, in turn making ``he'' less stupid and actually useful (e.g., it is now possible to obtain node or domain names from the original hostname string, without knowing it in advance). Approved by: vangyzen (mentor) Sponsored by: Dell EMC
* MFC r323676:markj2017-09-242-0/+22
| | | | Implement mmu_page_init for AIM platforms.
* MFC r323655:oshogbo2017-09-231-0/+27
| | | | Add missing links to the nv man page.
* MFC r323654:oshogbo2017-09-231-8/+8
| | | | | | Fix names of the array functions in the nv man page. Submitted by: def@
OpenPOWER on IntegriCloud