]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC r265456, r265578:
markj [Thu, 7 Aug 2014 18:36:47 +0000 (18:36 +0000)]
MFC r265456, r265578:
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).

git-svn-id: svn://svn.freebsd.org/base/stable/10@269680 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r256691, r256748: casuword fixes
ian [Thu, 7 Aug 2014 17:49:42 +0000 (17:49 +0000)]
MFC r256691, r256748: casuword fixes

  Use unsigned compare against KERNBASE addr.
  Use atomic ops on armv6.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269679 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269347:
kib [Thu, 7 Aug 2014 03:50:30 +0000 (03:50 +0000)]
MFC r269347:
Do not generate 1000 unique lock names for nfsrc hash chain locks.
Shorten the names of some nfs mutexes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269655 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269318:
gjb [Thu, 7 Aug 2014 02:26:45 +0000 (02:26 +0000)]
MFC r269318:
  Replace 'GNATS' with 'Bugzilla' in the base subversion commit
  template.

Approved by: peter (implicit, original approver)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@269654 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC of r269303:
mckusick [Wed, 6 Aug 2014 23:33:16 +0000 (23:33 +0000)]
MFC of r269303:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269091:
wblock [Wed, 6 Aug 2014 17:38:35 +0000 (17:38 +0000)]
MFC r269091:

Fix spelling of Camellia algorithm.  While here, replace blank lines
between examples with actual .Pp breaks.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269632 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r269116
ache [Wed, 6 Aug 2014 10:38:06 +0000 (10:38 +0000)]
MFC: r269116

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@

git-svn-id: svn://svn.freebsd.org/base/stable/10@269624 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r268997
ache [Wed, 6 Aug 2014 10:33:43 +0000 (10:33 +0000)]
MFC: r268997

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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269282: Correct typo in comment
emaste [Wed, 6 Aug 2014 00:35:32 +0000 (00:35 +0000)]
MFC r269282: Correct typo in comment

PR: 192231

git-svn-id: svn://svn.freebsd.org/base/stable/10@269619 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r260457
marius [Tue, 5 Aug 2014 16:04:22 +0000 (16:04 +0000)]
MFC: r260457

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269592 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269444, r269450:
mav [Tue, 5 Aug 2014 08:30:38 +0000 (08:30 +0000)]
MFC r269444, r269450:
Plug EXTENDED COPY request data memory leak.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269574 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269442:
mav [Tue, 5 Aug 2014 08:29:24 +0000 (08:29 +0000)]
MFC r269442:
Fix some bugs in RECEIVE COPY STATUS data.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269572 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269441:
mav [Tue, 5 Aug 2014 08:28:29 +0000 (08:28 +0000)]
MFC r269441:
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269570 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269244:
kib [Tue, 5 Aug 2014 05:00:22 +0000 (05:00 +0000)]
MFC r269244:
Remove one-time use macros which check for the vnode lifecycle.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269562 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267759, r267761
markj [Tue, 5 Aug 2014 01:53:15 +0000 (01:53 +0000)]
MFC r267759, r267761

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269557 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268584:
markj [Tue, 5 Aug 2014 01:03:10 +0000 (01:03 +0000)]
MFC r268584:
Add a headphone redirection quirk for the Lenovo G580.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267706:
markj [Tue, 5 Aug 2014 00:25:46 +0000 (00:25 +0000)]
MFC r267706:
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r256822:
markj [Mon, 4 Aug 2014 21:41:00 +0000 (21:41 +0000)]
MFC r256822:
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269531 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r256571:
markj [Mon, 4 Aug 2014 15:36:22 +0000 (15:36 +0000)]
MFC r256571:
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().

