]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r289195:
ngie [Sun, 15 Nov 2015 23:54:34 +0000 (23:54 +0000)]
MFC r289195:

Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite

functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.

A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)

As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.

Sponsored by: EMC / Isilon Storage Division

Conflicts:
lib/libarchive/test
usr.bin/cpio/test

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

8 years agoMFC r289195:
ngie [Sun, 15 Nov 2015 22:13:41 +0000 (22:13 +0000)]
MFC r289195:

Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite

functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.

A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)

As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.

Sponsored by: EMC / Isilon Storage Division

Conflicts:
lib/libarchive/test
usr.bin/cpio/test

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

8 years agoMFC r283245:
ngie [Sun, 15 Nov 2015 21:56:15 +0000 (21:56 +0000)]
MFC r283245:

r283245 (by imp):

Remove stray DEBUG_FLAGS=-g that snuck in with r184761.

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

8 years agoBump .Dd
ngie [Sun, 15 Nov 2015 20:49:03 +0000 (20:49 +0000)]
Bump .Dd

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

8 years agoMFC r290259,r290601:
ngie [Sun, 15 Nov 2015 20:48:10 +0000 (20:48 +0000)]
MFC r290259,r290601:

r290259:

Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53

Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) and
options have been omitted.

Obtained from: NetBSD
Sponsored by: EMC / Isilon Storage Division

r290601:

Follow up to r290259 dealing with makefs(8)

- Don't use contractions (don't -> do not)
- Change "throw away" to "discard" when describing the -o keep-bad-images option
- Revert author e-mail split I brought over from NetBSD, effectively reverting
  the change bapt made in r267668

Submitted by: bjk
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290260,r290262:
ngie [Sun, 15 Nov 2015 20:44:01 +0000 (20:44 +0000)]
MFC r290260,r290262:

r290260:

Document undocumented long options for -t cd9660

Note which options have been implemented and which options haven't
been implemented

Submitted as the following NetBSD PRs: bin/50390 and bin/50392

Sponsored by: EMC / Isilon Storage Division

r290262:

Fix spelling of `isolevel` cd9660 option

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290571:
ngie [Sun, 15 Nov 2015 20:30:54 +0000 (20:30 +0000)]
MFC r290571:

Fix some TAP -> ATF conversion errors

- Remove a leftover printf from when this was a TAP based testcase
- Catch mmap failures properly

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290659,r290660:
ngie [Sun, 15 Nov 2015 20:23:09 +0000 (20:23 +0000)]
MFC r290659,r290660:

r290659:

- Move ng_bluetooth.4 under MK_BLUETOOTH != no
- Move all section 5 bluetooth manpages under MK_BLUETOOTH != no

PR: 193260
Reported by: Philippe Michel <philippe.michel7@sfr.fr>
Sponsored by: EMC / Isilon Storage Division

r290660:

Move the MK_BLUETOOTH block down below the architecture specific sections by the
other generic options

PR: 193260
Sponsored by: EMC / Isilon Storage Divisions

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

8 years agoMFC r289896:
ngie [Sun, 15 Nov 2015 20:14:54 +0000 (20:14 +0000)]
MFC r289896:

Make vers.c creation atomic by using a temporary file, then moving
the temporary file to vers.c at the end of the script

The previous logic wrote out to vers.c multiple times, so the file
could be incorrectly interpreted as being completely written out
after one of the echo calls with recursive make, when in reality it
was only partially written.

Also, in the event the build was interrupted when creating vers.c
(small race window), it would have a leftover file that needed to
be cleaned up before resuming the build.

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290538:
ngie [Sun, 15 Nov 2015 20:11:55 +0000 (20:11 +0000)]
MFC r290538:

Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suite
as lib/libc/tests/stdlib

- Make the code a bit more style(9) compliant
- Convert a sizeof(x)/sizeof(x[0]) to nitems

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290539:
ngie [Sun, 15 Nov 2015 20:08:34 +0000 (20:08 +0000)]
MFC r290539:

Integrate tools/regression/lib/libc/string into the FreeBSD test suite
as lib/libc/tests/string

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290174:
delphij [Sun, 15 Nov 2015 07:14:17 +0000 (07:14 +0000)]
MFC r290174:

In pw_userlock, set 'name' to NULL when we encounter an all number string
because it is also used as an indicator of whether a name or an UID is
being used and we may have undefined results as 'name' may contain
uninitialized stack contents.

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

8 years agoMFC r290173:
delphij [Sun, 15 Nov 2015 07:10:02 +0000 (07:10 +0000)]
MFC r290173:

Use strlcpy().

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

8 years agoMFC r290428:
bdrewery [Sat, 14 Nov 2015 17:30:52 +0000 (17:30 +0000)]
MFC r290428:

  remove \, it confuses things.

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

8 years agoMFC 290414,290415:
jhb [Sat, 14 Nov 2015 01:06:45 +0000 (01:06 +0000)]
MFC 290414,290415:
Additional PCI helper functions.

290414:
Add helper routines for PCI device drivers to read, write, and modify
PCI-Express capability registers (that is, PCI config registers in the
standard PCI config space belonging to the PCI-Express capability
register set).

Note that all of the current PCI-e registers are either 16 or 32-bits,
so only widths of 2 or 4 bytes are supported.

