summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r265456, r265578:markj2014-08-072-1/+17
| | | | | | | | Add a postinit debugger hook to rtld. This will be used by dtrace(1) to halt the victim process before its entry point is called, at which point probes and DOF data are registered with the kernel. The r_debug_state hook cannot be used for this purpose, as it is called before the program's init routines are invoked and in particular before DOF data is registered (via drti.o).
* MFC r256691, r256748: casuword fixesian2014-08-071-0/+16
| | | | | Use unsigned compare against KERNBASE addr. Use atomic ops on armv6.
* MFC r269347:kib2014-08-072-16/+8
| | | | | Do not generate 1000 unique lock names for nfsrc hash chain locks. Shorten the names of some nfs mutexes.
* MFC r269318:gjb2014-08-071-1/+1
| | | | | | | | Replace 'GNATS' with 'Bugzilla' in the base subversion commit template. Approved by: peter (implicit, original approver) Sponsored by: The FreeBSD Foundation
* MFC of r269303:mckusick2014-08-061-3/+5
| | | | | | | | | | | When restoring a UFS dump onto a ZFS filesystem, an assertion in restore was failing because ZFS was reporting a blocksize that was not a multiple of 1024. Replace restore's failed assertion with code that writes restored files in a blocksize that works for restore (a multiple of 1024) despite being non-optimal for ZFS. Submitted by: Dmitry Morozovsky Tested by: Dmitry Morozovsky
* MFC r269091:wblock2014-08-061-11/+10
| | | | | Fix spelling of Camellia algorithm. While here, replace blank lines between examples with actual .Pp breaks.
* MFC: r269116ache2014-08-061-0/+8
| | | | | | | In the "Too many open files" edge cases don't try to preserve old number for non-std* descriptors, but close old file and retry. Obtained from: inspired by Apple's change from pfg@
* MFC: r268997ache2014-08-061-0/+18
| | | | | | For "a"-mode files and rewind/fseek + fwrite combination return meaningful value now, like Apple does, but avoid their __sflush physical write performance degradation as much as possible.
* MFC r269282: Correct typo in commentemaste2014-08-061-1/+1
| | | | PR: 192231
* MFC: r260457marius2014-08-051-7/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes in r233781 attempted to make logging during a machine check exception more readable. In practice they prevented all logging during a machine check exception on at least some systems. Specifically, when an uncorrected ECC error is detected in a DIMM on a Nehalem/Westmere class machine, all CPUs receive a machine check exception, but only CPUs on the same package as the memory controller for the erroring DIMM log an error. The CPUs on the other package would complete the scan of their machine check banks and panic before the first set of CPUs could log an error. The end result was a clearer display during the panic (no interleaved messages), but a crashdump without any useful info about the error that occurred. To handle this case, make all CPUs spin in the machine check handler once they have completed their scan of their machine check banks until at least one machine check error is logged. I tried using a DELAY() instead so that the CPUs would not potentially hang forever, but that was not reliable in testing. While here, don't clear MCIP from MSR_MCG_STATUS before invoking panic. Only clear it if the machine check handler does not panic and returns to the interrupted thread. MFC: r263113 Correct type for malloc(). Submitted by: "Conrad Meyer" <conrad.meyer@isilon.com> MFC: r269052, r269239, r269242 Intel desktop Haswell CPUs may report benign corrected parity errors (see HSD131 erratum in [1]) at a considerable rate. So filter these (default), unless logging is enabled. Unfortunately, there really is no better way to reasonably implement suppressing these errors than to just skipping them in mca_log(). Given that they are reported for bank 0, they'd need to be masked in MSR_MC0_CTL. However, P6 family processors require that register to be set to either all 0s or all 1s, disabling way more than the one error in question when using all 0s there. Alternatively, it could be masked for the corresponding CMCI, but that still wouldn't keep the periodic scanner from detecting these spurious errors. Apart from that, register contents of MSR_MC0_CTL{,2} don't seem to be publicly documented, neither in the Intel Architectures Developer's Manual nor in the Haswell datasheets. Note that while HSD131 actually is only about C0-stepping as of revision 014 of the Intel desktop 4th generation processor family specification update, these corrected errors also have been observed with D0-stepping aka "Haswell Refresh". 1: http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf Reviewed by: jhb Sponsored by: Bally Wulff Games & Entertainment GmbH
* MFC r269444, r269450:mav2014-08-051-0/+2
| | | | Plug EXTENDED COPY request data memory leak.
* MFC r269442:mav2014-08-051-9/+7
| | | | Fix some bugs in RECEIVE COPY STATUS data.
* MFC r269441:mav2014-08-051-33/+26
| | | | | Add missing comparisons to make list IDs in EXTENDED COPY per-initiator, as they should be. Wrap it into a function to not duplicate the code.
* MFC r269244:kib2014-08-051-16/+25
| | | | Remove one-time use macros which check for the vnode lifecycle.
* MFC r267759, r267761markj2014-08-054-20/+20
| | | | | | | | | | | | | | | | | | | | | | r267759: Fix a couple of bugs on amd64 when fetching probe arguments beyond the first five for probes entered through a UD fault (i.e. FBT probes). Specifically, handle the fact that dtrace_invop_callsite must be 16 byte-aligned and thus may not immediately follow the call to dtrace_invop() in dtrace_invop_start(). Also fetch register arguments and the stack pointer through a struct trapframe instead of a struct reg. r267761: Fix some bugs when fetching probe arguments in i386. Firstly ensure that the 4 byte-aligned dtrace_invop_callsite can be found and that it immediately follows the call to dtrace_invop(). Secondly, fix some pointer arithmetic to account for differences between struct i386_frame and illumos' struct frame. Finally, ensure that dtrace_getarg() isn't inlined. It works by following a fixed number of frame pointers to the probe site, so inlining breaks it. PR: 191260
* MFC r268584:markj2014-08-052-1/+3
| | | | Add a headphone redirection quirk for the Lenovo G580.
* MFC r267706:markj2014-08-051-16/+17
| | | | | | Allow creation of SDT probes from a module in which no providers are defined. This ensures that the sdt:zfs:: probes appear despite the fact the sdt provider is defined in the kernel rather than in zfs.ko.
* MFC r256822:markj2014-08-042-2/+35
| | | | | | | | | When fetching function arguments out of a frame on amd64, explicitly select the register based on the argument index rather than relying on the fields in struct reg to be in the right order. This assumption is incorrect on FreeBSD and generally led to bogus argument values for the sixth argument of PID and USDT probes; the first five are passed directly to dtrace_probe() via the fasttrap trap handler and so were correctly handled.
* MFC r256571:markj2014-08-045-1/+55
| | | | | | | | | | | | | | | | | | | | | | | 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().
* MFC r269125:dim2014-08-042-12/+17
| | | | | | | | | | | | | | | | In r232153, libarchive 3.0.3 was imported, replacing the archive_hash.h header with archive_crypto_private.h, and its ARCHIVE_HASH_xxx macros were renamed to ARCHIVE_CRYPTO_xxx. Rename these macros in lib/libarchive/config_freebsd.h, to re-enable the hashes for libarchive again. This affects the mtree format writer, and the xar format reader and writer modules. This also requires changes in the library order for statically linking rescue, otherwise ld would complain about redefined symbols. Thanks to jkim for pointing out the solution. Reviewed by: kientzle
* MFC r269289, r269290, r269291, r269292, r269293:gjb2014-08-045-5/+5
| | | | | | | | | | | | | | | | | | | r269289: sort(1): Remove trailing '.' from See Also section. r269290: acpi_wmi(4): Remove trailing comma from standalone Xref. r269291: hptiop(4): Remove trailing comma from ending Xref. r269292: pf.conf(5): Remove trailing comma from ending Xref. r269293: kernel_mount(9): Remove trailing comma from ending Xref. Sponsored by: The FreeBSD Foundation
* MFC r269190:kib2014-08-042-1/+4
| | | | | For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in dirty page, which is written by the process.
* MFC r269189:kib2014-08-042-4/+3
| | | | Initialize zfs vnode v_hash when the vnode is allocated.
* MFC r269187:kib2014-08-041-0/+4
| | | | | Assert that nullfs vnode has VV_ROOT set whenever lower vnode has. Assert that dotdot lookup on the root vnode is not performed.
* MFC r268945:pfg2014-08-041-1/+0
| | | | | | | | | | | | | | | | | | Fix hdestroy() compliance issue. The hcreate(3) implementation and related functions we inherited from NetBSD used to free() the key value, something that is not supported by the standard implementation. This would cause a segmentation fault when attempting to run the examples from the opengroup and linux manpages. There is no need to bump the __FreeBSD_version as we have always claimed XPG4.2 compliance but if some reference is required, the bump for r269484 can be used. Reference: http://bugs.dragonflybsd.org/issues/1398
* Insta-MFC r269489: partial revert of r262867 which was MFC'ed as r263820.peter2014-08-031-1/+1
| | | | | Don't ignore sndbuf/rcvbuf limits for SOCK_DGRAM sockets. This appears to be an edit error or patch fuzz mismatch.
* MFC r268066:pfg2014-08-033-3/+26
| | | | | | | | | | | | | | | | | | | regex(3): Add support for \< and \> word delimiters Solaris and other OSs have support for \< and \> as word delimiters in utilities like sed(1). These are useful to have for general compatiblity with Solaris but should be avoided for portability with other systems, including the traditional BSDs. Bump __FreeBSD_version as this is likely to affect some userland utilities. Reference: https://www.illumos.org/issues/516 PR: bin/153257 Obtained from: Illumos
* MFC r269124:pfg2014-08-031-37/+46
| | | | | | | | | | | | strftime() xlocale cleanups. Replace fprintf_l with fputs when output is unformatted. Use locale_t in _conv() since it was using sprintf (now sprintf_l) Use locale_t on _yconv() since it calls _conv() Obtained from: Apple Inc. (Libc 997.90.3) CR: D482 Reviewed by: theraven
* MFC r268926, r268930, r268983:pfg2014-08-035-7/+13
| | | | | | | | | | | | Use a correct errno in freopen. Use EBADF instead of EINVAL when working around incorrect O_ACCMODE. Adjust errno on failed prepwrite. rewind: always clear error indicator as required by POSIX. Obtained from: Apple Inc. (Libc 997.90.3) Phabric: D442
* MFC r268867, r268878:pfg2014-08-031-1/+2
| | | | | | Use more consistent type for optlen in getsourcefilter() Proposed by: bde
* MFC 268986; fix file system corruption by creating as many BIOs as neededmarcel2014-08-031-158/+177
| | | | | | to satisfy the original request -- in other words: no short reads. Obtained from: Juniper Networks, Inc.
* MFC 264164: Convert while copying in control messages.marcel2014-08-031-32/+75
| | | | Obtained from: Juniper Networks, Inc.
* MFC 264162: Accept RFC 2292 option values so that RFC 2292 compliantmarcel2014-08-031-6/+18
| | | | | | programs that are unaware of RFC 3542 can construct control messages. Obtained from: Juniper Networks, Inc.
* MFC 264161: Handle the fact that the getlogin_basic() function can returnmarcel2014-08-031-3/+8
| | | | | | a 0 status with a NULL pointer for the login name (result). Obtained from: Juniper Networks, Inc.
* MFC: r268273rmacklem2014-08-031-2/+4
| | | | | | | | | | | | The new NFSv3 server did not generate directory postop attributes for the reply to ReaddirPlus when the server failed within the loop that calls VFS_VGET(). This failure is most likely an error return from VFS_VGET() caused by a bogus d_fileno that was truncated to 32bits. This patch fixes the server so that it will return directory postop attributes for the failure. It does not fix the underlying issue caused by d_fileno being uint32_t when a file system like ZFS generates a fileno that is greater than 32bits.
* MFC 259910, 260023, 260028, 260600 & 260701:marcel2014-08-021-75/+158
| | | | | | | | o Fix "kptdir is itself virtual" error, caused by having the kptdir in PBVM. o Allow building a cross libkvm for ia64. o Add support for virtual cores (aka minidumps). o We don't have to worry about page sizes when working on virtual cores. o Handle truncation of the size returned by _kvm_kvatop().
* MFC r269139:hselasky2014-08-022-22/+22
| | | | | Split the XHCI TRB allocations into smaller parts, so that we don't end up allocating contiguous busdma buffers above PAGE_SIZE bytes.
* Partial MFC of r267961, r267973, r267985, r267992, r267993 and r268005:hselasky2014-08-022-13/+22
| | | | | Backport some macro definitions to make backporting code from FreeBSD current easier.
* MFC: r268866rmacklem2014-08-021-2/+2
| | | | | | r243637 changed the default number of nfsd threads created, but the man page did not reflect this. This is a content change.
* Define both ttyu0 and ttyu1 as onifconsole. This is ideal for ia64marcel2014-08-021-2/+2
| | | | where the console can be on either, depending on the platform.
* MFC r269123:mav2014-08-021-3/+88
| | | | | | | | | | | | | Implement separate I/O dispatch method for ZVOLs in "dev" mode. Unlike disk devices ZVOLs process all requests synchronously. That makes impossible sending multiple requests to them from single thread. From the other side ZVOLs have real d_read/d_write methods, which unlike d_strategy can handle uio scatter/gather and have no strict I/O size limitations. So, if ZVOL in "dev" mode is detected, use of d_read/d_write methods instead of d_strategy allows to avoid pointless splitting of large requests into MAXPHYS (128K) sized chunks.
* MFC r268865: MFV r268852:delphij2014-08-027-17/+130
| | | | | | | | | | | | | Reduce lock contention on the z_teardown_lock under heavily cached read workload by splitting the single teardown rrw lock into RRM_NUM_LOCKS (17) of them. Read acquisitions are randomly distributed among these locks based on curthread pointer. Write acquisitions are going to all the locks, which for the usage of this type of lock should be rare. Illumos issue: 5008 lock contention (rrw_exit) while running a read only load
* MFC r268859: MFV r268851:delphij2014-08-025-6/+44
| | | | | | | | | When a sync task is waiting for a txg to complete, we should hurry it along by increasing the number of outstanding async writes (i.e. make vdev_queue_max_async_writes() return a larger number). Illumos issue: 4753 increase number of outstanding async writes when sync task is waiting
* MFC r268858: MFV r268850:delphij2014-08-023-81/+64
| | | | | | | | | | | | | | | Change the interaction between the DMU and ARC so that when the DMU is shutting down an objset, we do not evict the data from the ARC. Instead we simply coordinate the destruction of the DMU's data with the ARC. The only case where we actually need to explicitly evict from the ARC is when dbuf_rele_and_unlock() determines that the administrator has requested that it not be kept in memory, via the primarycache/secondarycache properties. In this case, we evict the data from the ARC by its blkptr_t, the same way as when a block is freed we explicitly evict it from the ARC. Illumos issue: 4631 zvol_get_stats triggering too many reads
* MFC r268855: MFV r268848:delphij2014-08-028-45/+130
| | | | | | | | | | | | | | | | | | 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
* MFC r258436: Refactor amd64 startup SMAP parsingemaste2014-08-011-33/+44
| | | | | | Extracted from the projects/uefi branch, this change is a reasonable cleanup and will reduce the diffs to review when bringing in the UEFI work.
* Add an UPDATING entry for the __FreeBSD_version bump relatedrmacklem2014-08-011-0/+5
| | | | to r269398.
* Bump __FreeBSD_version for r269398, since it changes thermacklem2014-08-011-1/+1
| | | | | internal interfaces between the NFS related modules. This is a direct commit to stable/10.
* MFC r266902: Add missing libexec/bsdconfig subdirectoriesemaste2014-08-011-0/+4
|
* MFC: r268115rmacklem2014-08-0124-333/+2694
| | | | | | | | Merge the NFSv4.1 server code in projects/nfsv4.1-server over into head. The code is not believed to have any effect on the semantics of non-NFSv4.1 server behaviour. It is a rather large merge, but I am hoping that there will not be any regressions for the NFS server.
OpenPOWER on IntegriCloud