git-svn-id: svn://svn.freebsd.org/base/stable/10@269520 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269125:
dim [Mon, 4 Aug 2014 14:56:49 +0000 (14:56 +0000)]
MFC r269125:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269289, r269290, r269291, r269292, r269293:
gjb [Mon, 4 Aug 2014 03:59:48 +0000 (03:59 +0000)]
MFC r269289, r269290, r269291, r269292, r269293:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269498 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269190:
kib [Mon, 4 Aug 2014 01:14:27 +0000 (01:14 +0000)]
MFC r269190:
For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in
dirty page, which is written by the process.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269495 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269189:
kib [Mon, 4 Aug 2014 01:12:49 +0000 (01:12 +0000)]
MFC r269189:
Initialize zfs vnode v_hash when the vnode is allocated.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269494 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269187:
kib [Mon, 4 Aug 2014 01:10:47 +0000 (01:10 +0000)]
MFC r269187:
Assert that nullfs vnode has VV_ROOT set whenever lower vnode has.
Assert that dotdot lookup on the root vnode is not performed.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269493 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268945:
pfg [Mon, 4 Aug 2014 00:51:57 +0000 (00:51 +0000)]
MFC r268945:
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269491 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoInsta-MFC r269489: partial revert of r262867 which was MFC'ed as r263820.
peter [Sun, 3 Aug 2014 22:59:47 +0000 (22:59 +0000)]
Insta-MFC r269489: partial revert of r262867 which was MFC'ed as r263820.
Don't ignore sndbuf/rcvbuf limits for SOCK_DGRAM sockets.  This appears
to be an edit error or patch fuzz mismatch.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269490 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268066:
pfg [Sun, 3 Aug 2014 18:39:11 +0000 (18:39 +0000)]
MFC r268066:
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269124:
pfg [Sun, 3 Aug 2014 18:31:52 +0000 (18:31 +0000)]
MFC r269124:
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269483 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268926, r268930, r268983:
pfg [Sun, 3 Aug 2014 18:28:10 +0000 (18:28 +0000)]
MFC r268926, r268930, r268983:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268867, r268878:
pfg [Sun, 3 Aug 2014 18:03:00 +0000 (18:03 +0000)]
MFC r268867,  r268878:

Use more consistent type for optlen in getsourcefilter()

Proposed by: bde

git-svn-id: svn://svn.freebsd.org/base/stable/10@269480 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 268986; fix file system corruption by creating as many BIOs as needed
marcel [Sun, 3 Aug 2014 03:06:00 +0000 (03:06 +0000)]
MFC 268986; fix file system corruption by creating as many BIOs as needed
to satisfy the original request -- in other words: no short reads.

Obtained from: Juniper Networks, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269456 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 264164: Convert while copying in control messages.
marcel [Sun, 3 Aug 2014 02:37:33 +0000 (02:37 +0000)]
MFC 264164: Convert while copying in control messages.

Obtained from: Juniper Networks, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269455 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 264162: Accept RFC 2292 option values so that RFC 2292 compliant
marcel [Sun, 3 Aug 2014 02:24:52 +0000 (02:24 +0000)]
MFC 264162: Accept RFC 2292 option values so that RFC 2292 compliant
programs that are unaware of RFC 3542 can construct control messages.

Obtained from: Juniper Networks, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269454 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 264161: Handle the fact that the getlogin_basic() function can return
marcel [Sun, 3 Aug 2014 01:51:48 +0000 (01:51 +0000)]
MFC 264161: Handle the fact that the getlogin_basic() function can return
a 0 status with a NULL pointer for the login name (result).

Obtained from: Juniper Networks, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269453 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r268273
rmacklem [Sun, 3 Aug 2014 00:35:10 +0000 (00:35 +0000)]
MFC: r268273
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269452 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 259910, 260023, 260028, 260600 & 260701:
marcel [Sat, 2 Aug 2014 22:25:24 +0000 (22:25 +0000)]
MFC 259910, 260023, 260028, 260600 & 260701:
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().