290415:
Add a new helper function for PCI devices to locate the upstream
PCI-express root port of a given PCI device.

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

8 years agoMFC 290412:
jhb [Fri, 13 Nov 2015 22:33:51 +0000 (22:33 +0000)]
MFC 290412:
Note if relaxed ordering or no snoop is enabled for each PCI-express device.

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

8 years agoMFC r290054: Reimplement next port handle generation.
mav [Fri, 13 Nov 2015 19:59:22 +0000 (19:59 +0000)]
MFC r290054: Reimplement next port handle generation.

For some reason port handles should be allocated from HBA-global space,
while old code was not very specific, mixing per-HBA and per-VP logic.

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

8 years agoMFC r290042: Fix error code that looks like wrong.
mav [Fri, 13 Nov 2015 19:58:42 +0000 (19:58 +0000)]
MFC r290042: Fix error code that looks like wrong.

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

8 years agoMFC r290018: Reimplement enable and implement disable of virtual ports.
mav [Fri, 13 Nov 2015 19:57:59 +0000 (19:57 +0000)]
MFC r290018: Reimplement enable and implement disable of virtual ports.

Now on 24xx and above chips it is really possible to simulate several
virtual FC ports with single physical one.  For example, it allows to
configure several targets in ctl.conf, assign each of them to separate
virtual port, and let user to control access to them with switch zoning.

I still doubt that all problems are solved there, but at now it passes
at least basic tests.

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

8 years agoMFC r289942: Deliver INOTs only to enabled virtual ports.
mav [Fri, 13 Nov 2015 19:57:12 +0000 (19:57 +0000)]
MFC r289942: Deliver INOTs only to enabled virtual ports.

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

8 years agoMFC r289937: Try to keep Loop IDs persistent across chip reinits.
mav [Fri, 13 Nov 2015 19:55:59 +0000 (19:55 +0000)]
MFC r289937: Try to keep Loop IDs persistent across chip reinits.

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

8 years agoMFC r289933, r289939: Improve Port Database Changed handling and reporting.
mav [Fri, 13 Nov 2015 19:54:58 +0000 (19:54 +0000)]
MFC r289933, r289939: Improve Port Database Changed handling and reporting.

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

8 years agoMFC r289930: Formalize/unify chip (re-)inits.
mav [Fri, 13 Nov 2015 19:53:31 +0000 (19:53 +0000)]
MFC r289930: Formalize/unify chip (re-)inits.

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

8 years agoMFC r289890: Skip reserved IP Broadcast handle from using.
mav [Fri, 13 Nov 2015 19:51:55 +0000 (19:51 +0000)]
MFC r289890: Skip reserved IP Broadcast handle from using.

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

8 years agoMFC r289886: Add new field to Abort IOCB.
mav [Fri, 13 Nov 2015 19:50:55 +0000 (19:50 +0000)]
MFC r289886: Add new field to Abort IOCB.

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

8 years agoMFC r289882: Add PIM_EXTLUNS support to isp(4) driver.
mav [Fri, 13 Nov 2015 19:50:08 +0000 (19:50 +0000)]
MFC r289882: Add PIM_EXTLUNS support to isp(4) driver.

Now 24xx and above chips support full 8-byte LUN address space.
Older FC chips may support up to 16K LUNs when firmware allows.
Tested in both initiator and target modes for 23xx, 24xx and 25xx.

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

8 years agoMFC r289877: Remove ISP_INTERNAL_TARGET code.
mav [Fri, 13 Nov 2015 19:48:41 +0000 (19:48 +0000)]
MFC r289877: Remove ISP_INTERNAL_TARGET code.

We have CTL now, which is real and much more functional then this joke.

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

8 years agoMFC r289875: Decode few more response info codes.
mav [Fri, 13 Nov 2015 19:47:19 +0000 (19:47 +0000)]
MFC r289875: Decode few more response info codes.

Though CAM still does not send any requests that would require those.

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

8 years agoMFC r289855: Minor additions to Status Type 0 IOCB.
mav [Fri, 13 Nov 2015 19:46:25 +0000 (19:46 +0000)]
MFC r289855: Minor additions to Status Type 0 IOCB.

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

8 years agoMFC r289838: Improve INOTs handling for 24xx and above chips.
mav [Fri, 13 Nov 2015 19:45:15 +0000 (19:45 +0000)]
MFC r289838: Improve INOTs handling for 24xx and above chips.

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

8 years agoMFC r289817: Disable full bus scan by CAM for FC adapters.
mav [Fri, 13 Nov 2015 19:43:58 +0000 (19:43 +0000)]
MFC r289817: Disable full bus scan by CAM for FC adapters.

FC port database code already notifies CAM about all devices.  Additional
full scan is just a waste of time, that by definition won't find anything
that is not present in port database.

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

8 years agoMFC r289812, r289852: Some polishing and unification in ISR code.
mav [Fri, 13 Nov 2015 19:42:55 +0000 (19:42 +0000)]
MFC r289812, r289852: Some polishing and unification in ISR code.

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

8 years agoMFC r289681: Some more defines and polishing for INIT_FIRMWARE.
mav [Fri, 13 Nov 2015 19:41:04 +0000 (19:41 +0000)]
MFC r289681: Some more defines and polishing for INIT_FIRMWARE.

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

8 years agoMFC r289643: Document isp_*_multi firmware kernel modules removal.
mav [Fri, 13 Nov 2015 19:39:36 +0000 (19:39 +0000)]
MFC r289643: Document isp_*_multi firmware kernel modules removal.

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

8 years agoMFC r289626: Update firmware images for Qlogic 24xx/25xx from 5.5.0 to 7.3.0.
mav [Fri, 13 Nov 2015 19:36:43 +0000 (19:36 +0000)]
MFC r289626: Update firmware images for Qlogic 24xx/25xx from 5.5.0 to 7.3.0.

This also removes separate "_multi" images, since this funcationality is
now in base, and there is simply no new images without it for years.

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

8 years agoMFC r289622: Zero mbox[1] for INIT_FIRMWARE to fix version 7.3 firmware.
mav [Fri, 13 Nov 2015 19:34:42 +0000 (19:34 +0000)]
MFC r289622: Zero mbox[1] for INIT_FIRMWARE to fix version 7.3 firmware.

While there, add new fields to isp_icb_2400_t structure.

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

8 years agoMFC r289620: Decode more firmware attributes.
mav [Fri, 13 Nov 2015 19:33:13 +0000 (19:33 +0000)]
MFC r289620: Decode more firmware attributes.

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

8 years agoMFC r289219: Export bunch of state variables as sysctls.
mav [Fri, 13 Nov 2015 19:32:17 +0000 (19:32 +0000)]
MFC r289219: Export bunch of state variables as sysctls.

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

8 years agoMFC r290458: Add two more KASSERTs.
mav [Fri, 13 Nov 2015 19:27:38 +0000 (19:27 +0000)]
MFC r290458: Add two more KASSERTs.

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

8 years agoMFC r290387: Extend mask of VMware virtual disks.
mav [Fri, 13 Nov 2015 19:26:50 +0000 (19:26 +0000)]
MFC r290387: Extend mask of VMware virtual disks.

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

8 years agoMFC r289881: Give CTL support for PIM_EXTLUNS when talking to CAM.
mav [Fri, 13 Nov 2015 19:24:44 +0000 (19:24 +0000)]
MFC r289881: Give CTL support for PIM_EXTLUNS when talking to CAM.

CTL itself still lives in flat LUN space, but it can generate extended
numbers if CAM SIM reports such capability.

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

8 years agoMFC r289843: Add partial support for QUERY TMF to CAM and isp(4).
mav [Fri, 13 Nov 2015 19:23:22 +0000 (19:23 +0000)]
MFC r289843: Add partial support for QUERY TMF to CAM and isp(4).

This change allows to decode respective functions in isp(4) in target mode
and pass them through CAM to CTL.  Unfortunately neither CAM nor isp(4)
support returning response info for those task management functions now.

On the other side I just have no initiator to test this functionality.

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

8 years agoMFC r289702: Make some panic strings mode informative.
mav [Fri, 13 Nov 2015 19:21:45 +0000 (19:21 +0000)]
MFC r289702: Make some panic strings mode informative.

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

8 years agoMFC r290550, r290573:
gjb [Fri, 13 Nov 2015 17:25:14 +0000 (17:25 +0000)]
MFC r290550, r290573:
 r290550:
  Use tmpfs(5) instead of md(4) for '/tmp' mount.

 r290573:
  Remove noatime from tmpfs(5) fstab(5) entry.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r290462: Removed unused malloc types.
mav [Fri, 13 Nov 2015 10:34:14 +0000 (10:34 +0000)]
MFC r290462: Removed unused malloc types.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

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

8 years agoFix build on stable/10.
mav [Fri, 13 Nov 2015 10:32:34 +0000 (10:32 +0000)]
Fix build on stable/10.

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

8 years agoMFC r290191 (by avg):
mav [Fri, 13 Nov 2015 09:52:36 +0000 (09:52 +0000)]
MFC r290191 (by avg):
l2arc: do not call trim_map_free() for blocks with zero b_asize

b_asize can be zero if the block is compressed into an empty block
(ZIO_COMPRESS_EMPTY) and the trim code asserts that meaningless
zero-sized trimming is not attempted.
The logic for calling trim_map_free() is extracted into a new function
l2arc_trim() to minimize code duplication.

PR:             203473
Reported by:    Willem Jan Withagen <wjw@digiware.nl>
Tested by:      Willem Jan Withagen <wjw@digiware.nl>

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

8 years agoMFC r289562: 6328 Fix cstyle errors in zfs codebase
mav [Fri, 13 Nov 2015 09:50:08 +0000 (09:50 +0000)]
MFC r289562: 6328 Fix cstyle errors in zfs codebase

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>

illumos/illumos-gate@9a686fbc186e8e2a64e9a5094d44c7d6fa0ea167

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

8 years agoMFC r289536: 5767 fix several problems with zfs test suite
mav [Fri, 13 Nov 2015 09:48:43 +0000 (09:48 +0000)]
MFC r289536: 5767 fix several problems with zfs test suite

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: John Wren Kennedy <john.kennedy@delphix.com>

illumos/illumos-gate@52244c0958bdf281ca42932b449f644b4decfdc2