git-svn-id: svn://svn.freebsd.org/base/stable/10@269449 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269139:
hselasky [Sat, 2 Aug 2014 21:01:58 +0000 (21:01 +0000)]
MFC r269139:
Split the XHCI TRB allocations into smaller parts, so that we don't
end up allocating contiguous busdma buffers above PAGE_SIZE bytes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269447 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoPartial MFC of r267961, r267973, r267985, r267992, r267993 and r268005:
hselasky [Sat, 2 Aug 2014 20:58:46 +0000 (20:58 +0000)]
Partial MFC of r267961, r267973, r267985, r267992, r267993 and r268005:
Backport some macro definitions to make backporting code from FreeBSD
current easier.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269446 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r268866
rmacklem [Sat, 2 Aug 2014 20:06:36 +0000 (20:06 +0000)]
MFC: r268866
r243637 changed the default number of nfsd threads created,
but the man page did not reflect this.
This is a content change.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269443 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDefine both ttyu0 and ttyu1 as onifconsole. This is ideal for ia64
marcel [Sat, 2 Aug 2014 15:05:23 +0000 (15:05 +0000)]
Define both ttyu0 and ttyu1 as onifconsole. This is ideal for ia64
where the console can be on either, depending on the platform.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269432 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269123:
mav [Sat, 2 Aug 2014 06:56:00 +0000 (06:56 +0000)]
MFC r269123:
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269429 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268865: MFV r268852:
delphij [Sat, 2 Aug 2014 04:06:35 +0000 (04:06 +0000)]
MFC r268865: MFV r268852:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269419 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268859: MFV r268851:
delphij [Sat, 2 Aug 2014 04:01:44 +0000 (04:01 +0000)]
MFC r268859: MFV r268851:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269418 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268858: MFV r268850:
delphij [Sat, 2 Aug 2014 03:59:35 +0000 (03:59 +0000)]
MFC r268858: MFV r268850:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269417 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268855: MFV r268848:
delphij [Sat, 2 Aug 2014 03:56:06 +0000 (03:56 +0000)]
MFC r268855: MFV r268848:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269416 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r258436: Refactor amd64 startup SMAP parsing
emaste [Fri, 1 Aug 2014 21:40:42 +0000 (21:40 +0000)]
MFC r258436: Refactor amd64 startup SMAP parsing

  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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269402 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoAdd an UPDATING entry for the __FreeBSD_version bump related
rmacklem [Fri, 1 Aug 2014 21:28:58 +0000 (21:28 +0000)]
Add an UPDATING entry for the __FreeBSD_version bump related
to r269398.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269401 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoBump __FreeBSD_version for r269398, since it changes the
rmacklem [Fri, 1 Aug 2014 21:24:19 +0000 (21:24 +0000)]
Bump __FreeBSD_version for r269398, since it changes the
internal interfaces between the NFS related modules.
This is a direct commit to stable/10.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269400 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r266902: Add missing libexec/bsdconfig subdirectories
emaste [Fri, 1 Aug 2014 21:14:02 +0000 (21:14 +0000)]
MFC r266902: Add missing libexec/bsdconfig subdirectories

git-svn-id: svn://svn.freebsd.org/base/stable/10@269399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r268115
rmacklem [Fri, 1 Aug 2014 21:10:41 +0000 (21:10 +0000)]
MFC: r268115
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269398 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 256657,257423,264837,267559:
jhb [Fri, 1 Aug 2014 21:00:18 +0000 (21:00 +0000)]
MFC 256657,257423,264837,267559:
Sync vmrun.sh with HEAD:
- Add -e option to vmrun.sh passed to bhyveload(8) to set loader
  environment variables.
- Stop passing unused -I option to bhyve(8).
- Reformat the usage to fit in 80 colums and other cleanups.
- Add -C option to specify the console device.
- Add -H option to pass a host path to bhyveload(8).
- Support for multiple disk and tap devices.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269397 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268780
truckman [Fri, 1 Aug 2014 15:04:46 +0000 (15:04 +0000)]
MFC r268780

Nuke the never-used RF_TIMESHARE feature, reducing the complexity of the
code.  The consensus on arch@ is that this feature might have been useful
in the distant past, but is now just unnecessary bloat.

The int_rman_activate_resource() and int_rman_deactivate_resource()
functions become trivial, so manually inline them.

The special deferred handling of RF_ACTIVE is no longer needed in
reserve_resource_bound(), so eliminate the associated code at the
end of the function.

These changes reduce the object file size by more than 500 bytes on i386.

Update the rman.9 man page to reflect the removal of the RF_TIMESHARE
feature.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269383 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269205:
kib [Fri, 1 Aug 2014 04:05:13 +0000 (04:05 +0000)]
MFC r269205:
Simplify the expression.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269367 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269106:
np [Thu, 31 Jul 2014 23:09:22 +0000 (23:09 +0000)]
MFC r269106:

Add a 'raw' parameter to the 'modinfo' subcommand.  This is handy when
trying to figure out why a QSFP+/SFP+ connector or cable wasn't
identified correctly by cxgbe(4).  Its output looks like this:

# cxgbetool t5nex0 modinfo 0 raw
00:  03 04 21 00  00 00 00 00  ..!. ....
08:  04 00 00 00  67 00 00 00  .... g...
10:  00 00 05 00  41 6d 70 68  .... Amph
18:  65 6e 6f 6c  20 20 20 20  enol
20:  20 20 20 20  00 41 50 48       .APH
28:  35 37 31 35  34 30 30 30  5715 4000
30:  33 20 20 20  20 20 20 20  3
38:  4b 20 20 20  01 00 00 fa  K    ....
40:  00 00 00 00  41 50 46 31  .... APF1
48:  30 30 34 30  30 33 30 30  0040 0300
50:  30 33 20 20  31 30 30 31  03   1001
58:  33 30 20 20  00 00 00 97  30   ....

git-svn-id: svn://svn.freebsd.org/base/stable/10@269357 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268971 and r269032.
np [Thu, 31 Jul 2014 23:04:41 +0000 (23:04 +0000)]
MFC r268971 and r269032.

r268971:
Simplify r267600, there's no need to distinguish between allocated and
inlined mbufs.

r269032:
cxgbe(4):  Keep track of the clusters that have to be freed by the
custom free routine (rxb_free) in the driver.  Fail MOD_UNLOAD with
EBUSY if any such cluster has been handed up to the kernel but hasn't
been freed yet.  This prevents a panic later when the cluster finally
needs to be freed but rxb_free is gone from the kernel.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269356 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r264434:
markj [Thu, 31 Jul 2014 17:10:03 +0000 (17:10 +0000)]
MFC r264434:
DTrace's pid provider works by inserting breakpoint instructions at probe
sites and installing a hook at the kernel's trap handler. The fasttrap code
will emulate the overwritten instruction in some common cases, but otherwise
copies it out into some scratch space in the traced process' address space
and ensures that it's executed after returning from the trap.

In Solaris and illumos, this (per-thread) scratch space comes from some
reserved space in TLS, accessible via the fs segment register. This
approach is somewhat unappealing on FreeBSD since it would require some
modifications to rtld and jemalloc (for static TLS) to ensure that TLS is
executable, and would thus introduce dependencies on their implementation
details. I think it would also be impossible to safely trace static binaries
compiled without these modifications.

This change implements the functionality in a different way, by having
fasttrap map pages into the target process' address space on demand. Each
page is divided into 64-byte chunks for use by individual threads, and
fasttrap's process descriptor struct has been extended to keep track of
any scratch space allocated for the corresponding process.

With this change it's possible to trace all libc functions in a program,
e.g. with

  pid$target:libc.so.*::entry {@[probefunc] = count();}

Previously this would generally cause the victim process to crash, as
tracing memcpy on amd64 requires the functionality described above.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269342 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 268931:
wblock [Thu, 31 Jul 2014 14:53:07 +0000 (14:53 +0000)]
MFC 268931:

Correct spelling errors in ctld.8.  While here, correct similar errors
in ctl.conf.5 and fix a couple of contractions.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269334 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268300:
rpaulo [Thu, 31 Jul 2014 07:27:59 +0000 (07:27 +0000)]
MFC r268300:

 bsd.dep.mk: add support for generating DTrace header files from .d
 files.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268808:
mav [Wed, 30 Jul 2014 07:21:30 +0000 (07:21 +0000)]
MFC r268808:
Increase maximal number of SCSI ports in CTL from 32 to 128.

After I gave each iSCSI target its own port, the old limit appeared to be
not so big.  This change almost proportionally increases per-LUN memory
use, but it is still three times better then it was before r268807.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268807:
mav [Wed, 30 Jul 2014 07:20:36 +0000 (07:20 +0000)]
MFC r268807:
Reduce per-LUN memory usage from 18MB to 1.8MB.

CTL never had use for CA support code since SPI has gone, and there is no
even frontends supporting that.  But it still was reserving 256 bytes of
memory per LUN per every possible initiator on every possible port.