In fact, only unrelated part of that commit is applicable:
8. zpool list -v doesn't print spares
It also doesn't correctly identify log devices.

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

8 years agoMFC r289531: 5847 libzfs_diff should check zfs_prop_get() return
mav [Fri, 13 Nov 2015 09:47:37 +0000 (09:47 +0000)]
MFC r289531: 5847 libzfs_diff should check zfs_prop_get() return

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Alexander Eremin <a.eremin@nexenta.com>

illumos/illumos-gate@8430278980a48338e04c7dd52b495b7f1551367a

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

8 years agoMFC r289528: Reduce diff from upstream.
mav [Fri, 13 Nov 2015 09:46:28 +0000 (09:46 +0000)]
MFC r289528: Reduce diff from upstream.

Should be no functional change.

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

8 years agoMFC r289527:
mav [Fri, 13 Nov 2015 09:45:33 +0000 (09:45 +0000)]
MFC r289527:
5561 support root pools on EFI/GPT partitioned disks
5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks)

Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Hans Rosenfeld <hans.rosenfeld@nexenta.com>

illumos/illumos-gate@1a902ef8628b0dffd6df5442354ab59bb8530962

This is NOP changes for FreeBSD.

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

8 years agoMFC r289500: 6298 zfs_create_008_neg and zpool_create_023_neg need to be
mav [Fri, 13 Nov 2015 09:42:59 +0000 (09:42 +0000)]
MFC r289500: 6298 zfs_create_008_neg and zpool_create_023_neg need to be
updated for large block support.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Joe Stein <joe.stein@delphix.com>

illumos/illumos-gate@e9316f7696401f3e5e263a5939031cb8d5641a88

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

8 years agoMFC r289499: Update vendor/illumos/dist and vendor-sys/illumos/dist
mav [Fri, 13 Nov 2015 09:41:34 +0000 (09:41 +0000)]
MFC r289499: Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 13967:92bec6d87f59

Illumos ZFS issues:
  3557 dumpvp_size is not updated correctly when a dump zvol's size is
       changed
  3558 setting the volsize on a dump device does not return back ENOSPC
  3559 setting a volsize larger than the space available sometimes succeeds

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

8 years agoMFC r289497: 5745 zfs set allows only one dataset property to be set at a time
mav [Fri, 13 Nov 2015 09:39:55 +0000 (09:39 +0000)]
MFC r289497: 5745 zfs set allows only one dataset property to be set at a time

Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Reviewed by: Richard PALO <richard@NetBSD.org>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Approved by: Rich Lowe <richlowe@richlowe.net>
Author: Chris Williamson <chris.williamson@delphix.com>

illumos/illumos-gate@30925561c223021e91d15899cbe75f80e54d8889

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

8 years agoMFC r289422:
mav [Fri, 13 Nov 2015 09:32:04 +0000 (09:32 +0000)]
MFC r289422:
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f

This is only a partial merge of respective ZFS infrastructure changes.
At this moment FreeBSD kernel has no those crypto algorithms, so the
parts of the code to enable them are commented out.  When they are
implemented, it will be trivial to plug them in.

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

8 years agoMFC r289362, r289445: 2605 want to resume interrupted zfs send
mav [Fri, 13 Nov 2015 09:30:17 +0000 (09:30 +0000)]
MFC r289362, r289445: 2605 want to resume interrupted zfs send

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Arne Jansen <sensille@gmx.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8

For more info, see:
 - slides http://www.slideshare.net/MatthewAhrens/openzfs-send-and-receive
 - video https://www.youtube.com/watch?v=iY44jPMvxog
 - manpage changes (for zfs resume -s and zfs send -t)
 - upcoming talk at the OpenZFS Developer Summit

The TL;DR is:
Use "zfs receive -s" to save the partially received state on failure.
On failure, get the receive token with "zfs get receive_resume_token <fs>"
Resume the send with "zfs send -t <token_value>"

Relnotes:       yes

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

8 years agoMFC r289313: 5764 "zfs send -nv" directs output to stderr
mav [Fri, 13 Nov 2015 09:25:47 +0000 (09:25 +0000)]
MFC r289313: 5764 "zfs send -nv" directs output to stderr

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Basil Crow <basil.crow@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Manoj Joseph <manoj.joseph@delphix.com>

illumos/illumos-gate@dc5f28a3c341db7c241bba77ddc109c141072f27

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

8 years agoMFC r289309: 6267 dn_bonus evicted too early
mav [Fri, 13 Nov 2015 09:23:48 +0000 (09:23 +0000)]
MFC r289309: 6267 dn_bonus evicted too early

Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Xin LI <delphij@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Justin T. Gibbs <gibbs@FreeBSD.org>

illumos/illumos-gate@d2058105c61ec61df3a2dd3f839fed8c3fe7bfd6

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

8 years agoMFC r289307: 6295 metaslab_condense's dbgmsg should include vdev id
mav [Fri, 13 Nov 2015 09:22:53 +0000 (09:22 +0000)]
MFC r289307: 6295 metaslab_condense's dbgmsg should include vdev id

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Joe Stein <joe.stein@delphix.com>

illumos/illumos-gate@daec38ecb4fb5e73e4ca9e99be84f6b8c50c02fa

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

8 years agoMFC r289305: 6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()
mav [Fri, 13 Nov 2015 09:21:31 +0000 (09:21 +0000)]
MFC r289305: 6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@8fe00bfb8790ad51653f67b01d5ac14256cbb404

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

8 years agoMFC r289299: 6286 ZFS internal error when set large block on bootfs
mav [Fri, 13 Nov 2015 09:20:46 +0000 (09:20 +0000)]
MFC r289299: 6286 ZFS internal error when set large block on bootfs

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@6de9bb5603e65b16816b7ab29e39bac820e2da2b

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

8 years agoMFC r289297: 6288 dmu_buf_will_dirty could be faster
mav [Fri, 13 Nov 2015 09:18:33 +0000 (09:18 +0000)]
MFC r289297: 6288 dmu_buf_will_dirty could be faster

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@0f2e7d03b8f588387cb8dd8dd500cbe5ff4484e0

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

8 years agoMFC r289295: 5219 l2arc_write_buffers() may write beyond target_sz
mav [Fri, 13 Nov 2015 09:17:48 +0000 (09:17 +0000)]
MFC r289295: 5219 l2arc_write_buffers() may write beyond target_sz

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Saso Kiselkov <skiselkov@gmail.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Reviewed by: Justin Gibbs <gibbs@FreeBSD.org>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Andriy Gapon <avg@freebsd.org>

illumos/illumos-gate@d7d9a6d919f92d74ea0510a53f8441396048e800

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

8 years agoMFC r289192: 6281 prefetching should apply to 1MB reads
mav [Fri, 13 Nov 2015 09:16:56 +0000 (09:16 +0000)]
MFC r289192: 6281 prefetching should apply to 1MB reads

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Alexander Motin <mav@freebsd.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@632802744ef6d17e06d6980a95f631615c3b060f

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

8 years agoMFC r289191, r289194: 6251 add tunable to disable free_bpobj processing
mav [Fri, 13 Nov 2015 09:16:07 +0000 (09:16 +0000)]
MFC r289191, r289194: 6251 add tunable to disable free_bpobj processing

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@139510fb6efa97dbe5f5479594b308d940cab8d1

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

8 years agoMFC r289190: 6250 zvol_dump_init() can hold txg open
mav [Fri, 13 Nov 2015 09:14:30 +0000 (09:14 +0000)]
MFC r289190: 6250 zvol_dump_init() can hold txg open

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@b10bba72460aeaa53119c76ff5e647fd5585bece

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

8 years agoMFC r287745: 5997 FRU field not set during pool creation and never
mav [Fri, 13 Nov 2015 09:08:59 +0000 (09:08 +0000)]
MFC r287745: 5997 FRU field not set during pool creation and never
updated

ZFS already supports storing the vdev FRU in a vdev property.  There
is code in libzfs to work with this property, and there is code in
the zfs-retire FMA module that looks for that information.  But there
is no code actually setting or updating the FRU.

To address this, ZFS is changed to send a handful of new events
whenever a vdev is added, attached, cleared, or onlined, as well
as when a pool is created or imported.

Note that syseventd is not currently available on FreeBSD and thus
some work is needed to actually support the new ZFS events (e.g. in
zfsd) to actually use this capability, this changeset is mostly a
diff reduction from upstream.

illumos/illumos-gate@1437283407f89cab03860accf49408f94559bc34

Illumos issues:

    5997 FRU field not set during pool creation and never updated
    https://www.illumos.org/issues/5997

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

8 years agoMFC r287235:
markj [Fri, 13 Nov 2015 02:16:08 +0000 (02:16 +0000)]
MFC r287235:
Remove weighted page handling from vm_page_advise().

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

8 years agoMFC r289867:
markj [Fri, 13 Nov 2015 01:37:08 +0000 (01:37 +0000)]
MFC r289867:
Remove an erroneous semicolon.

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

8 years agoMFC r289866:
markj [Fri, 13 Nov 2015 01:27:20 +0000 (01:27 +0000)]
MFC r289866:
DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_count
attribute rather than DW_AT_upper_bound. Teach ctfconvert about this so that
array type sizes are encoded correctly.

PR:           203772

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

8 years agoMFC r290320:
markj [Fri, 13 Nov 2015 01:25:02 +0000 (01:25 +0000)]
MFC r290320:
Have elf_lookup() return an error if the specified non-weak symbol could
not be found. Otherwise, relocations against such symbols will be silently
ignored instead of causing an error to be raised.

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

8 years agoMFC r290450:
smh [Fri, 13 Nov 2015 01:03:59 +0000 (01:03 +0000)]
MFC r290450:

Add sysctl to control LACP strict compliance default

Sponsored by: Multiplay

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

8 years agoMFC r290440:
smh [Fri, 13 Nov 2015 01:01:16 +0000 (01:01 +0000)]
MFC r290440:

Correct posix_openpt reference in pty(3)

Sponsored by: Multiplay

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

8 years agoMFC 284325:
jhb [Fri, 13 Nov 2015 00:50:34 +0000 (00:50 +0000)]
MFC 284325:
Report the values of x86 segment registers to remote debuggers.

While here, also report %eflags from the i386 trapframe.

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