Wrap unused code with ifdef's in case somebody ever need it.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269297 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268767:
mav [Wed, 30 Jul 2014 07:18:32 +0000 (07:18 +0000)]
MFC r268767:
Add support for VMWare dialect of EXTENDED COPY command, aka VAAI Clone.

This allows to clone VMs and move them between LUNs inside one storage
host without generating extra network traffic to the initiator and back,
and without being limited by network bandwidth.

LUNs participating in copy operation should have UNIQUE NAA or EUI IDs set.
For LUNs without these IDs VMWare will use traditional copy operations.

Beware: the above LUN IDs explicitly set to values non-unique from the VM
cluster point of view may cause data corruption if wrong LUN is addressed!

Sponsored by: iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269296 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268581:
mav [Wed, 30 Jul 2014 07:16:08 +0000 (07:16 +0000)]
MFC r268581:
Merge several equal serialization indexes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269295 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269149:
mav [Wed, 30 Jul 2014 07:08:59 +0000 (07:08 +0000)]
MFC r269149:
Fix several cases of NULL dereference when INQUIRY sent to absent LUN.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269294 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269160:
kib [Wed, 30 Jul 2014 04:03:59 +0000 (04:03 +0000)]
MFC r269160:
Remove man page for non-existent VOPs.

MFC r269240 (by pluknet):
Add VOP_GETVOBJECT.9 to obsolete files, un-xref.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269286 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269159:
kib [Wed, 30 Jul 2014 04:00:23 +0000 (04:00 +0000)]
MFC r269159:
Correct the locking statement.

MFC r269161:
Explicitely mention that inactivated or reclaimed vnode is locked
exclusively.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269285 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268765:
kib [Wed, 30 Jul 2014 03:58:29 +0000 (03:58 +0000)]
MFC r268765:
Remove unused header.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269284 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268764:
kib [Wed, 30 Jul 2014 03:56:17 +0000 (03:56 +0000)]
MFC r268764:
Check for the cross-device cross-link attempt in the VFS, instead of
VOP_LINK() implemenations.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269283 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265276:
markj [Tue, 29 Jul 2014 22:29:31 +0000 (22:29 +0000)]
MFC r265276:
Fix a typo.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r264435:
markj [Tue, 29 Jul 2014 22:26:41 +0000 (22:26 +0000)]
MFC r264435:
Ensure that all eight syscall arguments are available to dtrace_probe(),
rather than just the first five.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269272 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268929:
hselasky [Tue, 29 Jul 2014 22:05:33 +0000 (22:05 +0000)]
MFC r268929:
Add new device ID.

PR: 191959

git-svn-id: svn://svn.freebsd.org/base/stable/10@269270 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269127:
hselasky [Tue, 29 Jul 2014 21:59:24 +0000 (21:59 +0000)]
MFC r269127:
Fix for division by zero.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r264486:
markj [Tue, 29 Jul 2014 21:21:16 +0000 (21:21 +0000)]
MFC r264486:
Use the correct format specifiers for wide characters and strings of wide
characters.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269263 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268446:
markj [Tue, 29 Jul 2014 21:15:26 +0000 (21:15 +0000)]
MFC r268446:
Fix a typo.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269260 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r268726
rmacklem [Tue, 29 Jul 2014 21:05:51 +0000 (21:05 +0000)]
MFC: r268726
Move the "retry:" label so that the calls to m_pullup() are
not done after the call to m_defrag(). This fixes a problem
where m_pullup() would prepend an mbuf to the list created
by m_defrag() making the chain greater than 32 again.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH (r266114, r266138): upgrade to latest ldns and unbound
des [Tue, 29 Jul 2014 20:57:38 +0000 (20:57 +0000)]
MFH (r266114, r266138): upgrade to latest ldns and unbound
MFH (r266139-r266143, r266145, r266149, r266150): fix props
MFH (r266179, r266180, r266193, r266238, r266777): misc cleanup
MFH (r266863): create and use /var/unbound/conf.d
MFH (r268839): import unblock-lan-zones patch from upstream
MFH (r268840): fix reverse lookups on private networks
MFH (r268883): avoid spamming source tree during build

PR: 190739 (for r268883)