8 years agoMFC 285783:
jhb [Thu, 12 Nov 2015 23:49:47 +0000 (23:49 +0000)]
MFC 285783:
Various changes to the registers displayed in DDB for x86.
- Fix segment registers to only display the low 16 bits.
- Remove unused handlers and entries for the debug registers.
- Display xcr0 (if valid) in 'show sysregs'.
- Add '0x' prefix to MSR values to match other values in 'show sysregs'.
- MFamd64: Display various MSRs in 'show sysregs'.
- Add a 'show dbregs' to display the value of debug registers.
- Dynamically size the column width for register values to properly
  align columns on 64-bit platforms.
- Display %gs for i386 in 'show registers'.

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

8 years agoMFC 285773,285775,285776:
jhb [Thu, 12 Nov 2015 22:45:51 +0000 (22:45 +0000)]
MFC 285773,285775,285776:
Various fixes for stack unwinding in DDB on x86.

285773:
Remove some dead code from DDB's amd64 stack unwinder.

The amd64 port copied some code from i386 to fetch function arguments and
display them in backtraces. However, it was commented out and can't easily
be implemented since the function arguments are passed in
registers rather than on the stack in amd64. Remove it in preparation for
some bug fixes in this area.

285775:
Improve stack unwinding on i386 and amd64 after an IP fault.

If we can't find a symbol corresponding to the faulting instruction, assume
that the previously-executed function is a call and attempt to find the
calling function using the return address on the stack. Otherwise we end
up associating the last stack frame with the current call, which is
incorrect and causes the unwinder to skip printing of the calling function,
resulting in a confusing backtrace.

285776:
Let the unwinder handle faults during function prologues or epilogues.

The i386 and amd64 DDB stack unwinders contain code to detect and handle
the case where the first frame is not completely set up or torn down. This
code was accidentally unused however, since db_backtrace() was never called
with a non-NULL trap frame. This change fixes that.

Also remove get_rsp() from the amd64 code. It appears to have come from
i386, which needs to take into account whether the exception triggered a
CPL switch, since SS:ESP is only pushed onto the stack if so. On amd64,
SS:RSP is pushed regardless, so get_rsp() was doing the wrong thing for
kernel-mode exceptions. As a result, we can also remove custom print
functions for these registers.

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

8 years agoMFC r290401 & r290466
smh [Thu, 12 Nov 2015 10:20:36 +0000 (10:20 +0000)]
MFC r290401 & r290466

Provide information about bad DVA

Sponsored by: Multiplay

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

8 years agoMFC r290399:
smh [Thu, 12 Nov 2015 10:16:35 +0000 (10:16 +0000)]
MFC r290399:

Allow zfs_recover to be changed at runtime

Sponsored by: Multiplay

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

8 years agoMFC r290140:
hselasky [Thu, 12 Nov 2015 08:47:10 +0000 (08:47 +0000)]
MFC r290140:
Add missing NULL check in physio().

When destroying a character device the si_devsw field is set to NULL
before all references are gone, to indicate the character device is
going away. This can cause a NULL-dereference fault inside physio().

The callers of physio() should own a thread reference on the cdev and
if si_devsw is seen as non-NULL, it is usable during the execution of
the function. Else an ENXIO error code is returned.

Reviewed by: kib

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

8 years agoMFC of 290697,tzdata10:
edwin [Thu, 12 Nov 2015 03:26:05 +0000 (03:26 +0000)]
MFC of 290697,tzdata10:

Update to tzdata2015g:

Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.

Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.

Fiji's 2016 fall-back transition is scheduled for January 17, not 24.

Fort Nelson, British Columbia will not fall back on 2015-11-01.  It has
effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
New zone America/Fort_Nelson.

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

8 years agoRemove empty directories leftover from r255974.
bdrewery [Thu, 12 Nov 2015 01:21:22 +0000 (01:21 +0000)]
Remove empty directories leftover from r255974.

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

8 years agoMFC r290161:
kp [Wed, 11 Nov 2015 12:36:42 +0000 (12:36 +0000)]
MFC r290161:

pf: Fix IPv6 checksums with route-to.

When using route-to (or reply-to) pf sends the packet directly to the output
interface. If that interface doesn't support checksum offloading the checksum
has to be calculated in software.
That was already done in the IPv4 case, but not for the IPv6 case. As a result
we'd emit packets with pseudo-header checksums (i.e. incorrect checksums).

This issue was exposed by the changes in r289316 when pf stopped performing full
checksum calculations for all packets.

Submitted by:       Luoqi Chen

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

8 years agoMFC 284324,290164:
jhb [Wed, 11 Nov 2015 01:32:35 +0000 (01:32 +0000)]
MFC 284324,290164:
Workaround debuggers that try to read the full 32-bit words holding
selectors in trapframes.

284324:
Ensure that the upper 16 bits of segment registers manually saved in
trapframes are cleared by explicitly pushing a zero and then moving
the segment register into the low 16 bits.  Certain Intel processors
treat a push of a segment register as a move of the segment register
into the low 16 bits leaving the upper 16 bits of the word in the
stack unchanged.

290164:
Use movw instead of movl (or plain mov) when moving segment registers
into memory.  This is a nop on clang's assembler, but some assemblers
complain if the size suffix is incorrect.

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

8 years agoMFC r290047:
kib [Tue, 10 Nov 2015 08:39:07 +0000 (08:39 +0000)]
MFC r290047:
Do not perform read-ahead for BA_CLRBUF request when we are low on
memory or when dirty buffer queue is too large.

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

8 years agoMFC r290480
bapt [Tue, 10 Nov 2015 07:17:38 +0000 (07:17 +0000)]
MFC r290480

Protecting against rm -rf / is now POSIXLY_CORRECT per posix 1003.1
edition 2013. No need anymore to disable the protection if one set
the POXILY_CORRECT environment variable.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D4092

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

8 years agoMFC r290441:
hselasky [Mon, 9 Nov 2015 11:24:59 +0000 (11:24 +0000)]
MFC r290441:
Fix for unaligned IP-header.

The mbuf length fields must be set before m_adj() is called else
m_adj() will not always adjust the mbuf and an unaligned read
exception can trigger inside the network stack. This can happen on
platforms where unaligned reads are not supported. Adjust a length
check to include the 2-byte ethernet alignment while at it.

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

8 years agoMFC r266930,r289225:
ngie [Mon, 9 Nov 2015 09:28:34 +0000 (09:28 +0000)]
MFC r266930,r289225:

r266930 (by jmg):

convert to using the _daddr_t types like newfs was...

Put the superblock in the correct possition for UFS2... There is a bug
in FFS that if we don't put it here (for UFS2), it will forcefully
relocate the superblock, and I believe cause data loss..

I have a fix for that, but w/ how many releases are broken, we won't be
able to switch to the better _FLOPPY (block 0) for this for a while..

r289225 (by sbruno):

makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easily
checked with dumpfs(8). This may lead to other problems, f.e. geom_label kernel
module sanity checks do not like zero fs_old_size value and skips such UFS1
file system while tasting (fs_old_size derives from sblock.fs_providersize).

PR: 203704
Submitted by: eugen@grosbein.net
Reviewed by: marcel

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

8 years agoMFC r290268:
ngie [Mon, 9 Nov 2015 09:23:35 +0000 (09:23 +0000)]
MFC r290268:

Sync minor whitespace / type changes in ffs_csum_swap and ffs_sb_swap with
src/sys/ufs/ffs/ffs_bswap.c@1.39

Obtained from: NetBSD
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290264:
ngie [Mon, 9 Nov 2015 09:22:11 +0000 (09:22 +0000)]
MFC r290264:

Limit isoLevel to 1 and 2 to avoid segfaulting when isoLevel is set to 3 by
dereferencing a NULL function pointer

Add some asserts to ensure that isolevel is always either 1 or 2.

PR: 203645
Reported by: Thomas Schmitt <scdbackup@gmx.net>
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290265,r290267,r290270:
ngie [Mon, 9 Nov 2015 09:20:01 +0000 (09:20 +0000)]
MFC r290265,r290267,r290270:

r290265:

Add testcases for -t cd9660 -o isolevel=[1-3]

-- -o isolevel=1 currently fails because of path comparison issues,
   so mark it as an expected failure.
-- -o isolevel=3 is not implemented, so expect it to fail as an out
   of bounds value [*].

PR: 203645
Sponsored by: EMC / Isilon Storage Division

r290267:

Clean up mtree keyword support a slight bit and add a few more default keywords

- Parameterize the mtree keywords as $DEFAULT_MTREE_KEYWORDS
- Test with the extra mtree keywords, `mode,gid,uid`.
- Add a note about mtrees with time support not working with makefs right now

Sponsored by: EMC / Isilon Storage Division

r290270:

Add testcases for -t ffs -o version=[12]

Verify the filesystem type using dumpfs. Add preliminary support
for NetBSD (needs to be validated)

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289902:
ngie [Mon, 9 Nov 2015 09:04:11 +0000 (09:04 +0000)]
MFC r289902:

Add a regression test for r289899 to validate rockridge encoding
of device types

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289899:
ngie [Mon, 9 Nov 2015 09:03:24 +0000 (09:03 +0000)]
MFC r289899:

Import the fix from NetBSD kern/48852 (sic) to fix rockridge encoding of
device nodes

In particular, use st_rdev (the device type), not st_dev (the device inode),
and fix the comparison to be correct with the st_rdev field

Bug 203648
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 1008927
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289203,r290180:
ngie [Mon, 9 Nov 2015 08:59:55 +0000 (08:59 +0000)]
MFC r289203,r290180:

r289203 (by adrian):

makefs: introduce a new option to specify what to round the resulting
image up to.

From ticket:

While trying to run FreeBSD/mips on some device having very small flash media,
one is forced to compress file system with mkulzma(8) utility. It is desirable
to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8)
and big compression block size like 65535 bytes to mkulzma at the same time.
Then one obtains very good comression ratios (like 75% and more) but faces
the following problem.

geom_uncompress kernel module reports GEOM provider size rounded up to its
compression block size. Generally, this changes original media size and now
it fails to match the size of embedded UFS file system that leads to other
problems, f.e. geom_label kernel module does not like this and skips the
file system while tasting the GEOM and looking for UFS label.

This makes it impossible to refer to the file system using known UFS label
instead of something like /dev/map/rootfs.uncompress.

The following patch introduces new command line option "-r roundup" for makefs
that makes it round up the image to specified block size. Hence, geom_uncompress
does not change GEOM media size for images rounded that way and geom_label
accepts such GEOMs just fine.