git-svn-id: svn://svn.freebsd.org/base/stable/10@269257 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r264363:
markj [Tue, 29 Jul 2014 20:37:22 +0000 (20:37 +0000)]
MFC r264363:
Update the SDT(9) example to reflect the removal of the sname parameter
in r258622.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r263329:
markj [Tue, 29 Jul 2014 20:33:18 +0000 (20:33 +0000)]
MFC r263329:
Only invoke fasttrap hooks for traps from user mode, and ensure that they're
called with interrupts enabled. Calling fasttrap_pid_probe() with interrupts
disabled can lead to deadlock if fasttrap writes to the process' address
space.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269253 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r262669:
markj [Tue, 29 Jul 2014 18:31:27 +0000 (18:31 +0000)]
MFC r262669:
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269245 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r269051
marius [Tue, 29 Jul 2014 13:11:37 +0000 (13:11 +0000)]
MFC: r269051

Copying pages via temporary mappings in the !DMAP case of pmap_copy_pages()
involves updating the corresponding page tables followed by accesses to the
pages in question. This sequence is subject to the situation exactly described
in the "AMD64 Architecture Programmer's Manual Volume 2: System Programming"
rev. 3.23, "7.3.1 Special Coherency Considerations" [1, p. 171 f.]. Therefore,
issuing the INVLPG right after modifying the PTE bits is crucial (see also
r269050, MFCed to stable/10 in r269235).
For the amd64 PMAP code, the order of instructions was already correct. The
above fact still is worth documenting, though.

1: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf

Reviewed by: alc
Sponsored by: Bally Wulff Games & Entertainment GmbH

git-svn-id: svn://svn.freebsd.org/base/stable/10@269238 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r269050
marius [Tue, 29 Jul 2014 13:08:37 +0000 (13:08 +0000)]
MFC: r269050

- Copying and zeroing pages via temporary mappings involves updating the
  corresponding page tables followed by accesses to the pages in question.
  This sequence is subject to the situation exactly described in the "AMD64
  Architecture Programmer's Manual Volume 2: System Programming" rev. 3.23,
  "7.3.1 Special Coherency Considerations" [1, p. 171 f.]. Therefore, issuing
  the INVLPG right after modifying the PTE bits is crucial.
  For pmap_copy_page(), this has been broken in r124956 and later on carried
  over to pmap_copy_pages() derived from the former, while all other places
  in the i386 PMAP code use the correct order of instructions in this regard.
  Fixing the latter breakage solves the problem of data corruption seen with
  unmapped I/O enabled when running at least bare metal on AMD R-268D APUs.
  However, this might also fix similar corruption reported for virtualized
  environments.
- In pmap_copy_pages(), correctly set the cache bits on the source page being
  copied. This change is thought to be a NOP for the real world, though. [2]

1: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf

Submitted by: kib [2]
Reviewed by: alc, kib
Sponsored by: Bally Wulff Games & Entertainment GmbH

git-svn-id: svn://svn.freebsd.org/base/stable/10@269235 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269122:
mav [Tue, 29 Jul 2014 07:40:14 +0000 (07:40 +0000)]
MFC r269122:
Fix infinite loop, when doing WRITE SAME on file-backed LUN.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269226 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268727 (by delphij):
pluknet [Tue, 29 Jul 2014 07:36:38 +0000 (07:36 +0000)]
MFC r268727 (by delphij):

Add a bandaid to fix GCC build (on sparc64 et al).

git-svn-id: svn://svn.freebsd.org/base/stable/10@269225 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268979:
delphij [Tue, 29 Jul 2014 06:00:16 +0000 (06:00 +0000)]
MFC r268979:

Don't save entropy inside jails.

As of r126744, we no longer feed the entropy device in jails upon
start, and collecting them is no longer useful.

PR: conf/126744
Submitted by: Eugene Grosbein <eugen grosbein net> (with minor changes)
Approved by: so (des)

git-svn-id: svn://svn.freebsd.org/base/stable/10@269220 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268720: MFV r268714:
delphij [Tue, 29 Jul 2014 05:49:16 +0000 (05:49 +0000)]
MFC r268720: MFV r268714:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@269219 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268713: MFV r268702:
delphij [Tue, 29 Jul 2014 05:41:54 +0000 (05:41 +0000)]
MFC r268713: MFV r268702:

Add missing *_destroy() calls in various places with ZFS.