With the patch applied, one can use following commands:

$ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs
$ mkulzma -s 65536 -o fs.img.ulzma fs.img

PR: bin/203707
Submitted by: <eugen@grosbein.net>

r290180:

Follow up to roundup feature addition in r289203

- Rename -r to -R to avoid the clash with makefs -r in NetBSD
- Note that -R is an FFS-specific option because it's not implemented
  in cd9660 today
- Rename the roundup variable to "roundup-size" in the manpage and help
  text for consistency with other variables.
- Bump .Dd (missed in r289203)

PR: 203707
Differential Revision: https://reviews.freebsd.org/D3959
Reviewed by: adrian (earlier patch), emaste
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289687,r289693:
ngie [Mon, 9 Nov 2015 08:03:15 +0000 (08:03 +0000)]
MFC r289687,r289693:

r289687:

Free buffer before returning from cd9660_write_path_table to avoid
leaking it after returning from the function

PR: 203647
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 978431
Sponsored by: EMC / Isilon Storage Division

r289693:

Unbreak makefs -t cd9660 after r289687

buffer_head needs to be freed -- not buffer

Detected by jemalloc, i.e. running makefs failed the arena assert
because my copy of malloc on CURRENT is compiled with the default
!MALLOC_PRODUCTION asserts on

Pointyhat to: ngie
PR: 203647
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289739,r289743,r289897,r289901:
ngie [Mon, 9 Nov 2015 07:56:06 +0000 (07:56 +0000)]
MFC r289739,r289743,r289897,r289901:

r289739:

Correctly reintroduce the rudimentary smoke tests I botched up
in r289684

Sponsored by: EMC / Isilon Storage Division

r289743:

Revise "create_test_inputs" to simplify the file structure as
these testcases don't need to be nested as much as bin/ls/ls_tests.sh
do when verifying ls -a, ls -A, etc. This allows the tests to make
all paths relative to the top of the temporary directory instead of
always tacking on $ATF_TMPDIR, thus complicating things unnecessarily

Create non-empty files in create_test_inputs as well now, similar to
create_test_inputs2 in bin/ls/ls_tests.sh

Compare the input files to the output file contents using diff where
possible:
- Skip over the fifo comparison for now because it always fails
- Skip over the symlink comparison on cd9660 because it always fails
  today

Sponsored by: EMC / Isilon Storage Division

r289897:

Add more cd9660/FFS makefs testcases

General changes:
- Parameterize out the mount command.
- Use mtree to verify the contents of an image (check_image_contents) instead
  of using diff (diff verifies content, but not file metadata).
- Move common logic out to functions (common_cleanup, mount_image,
  check_image_contents)
- Add stub testcases for makefs -D (crashes with SIGBUS, similar to bug # 192839)
- Add a note about the ISO-9660 and rockridge specs
- Add testcases that exercise:
-- Creating disk images from an mtree and multiple directories.
-- -F flag use (not really an extensive testcase right now)

cd9660-specific test changes:

- Remove an XXX comment about symlinks; I forgot that non-rockridge images turn
  symlinks into hardlinks.
- Add testcases that exercise:
-- -o allow-deep-trees
-- -o allow-max-name stub testcase (doesn't seem to be implemented in makefs)
-- -o preparer (existence in image; not conformance to spec)
-- -o publisher (existence in image; not conformance to spec)
-- -o rockridge (basic)

Sponsored by: EMC / Isilon Storage Division

r289901:

Remove an ls -l I was using for debugging

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289441:
ngie [Mon, 9 Nov 2015 07:49:39 +0000 (07:49 +0000)]
MFC r289441:

Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD
test suite as tests/sys/posixshm

Some other highlights:
- Convert the testcases over to ATF
- Don't use hardcoded paths to /tmp (which violate the ATF/kyua samdbox); use
  mkstemp to generate temporary paths for non-SHM_ANON shm objects.

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290177:
ngie [Mon, 9 Nov 2015 07:41:28 +0000 (07:41 +0000)]
MFC r290177:

Integrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suite
as lib/libc/rpc

This testcase requires rpcbind be up in running; otherwise the testcases
will time out and be skipped

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290179:
ngie [Mon, 9 Nov 2015 07:34:30 +0000 (07:34 +0000)]
MFC r290179:

Remove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ warning

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290190,r290251:
ngie [Mon, 9 Nov 2015 07:26:34 +0000 (07:26 +0000)]
MFC r290190,r290251:

r290190:

Fix compiler warnings with open_to_operation.c

Other sidenotes:
- Remove unused variables with main(..)
- Convert errx/exit with -1 to errx/exit with 1
- Fix a bogus test in try_directory_open
  (expected_errno == expected_errno -> errno == expected_errno) [*]
- Fix some warnings related to discarded qualifiers
- Remove a bogus else-statement at the end of check_mmap_exec(..) in the
  successful case. mmap(2), POSIX, Linux, etc all don't state what the
  behavior is when mixing O_WRONLY + PROT_EXEC, so assume success for now to
  get the test program to pass again.

PR: 201286 [*]
Submitted by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division

r290251:

Use nitems(x) instead of sizeof(x)/sizeof(x[0])

Sponsored by: EMC / Isilon Storage Division

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