Illumos issue:
  4975 missing mutex_destroy() calls in zfs

git-svn-id: svn://svn.freebsd.org/base/stable/10@269218 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269088:
trasz [Mon, 28 Jul 2014 22:25:27 +0000 (22:25 +0000)]
MFC r269088:

Fix ctl(4) kldload failure that manifested like this:

link_elf_obj: symbol icl_pdu_new_bhs undefined

PR: 192031
Submitted by: Nils Beyer (earlier version)
Sponsored by: FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@269202 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC of R267935: Sync the E1000 shared code to Intel internal, and
jfv [Mon, 28 Jul 2014 21:11:18 +0000 (21:11 +0000)]
MFC of R267935: Sync the E1000 shared code to Intel internal, and
more importantly add new I218 adapter support to em.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269196 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268236,268264,268524,268646,268802,269021:
marcel [Mon, 28 Jul 2014 02:07:16 +0000 (02:07 +0000)]
MFC r268236,268264,268524,268646,268802,269021:
This brings VHD support to mkimg(1); both dynamic and fixed file formats.
Dynamic VHD and VMDK file images are now sparsely written, meaning that
"free" sectors do not occupy space.

Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@269177 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268766:
kib [Mon, 28 Jul 2014 01:25:49 +0000 (01:25 +0000)]
MFC r268766:
Do not ignore error from tmpfs_alloc_vp().

git-svn-id: svn://svn.freebsd.org/base/stable/10@269176 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268617:
kib [Mon, 28 Jul 2014 01:23:59 +0000 (01:23 +0000)]
MFC r268617:
Rework the tmpfs unmount.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269175 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268615:
kib [Mon, 28 Jul 2014 01:21:02 +0000 (01:21 +0000)]
MFC r268615:
Add OBJ_TMPFS_NODE flag.

MFC r268616:
Set the OBJ_TMPFS_NODE flag for vm_object of VREG tmpfs node.

MFC r269053:
Correct assertion. tmpfs vm object is always at the bottom of
the shadow chain.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269174 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268614:
kib [Mon, 28 Jul 2014 01:16:07 +0000 (01:16 +0000)]
MFC r268614:
Use tmpfs_vn_get_ino_gen() to handle the races with reclaim in tmpfs
dotdot lookup.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269173 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268613:
kib [Mon, 28 Jul 2014 01:14:25 +0000 (01:14 +0000)]
MFC r268613:
Style.  Add comment about lock mode.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269172 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268612:
kib [Mon, 28 Jul 2014 01:11:29 +0000 (01:11 +0000)]
MFC r268612:
Add helper helper vfs_write_suspend_umnt().

Fix the bug in the FFS unmount, when suspension failed, the ufs
extattrs were not reinitialized.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269171 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268611:
kib [Mon, 28 Jul 2014 01:08:43 +0000 (01:08 +0000)]
MFC r268611:
Replace goto's with the return.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269170 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268610:
kib [Mon, 28 Jul 2014 01:06:36 +0000 (01:06 +0000)]
MFC r268610:
Add convenience macro to assert tmpfs node lock.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269169 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268609:
kib [Mon, 28 Jul 2014 01:04:33 +0000 (01:04 +0000)]
MFC r268609:
Add some assertions for the code handling vm_object for tmpfs vnode.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269168 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268608:
kib [Mon, 28 Jul 2014 01:01:20 +0000 (01:01 +0000)]
MFC r268608:
The tmpfs_link() must not dereference the filesystem-specific data for
a vnode until it is verified that the vnode indeed belongs to tmpfs mount.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269167 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268607:
kib [Mon, 28 Jul 2014 00:57:28 +0000 (00:57 +0000)]
MFC r268607:
In kern_linkat(), avoid passing doomed vnode to the VOP.

git-svn-id: svn://svn.freebsd.org/base/stable/10@269166 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268606:
kib [Mon, 28 Jul 2014 00:53:26 +0000 (00:53 +0000)]
MFC r268606:
Generalize vn_get_ino() to allow filesystems to use custom vnode
producer. Convert inline copies of vn_get_ino() in msdosfs and cd9660
into the uses of vn_get_ino_gen().

git-svn-id: svn://svn.freebsd.org/base/stable/10@269165 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f