svn commit: r266805 - in projects/sendfile: cddl/contrib/opensolaris/cmd/zfs contrib/bmake contrib/unbound/libunbound release/picobsd/floppy.tree/etc release/picobsd/mfs_tree/etc sbin/ifconfig shar...

Gleb Smirnoff glebius at FreeBSD.org
Wed May 28 13:06:59 UTC 2014


Author: glebius
Date: Wed May 28 13:06:53 2014
New Revision: 266805
URL: http://svnweb.freebsd.org/changeset/base/266805

Log:
  Merge head/ r258543 through r266804.

Added:
  projects/sendfile/sys/arm/conf/CHROMEBOOK-SNOW
     - copied unchanged from r266804, head/sys/arm/conf/CHROMEBOOK-SNOW
  projects/sendfile/sys/arm/conf/CHROMEBOOK-SPRING
     - copied unchanged from r266804, head/sys/arm/conf/CHROMEBOOK-SPRING
  projects/sendfile/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dts
     - copied unchanged from r266804, head/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dts
  projects/sendfile/sys/boot/fdt/dts/arm/exynos5250-chromebook-spring.dts
     - copied unchanged from r266804, head/sys/boot/fdt/dts/arm/exynos5250-chromebook-spring.dts
  projects/sendfile/sys/dev/cxgbe/t4_netmap.c
     - copied unchanged from r266804, head/sys/dev/cxgbe/t4_netmap.c
Deleted:
  projects/sendfile/sys/boot/fdt/dts/arm/exynos5250-chromebook.dts
Modified:
  projects/sendfile/cddl/contrib/opensolaris/cmd/zfs/zfs.8
  projects/sendfile/contrib/bmake/var.c
  projects/sendfile/contrib/unbound/libunbound/libworker.h
  projects/sendfile/contrib/unbound/libunbound/worker.h
  projects/sendfile/release/picobsd/floppy.tree/etc/ttys
  projects/sendfile/release/picobsd/mfs_tree/etc/gettytab
  projects/sendfile/sbin/ifconfig/ifconfig.8
  projects/sendfile/share/man/man4/iwn.4
  projects/sendfile/share/man/man5/src.conf.5
  projects/sendfile/share/mk/bsd.opts.mk
  projects/sendfile/share/mk/bsd.own.mk
  projects/sendfile/sys/amd64/vmm/intel/vmx.c
  projects/sendfile/sys/amd64/vmm/vmm_host.c
  projects/sendfile/sys/amd64/vmm/x86.c
  projects/sendfile/sys/arm/conf/CHROMEBOOK
  projects/sendfile/sys/arm/conf/EXYNOS5250.common
  projects/sendfile/sys/arm/samsung/exynos/chrome_ec.c
  projects/sendfile/sys/arm/samsung/exynos/chrome_kb.c
  projects/sendfile/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
  projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
  projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
  projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
  projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
  projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
  projects/sendfile/sys/compat/linux/linux_futex.c
  projects/sendfile/sys/conf/files
  projects/sendfile/sys/dev/cxgbe/adapter.h
  projects/sendfile/sys/dev/cxgbe/common/common.h
  projects/sendfile/sys/dev/cxgbe/common/t4_hw.c
  projects/sendfile/sys/dev/cxgbe/t4_main.c
  projects/sendfile/sys/dev/cxgbe/t4_sge.c
  projects/sendfile/sys/dev/drm2/radeon/radeon_device.c
  projects/sendfile/sys/dev/e1000/if_igb.c
  projects/sendfile/sys/dev/firewire/sbp.c
  projects/sendfile/sys/dev/iwn/if_iwn.c
  projects/sendfile/sys/dev/iwn/if_iwn_devid.h
  projects/sendfile/sys/dev/sound/pci/emu10k1.c
  projects/sendfile/sys/modules/cxgbe/if_cxgbe/Makefile
  projects/sendfile/sys/netinet6/ip6_forward.c
  projects/sendfile/sys/netinet6/ip6_ipsec.c
  projects/sendfile/sys/netinet6/ip6_ipsec.h
  projects/sendfile/sys/netinet6/ip6_output.c
  projects/sendfile/sys/netinet6/ip6_var.h
  projects/sendfile/sys/netipsec/ipsec6.h
  projects/sendfile/sys/netipsec/ipsec_input.c
  projects/sendfile/sys/netipsec/ipsec_output.c
  projects/sendfile/sys/netipsec/xform_ipip.c
  projects/sendfile/sys/powerpc/powerpc/sigcode32.S
  projects/sendfile/sys/powerpc/powerpc/sigcode64.S
  projects/sendfile/sys/vm/vm_map.c
  projects/sendfile/sys/x86/x86/busdma_bounce.c
  projects/sendfile/tools/build/options/WITHOUT_DOCCOMPRESS
  projects/sendfile/tools/build/options/WITHOUT_GNU_GREP_COMPAT
  projects/sendfile/tools/build/options/WITHOUT_MANCOMPRESS
  projects/sendfile/tools/build/options/WITH_FMAKE
  projects/sendfile/usr.bin/top/machine.c
  projects/sendfile/usr.sbin/usbdump/usbdump.c
Directory Properties:
  projects/sendfile/   (props changed)
  projects/sendfile/cddl/   (props changed)
  projects/sendfile/cddl/contrib/opensolaris/   (props changed)
  projects/sendfile/cddl/contrib/opensolaris/cmd/zfs/   (props changed)
  projects/sendfile/contrib/bmake/   (props changed)
  projects/sendfile/contrib/unbound/   (props changed)
  projects/sendfile/sbin/   (props changed)
  projects/sendfile/share/man/man4/   (props changed)
  projects/sendfile/sys/   (props changed)
  projects/sendfile/sys/amd64/vmm/   (props changed)
  projects/sendfile/sys/boot/   (props changed)
  projects/sendfile/sys/cddl/contrib/opensolaris/   (props changed)
  projects/sendfile/sys/conf/   (props changed)

Modified: projects/sendfile/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==============================================================================
--- projects/sendfile/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Wed May 28 13:06:53 2014	(r266805)
@@ -18,7 +18,7 @@
 .\" information: Portions Copyright [yyyy] [name of copyright owner]
 .\"
 .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved.
-.\" Copyright (c) 2013 by Delphix. All rights reserved.
+.\" Copyright (c) 2014 by Delphix. All rights reserved.
 .\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd at FreeBSD.org>
 .\" Copyright (c) 2012, Glen Barber <gjb at FreeBSD.org>
 .\" Copyright (c) 2012, Bryan Drewery <bdrewery at FreeBSD.org>
@@ -30,7 +30,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 23, 2014
+.Dd May 27, 2014
 .Dt ZFS 8
 .Os
 .Sh NAME
@@ -1193,6 +1193,53 @@ affects only files created afterward; ex
 .Pp
 This property can also be referred to by its shortened column name,
 .Sy recsize .
+.It Sy redundant_metadata Ns = Ns Cm all | most
+Controls what types of metadata are stored redundantly.
+ZFS stores an extra copy of metadata, so that if a single block is corrupted,
+the amount of user data lost is limited.
+This extra copy is in addition to any redundancy provided at the pool level
+.Pq e.g. by mirroring or RAID-Z ,
+and is in addition to an extra copy specified by the
+.Sy copies
+property
+.Pq up to a total of 3 copies .
+For example if the pool is mirrored,
+.Cm copies Ns = Ns Ar 2 ,
+and
+.Cm redundant_metadata Ns = Ns Ar most ,
+then ZFS
+stores 6 copies of most metadata, and 4 copies of data and some
+metadata.
+.Pp
+When set to
+.Cm all ,
+ZFS stores an extra copy of all metadata.
+If a
+single on-disk block is corrupt, at worst a single block of user data
+.Po which is
+.Cm recordsize
+bytes long
+can be lost.
+.Pc
+.Pp
+When set to
+.Cm most ,
+ZFS stores an extra copy of most types of
+metadata.
+This can improve performance of random writes, because less
+metadata must be written.
+In practice, at worst about 100 blocks
+.Po of
+.Cm recordsize
+bytes each
+.Pc
+of user data can be lost if a single
+on-disk block is corrupt.
+The exact behavior of which metadata blocks
+are stored redundantly may change in future releases.
+.Pp
+The default value is
+.Cm all .
 .It Sy refquota Ns = Ns Ar size | Cm none
 Limits the amount of space a dataset can consume. This property enforces a hard
 limit on the amount of space used. This hard limit does not include space used

Modified: projects/sendfile/contrib/bmake/var.c
==============================================================================
--- projects/sendfile/contrib/bmake/var.c	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/contrib/bmake/var.c	Wed May 28 13:06:53 2014	(r266805)
@@ -141,17 +141,6 @@ __RCSID("$NetBSD: var.c,v 1.184 2013/09/
 
 extern int makelevel;
 /*
- * XXX transition hack for FreeBSD ports.
- * bsd.port.mk can set .MAKE.FreeBSD_UL=yes
- * to cause us to treat :[LU] as aliases for :t[lu]
- * To be reverted when ports converts to :t[lu] (when 8.3 is EOL)
- */
-#define MAKE_FREEBSD_UL ".MAKE.FreeBSD_UL"
-#ifdef MAKE_FREEBSD_UL
-static int FreeBSD_UL = FALSE;
-#endif
-
-/*
  * This lets us tell if we have replaced the original environ
  * (which we cannot free).
  */
@@ -990,12 +979,6 @@ Var_Set(const char *name, const char *va
 
 	Var_Append(MAKEOVERRIDES, name, VAR_GLOBAL);
     }
-	
-#ifdef MAKE_FREEBSD_UL
-    if (strcmp(MAKE_FREEBSD_UL, name) == 0) {
-	FreeBSD_UL = getBoolean(MAKE_FREEBSD_UL, FALSE);
-    }
-#endif
 
 
  out:
@@ -2689,24 +2672,8 @@ ApplyModifiers(char *nstr, const char *t
 		free(loop.str);
 		break;
 	    }
-	case 'U':
-#ifdef MAKE_FREEBSD_UL
-	    if (FreeBSD_UL) {
-		int nc = tstr[1];
-
-		/* we have to be careful, since :U is used internally */
-		if (nc == ':' || nc == endc) {
-		    char *dp = bmake_strdup(nstr);
-		    for (newStr = dp; *dp; dp++)
-			*dp = toupper((unsigned char)*dp);
-		    cp = tstr + 1;
-		    termc = *cp;
-		    break;		/* yes inside the conditional */
-		}
-		/* FALLTHROUGH */
-	    }
-#endif
 	case 'D':
+	case 'U':
 	    {
 		Buffer  buf;    	/* Buffer for patterns */
 		int	    wantit;	/* want data in buffer */
@@ -2766,17 +2733,6 @@ ApplyModifiers(char *nstr, const char *t
 		break;
 	    }
 	case 'L':
-#ifdef MAKE_FREEBSD_UL
-	    if (FreeBSD_UL) {
-		char *dp = bmake_strdup(nstr);
-		for (newStr = dp; *dp; dp++)
-		    *dp = tolower((unsigned char)*dp);
-		cp = tstr + 1;
-		termc = *cp;
-		break;
-	    }
-	    /* FALLTHROUGH */
-#endif
 	    {
 		if ((v->flags & VAR_JUNK) != 0)
 		    v->flags |= VAR_KEEP;

Modified: projects/sendfile/contrib/unbound/libunbound/libworker.h
==============================================================================
--- projects/sendfile/contrib/unbound/libunbound/libworker.h	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/contrib/unbound/libunbound/libworker.h	Wed May 28 13:06:53 2014	(r266805)
@@ -136,10 +136,6 @@ void libworker_delete_event(struct libwo
 /** cleanup the cache to remove all rrset IDs from it, arg is libworker */
 void libworker_alloc_cleanup(void* arg);
 
-/** mesh callback with event results */
-void libworker_event_done_cb(void* arg, int rcode, struct sldns_buffer* buf, 
-	enum sec_status s, char* why_bogus);
-
 /** 
  * fill result from parsed message, on error fills servfail 
  * @param res: is clear at start, filled in at end.

Modified: projects/sendfile/contrib/unbound/libunbound/worker.h
==============================================================================
--- projects/sendfile/contrib/unbound/libunbound/worker.h	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/contrib/unbound/libunbound/worker.h	Wed May 28 13:06:53 2014	(r266805)
@@ -91,6 +91,10 @@ void libworker_fg_done_cb(void* arg, int
 void libworker_bg_done_cb(void* arg, int rcode, sldns_buffer* buf, 
 	enum sec_status s, char* why_bogus);
 
+/** mesh callback with event results */
+void libworker_event_done_cb(void* arg, int rcode, struct sldns_buffer* buf, 
+	enum sec_status s, char* why_bogus);
+
 /**
  * Worker signal handler function. User argument is the worker itself.
  * @param sig: signal number.

Modified: projects/sendfile/release/picobsd/floppy.tree/etc/ttys
==============================================================================
--- projects/sendfile/release/picobsd/floppy.tree/etc/ttys	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/release/picobsd/floppy.tree/etc/ttys	Wed May 28 13:06:53 2014	(r266805)
@@ -32,4 +32,4 @@ ttyp6	none			network secure
 ttyp7	none			network secure
 ttyp8	none			network secure
 ttyp9	none			network secure
-ttyu0   "/usr/libexec/getty std.9600"   dialup  on secure
+ttyu0   "/usr/libexec/getty 3wire"   dialup  on secure

Modified: projects/sendfile/release/picobsd/mfs_tree/etc/gettytab
==============================================================================
--- projects/sendfile/release/picobsd/mfs_tree/etc/gettytab	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/release/picobsd/mfs_tree/etc/gettytab	Wed May 28 13:06:53 2014	(r266805)
@@ -4,12 +4,15 @@
 default:\
 	:cb:ce:ck:lc:fd#1000:cl:im=\r\nPicoBSD (%h) (%t)\r\n\r\n:sp#1200:
 
-P|Pc|Pc console:\
+# 20140527 add nc (no carrier) to the pc console entry to fix
+# devices with no handshake after svn 264175 (this also affects bhyve)
+P|Pc|Pc console|3wire:\
+	:nc:\
 	:ht:np:sp#115200:
 
 # Fixed speed entries
 2|std.9600|9600-baud:\
-	:np:sp#9600:
+	:nc:np:sp#9600:
 g|std.19200|19200-baud:\
 	:np:sp#19200:
 std.38400|38400-baud:\

Modified: projects/sendfile/sbin/ifconfig/ifconfig.8
==============================================================================
--- projects/sendfile/sbin/ifconfig/ifconfig.8	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sbin/ifconfig/ifconfig.8	Wed May 28 13:06:53 2014	(r266805)
@@ -169,6 +169,18 @@ and
 .Dq lladdr
 are synonyms for
 .Dq link .
+When using the
+.Fl l
+flag, the
+.Dq ether
+address family has special meaning and is no longer synonymous with
+.Dq link
+or
+.Dq lladdr .
+Specifying
+.Fl l Dq ether
+will list only ethernet interfaces, excluding all other interface types,
+including the loopback interface.
 .It Ar dest_address
 Specify the address of the correspondent on the other end
 of a point to point link.
@@ -2554,6 +2566,11 @@ The
 .Fl l
 flag may be used to list all available interfaces on the system, with
 no other additional information.
+If an
+.Ar address_family
+is specified, only interfaces of that type will be listed.
+.Fl l Dq ether
+will list only ethernet adapters, excluding the loopback interface.
 Use of this flag is mutually exclusive
 with all other flags and commands, except for
 .Fl d

Modified: projects/sendfile/share/man/man4/iwn.4
==============================================================================
--- projects/sendfile/share/man/man4/iwn.4	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/share/man/man4/iwn.4	Wed May 28 13:06:53 2014	(r266805)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 9, 2014
+.Dd May 28, 2014
 .Dt IWN 4
 .Os
 .Sh NAME
@@ -92,6 +92,7 @@ driver provides support for:
 .It Intel Centrino Advanced-N + WiMAX 6250
 .It Intel Centrino Ultimate-N 6300
 .It Intel Centrino Wireless-N 100
+.It Intel Centrino Wireless-N 105
 .It Intel Centrino Wireless-N 130
 .It Intel Centrino Wireless-N 1000
 .It Intel Centrino Wireless-N 1030

Modified: projects/sendfile/share/man/man5/src.conf.5
==============================================================================
--- projects/sendfile/share/man/man5/src.conf.5	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/share/man/man5/src.conf.5	Wed May 28 13:06:53 2014	(r266805)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
 .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des
 .\" $FreeBSD$
-.Dd May 15, 2014
+.Dd May 27, 2014
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -125,7 +125,7 @@ Set to not build audit support into syst
 Set to not build
 .Xr authpf 8 .
 .It Va WITHOUT_BINUTILS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 264660 2014-04-18 17:03:58Z imp
+.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 266158 2014-05-15 16:51:45Z brooks
 Set to not build or install binutils (as, c++-filt, gconv,
 ld, nm, objcopy, objdump, readelf, size and strip) as part
 of the normal system build.
@@ -363,10 +363,9 @@ Set to not build the Webster dictionary 
 .\" from FreeBSD: head/tools/build/options/WITHOUT_DMAGENT 262335 2014-02-22 13:05:23Z bapt
 Set to not build dma Mail Transport Agent
 .It Va WITHOUT_DOCCOMPRESS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_DOCCOMPRESS 265838 2014-05-10 16:38:54Z imp
+.\" from FreeBSD: head/tools/build/options/WITHOUT_DOCCOMPRESS 266752 2014-05-27 15:52:27Z gjb
 Set to not to install compressed system documentation.
 Only the uncompressed version will be installed.
-
 .It Va WITHOUT_DYNAMICROOT
 .\" from FreeBSD: head/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru
 Set this if you do not want to link
@@ -395,11 +394,10 @@ This includes the device tree compiler (
 Set to not build or install programs
 for operating floppy disk driver.
 .It Va WITH_FMAKE
-.\" from FreeBSD: head/tools/build/options/WITH_FMAKE 265828 2014-05-10 16:37:39Z imp
+.\" from FreeBSD: head/tools/build/options/WITH_FMAKE 266752 2014-05-27 15:52:27Z gjb
 Causes the old FreeBSD 
 .Xr make 1
 program to be built and installed as fmake.
-
 .It Va WITHOUT_FMTREE
 .\" from FreeBSD: head/tools/build/options/WITHOUT_FMTREE 261299 2014-01-30 21:37:43Z brooks
 Set to not build and install
@@ -484,10 +482,9 @@ This is the default on platforms where g
 It is a default setting on
 arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
 .It Va WITHOUT_GNU_GREP_COMPAT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 265826 2014-05-10 16:37:28Z imp
+.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 266752 2014-05-27 15:52:27Z gjb
 Set this option to omit the gnu extentions to grep from being included in 
 BSD grep.
-
 .It Va WITHOUT_GNU_SUPPORT
 .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru
 Set to build some programs without optional GNU support.
@@ -739,11 +736,9 @@ When set, the following options are also
 is set explicitly)
 .El
 .It Va WITHOUT_MANCOMPRESS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_MANCOMPRESS 265838 2014-05-10 16:38:54Z imp
+.\" from FreeBSD: head/tools/build/options/WITHOUT_MANCOMPRESS 266752 2014-05-27 15:52:27Z gjb
 Set to not to install compressed man pages.
 Only the uncompressed versions will be installed.
-
-
 .It Va WITHOUT_MAN_UTILS
 .\" from FreeBSD: head/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim
 Set to not build utilities for manual pages,

Modified: projects/sendfile/share/mk/bsd.opts.mk
==============================================================================
--- projects/sendfile/share/mk/bsd.opts.mk	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/share/mk/bsd.opts.mk	Wed May 28 13:06:53 2014	(r266805)
@@ -40,8 +40,13 @@ __<bsd.opts.mk>__:
 # that haven't been converted over.
 #
 
-# Only these options are used by bsd.*.mk. Most seem legit, except maybe
-# OPENSSH.
+# Only these options are used by bsd.*.mk. KERBEROS and OPENSSH are
+# unforutnately needed to support statically linking the entire
+# tree. su(1) wouldn't link since it depends on PAM which depends on
+# ssh libraries when building with OPENSSH, and likewise for KERBEROS.
+
+# All other variables used to build /usr/src live in src.opts.mk
+# and variables from both files are documented in src.conf(5).
 
 __DEFAULT_YES_OPTIONS = \
     ASSERT_DEBUG \

Modified: projects/sendfile/share/mk/bsd.own.mk
==============================================================================
--- projects/sendfile/share/mk/bsd.own.mk	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/share/mk/bsd.own.mk	Wed May 28 13:06:53 2014	(r266805)
@@ -122,7 +122,7 @@
 .if !target(__<bsd.own.mk>__)
 __<bsd.own.mk>__:
 
-.include <bsd.opts.mk>
+.include <bsd.opts.mk>		# options now here or src.opts.mk
 
 .if !defined(_WITHOUT_SRCCONF)
 

Modified: projects/sendfile/sys/amd64/vmm/intel/vmx.c
==============================================================================
--- projects/sendfile/sys/amd64/vmm/intel/vmx.c	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sys/amd64/vmm/intel/vmx.c	Wed May 28 13:06:53 2014	(r266805)
@@ -1380,8 +1380,30 @@ vmx_emulate_xsetbv(struct vmx *vmx, int 
 		return (HANDLED);
 	}
 
-	if ((xcrval & (XFEATURE_ENABLED_AVX | XFEATURE_ENABLED_SSE)) ==
-	    XFEATURE_ENABLED_AVX) {
+	/* AVX (YMM_Hi128) requires SSE. */
+	if (xcrval & XFEATURE_ENABLED_AVX &&
+	    (xcrval & XFEATURE_AVX) != XFEATURE_AVX) {
+		vm_inject_gp(vmx->vm, vcpu);
+		return (HANDLED);
+	}
+
+	/*
+	 * AVX512 requires base AVX (YMM_Hi128) as well as OpMask,
+	 * ZMM_Hi256, and Hi16_ZMM.
+	 */
+	if (xcrval & XFEATURE_AVX512 &&
+	    (xcrval & (XFEATURE_AVX512 | XFEATURE_AVX)) !=
+	    (XFEATURE_AVX512 | XFEATURE_AVX)) {
+		vm_inject_gp(vmx->vm, vcpu);
+		return (HANDLED);
+	}
+
+	/*
+	 * Intel MPX requires both bound register state flags to be
+	 * set.
+	 */
+	if (((xcrval & XFEATURE_ENABLED_BNDREGS) != 0) !=
+	    ((xcrval & XFEATURE_ENABLED_BNDCSR) != 0)) {
 		vm_inject_gp(vmx->vm, vcpu);
 		return (HANDLED);
 	}

Modified: projects/sendfile/sys/amd64/vmm/vmm_host.c
==============================================================================
--- projects/sendfile/sys/amd64/vmm/vmm_host.c	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sys/amd64/vmm/vmm_host.c	Wed May 28 13:06:53 2014	(r266805)
@@ -66,11 +66,16 @@ vmm_host_state_init(void)
 	 * XSAVE.  Only permit a guest to use XSAVE features supported
 	 * by the host.  This ensures that the FPU state used by the
 	 * guest is always a subset of the saved guest FPU state.
+	 *
+	 * In addition, only permit known XSAVE features where the
+	 * rules for which features depend on other features is known
+	 * to properly emulate xsetbv.
 	 */
 	if (vmm_host_cr4 & CR4_XSAVE) {
 		vmm_xsave_limits.xsave_enabled = 1;
 		vmm_host_xcr0 = rxcr(0);
-		vmm_xsave_limits.xcr0_allowed = vmm_host_xcr0;
+		vmm_xsave_limits.xcr0_allowed = vmm_host_xcr0 &
+		    (XFEATURE_AVX | XFEATURE_MPX | XFEATURE_AVX512);
 
 		cpuid_count(0xd, 0x0, regs);
 		vmm_xsave_limits.xsave_max_size = regs[1];

Modified: projects/sendfile/sys/amd64/vmm/x86.c
==============================================================================
--- projects/sendfile/sys/amd64/vmm/x86.c	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sys/amd64/vmm/x86.c	Wed May 28 13:06:53 2014	(r266805)
@@ -241,6 +241,26 @@ x86_emulate_cpuid(struct vm *vm, int vcp
 
 			/* leaf 0 */
 			if (*ecx == 0) {
+				cpuid_count(*eax, *ecx, regs);
+
+				/* Only leaf 0 is supported */
+				regs[0] = 0;
+
+				/*
+				 * Expose known-safe features.
+				 */
+				regs[1] &= (CPUID_STDEXT_FSGSBASE |
+				    CPUID_STDEXT_BMI1 | CPUID_STDEXT_HLE |
+				    CPUID_STDEXT_AVX2 | CPUID_STDEXT_BMI2 |
+				    CPUID_STDEXT_ERMS | CPUID_STDEXT_RTM |
+				    CPUID_STDEXT_AVX512F |
+				    CPUID_STDEXT_AVX512PF |
+				    CPUID_STDEXT_AVX512ER |
+				    CPUID_STDEXT_AVX512CD);
+				regs[2] = 0;
+				regs[3] = 0;
+
+				/* Advertise INVPCID if it is enabled. */
 				error = vm_get_capability(vm, vcpu_id,
 				    VM_CAP_ENABLE_INVPCID, &enable_invpcid);
 				if (error == 0 && enable_invpcid)

Modified: projects/sendfile/sys/arm/conf/CHROMEBOOK
==============================================================================
--- projects/sendfile/sys/arm/conf/CHROMEBOOK	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sys/arm/conf/CHROMEBOOK	Wed May 28 13:06:53 2014	(r266805)
@@ -1,4 +1,4 @@
-# Kernel configuration for Samsung Chromebook (Exynos5 Dual machine).
+# Kernel configuration for Chromebook (Exynos5 Dual machine).
 #
 # For more information on this file, please read the config(5) manual page,
 # and/or the handbook section on Kernel Configuration Files:
@@ -34,5 +34,3 @@ device		ukbd
 
 #FDT
 options 	FDT
-options 	FDT_DTB_STATIC
-makeoptions	FDT_DTS_FILE=exynos5250-chromebook.dts

Copied: projects/sendfile/sys/arm/conf/CHROMEBOOK-SNOW (from r266804, head/sys/arm/conf/CHROMEBOOK-SNOW)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/sendfile/sys/arm/conf/CHROMEBOOK-SNOW	Wed May 28 13:06:53 2014	(r266805, copy of r266804, head/sys/arm/conf/CHROMEBOOK-SNOW)
@@ -0,0 +1,28 @@
+# Kernel configuration for Samsung Chromebook (Exynos5 Dual machine).
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+#NO_UNIVERSE
+
+include		"CHROMEBOOK"
+ident		CHROMEBOOK-SNOW
+
+#FDT
+options 	FDT
+options 	FDT_DTB_STATIC
+makeoptions	FDT_DTS_FILE=exynos5250-chromebook-snow.dts

Copied: projects/sendfile/sys/arm/conf/CHROMEBOOK-SPRING (from r266804, head/sys/arm/conf/CHROMEBOOK-SPRING)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/sendfile/sys/arm/conf/CHROMEBOOK-SPRING	Wed May 28 13:06:53 2014	(r266805, copy of r266804, head/sys/arm/conf/CHROMEBOOK-SPRING)
@@ -0,0 +1,28 @@
+# Kernel configuration for HP Chromebook 11 (Exynos5 Dual machine).
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+#NO_UNIVERSE
+
+include		"CHROMEBOOK"
+ident		CHROMEBOOK-SPRING
+
+#FDT
+options 	FDT
+options 	FDT_DTB_STATIC
+makeoptions	FDT_DTS_FILE=exynos5250-chromebook-spring.dts

Modified: projects/sendfile/sys/arm/conf/EXYNOS5250.common
==============================================================================
--- projects/sendfile/sys/arm/conf/EXYNOS5250.common	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sys/arm/conf/EXYNOS5250.common	Wed May 28 13:06:53 2014	(r266805)
@@ -31,6 +31,7 @@ options 	INET			# InterNETworking
 options 	INET6			# IPv6 communications protocols
 options 	GEOM_PART_BSD		# BSD partition scheme
 options 	GEOM_PART_MBR		# MBR partition scheme
+options 	GEOM_PART_GPT		# GUID partition tables
 options 	TMPFS			# Efficient memory filesystem
 options 	FFS			# Berkeley Fast Filesystem
 options 	SOFTUPDATES

Modified: projects/sendfile/sys/arm/samsung/exynos/chrome_ec.c
==============================================================================
--- projects/sendfile/sys/arm/samsung/exynos/chrome_ec.c	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sys/arm/samsung/exynos/chrome_ec.c	Wed May 28 13:06:53 2014	(r266805)
@@ -60,12 +60,11 @@ __FBSDID("$FreeBSD$");
 
 #include <arm/samsung/exynos/chrome_ec.h>
 
-/* TODO: export to DTS */
-#define OUR_GPIO	177
-#define EC_GPIO		168
-
 struct ec_softc {
 	device_t	dev;
+	int		have_arbitrator;
+	pcell_t		our_gpio;
+	pcell_t		ec_gpio;
 };
 
 struct ec_softc *ec_sc;
@@ -82,17 +81,24 @@ bus_claim(struct ec_softc *sc)
 	device_t gpio_dev;
 	int status;
 
+	if (sc->our_gpio == 0 || sc->ec_gpio == 0) {
+		device_printf(sc->dev, "i2c arbitrator is not configured\n");
+		return (1);
+	}
+
 	gpio_dev = devclass_get_device(devclass_find("gpio"), 0);
-        if (gpio_dev == NULL) {
+	if (gpio_dev == NULL) {
 		device_printf(sc->dev, "cant find gpio_dev\n");
 		return (1);
 	}
 
 	/* Say we want the bus */
-	GPIO_PIN_SET(gpio_dev, OUR_GPIO, GPIO_PIN_LOW);
+	GPIO_PIN_SET(gpio_dev, sc->our_gpio, GPIO_PIN_LOW);
+
+	/* TODO(imax): insert a delay to allow EC to react. */
 
 	/* Check EC decision */
-	GPIO_PIN_GET(gpio_dev, EC_GPIO, &status);
+	GPIO_PIN_GET(gpio_dev, sc->ec_gpio, &status);
 
 	if (status == 1) {
 		/* Okay. We have bus */
@@ -108,13 +114,18 @@ bus_release(struct ec_softc *sc)
 {
 	device_t gpio_dev;
 
+	if (sc->our_gpio == 0 || sc->ec_gpio == 0) {
+		device_printf(sc->dev, "i2c arbitrator is not configured\n");
+		return (1);
+	}
+
 	gpio_dev = devclass_get_device(devclass_find("gpio"), 0);
-        if (gpio_dev == NULL) {
+	if (gpio_dev == NULL) {
 		device_printf(sc->dev, "cant find gpio_dev\n");
 		return (1);
 	}
 
-	GPIO_PIN_SET(gpio_dev, OUR_GPIO, GPIO_PIN_HIGH);
+	GPIO_PIN_SET(gpio_dev, sc->our_gpio, GPIO_PIN_HIGH);
 
 	return (0);
 }
@@ -209,6 +220,28 @@ int ec_hello(void)
 	return (0);
 }
 
+static void
+configure_i2c_arbitrator(struct ec_softc *sc)
+{
+	phandle_t arbitrator;
+
+	/* TODO(imax): look for compatible entry instead of hard-coded path */
+	arbitrator = OF_finddevice("/i2c-arbitrator");
+	if (arbitrator > 0 &&
+	    OF_hasprop(arbitrator, "freebsd,our-gpio") &&
+	    OF_hasprop(arbitrator, "freebsd,ec-gpio")) {
+		sc->have_arbitrator = 1;
+		OF_getencprop(arbitrator, "freebsd,our-gpio",
+		    &sc->our_gpio, sizeof(sc->our_gpio));
+		OF_getencprop(arbitrator, "freebsd,ec-gpio",
+		    &sc->ec_gpio, sizeof(sc->ec_gpio));
+	} else {
+		sc->have_arbitrator = 0;
+		sc->our_gpio = 0;
+		sc->ec_gpio = 0;
+	}
+}
+
 static int
 ec_attach(device_t dev)
 {
@@ -219,6 +252,8 @@ ec_attach(device_t dev)
 
 	ec_sc = sc;
 
+	configure_i2c_arbitrator(sc);
+
 	/*
 	 * Claim the bus.
 	 *
@@ -227,7 +262,7 @@ ec_attach(device_t dev)
 	 *
 	 */
 
-	if (bus_claim(sc) != 0) {
+	if (sc->have_arbitrator && bus_claim(sc) != 0) {
 		return (ENXIO);
 	}
 
@@ -241,7 +276,9 @@ ec_detach(device_t dev)
 
 	sc = device_get_softc(dev);
 
-	bus_release(sc);
+	if (sc->have_arbitrator) {
+		bus_release(sc);
+	}
 
 	return (0);
 }

Modified: projects/sendfile/sys/arm/samsung/exynos/chrome_kb.c
==============================================================================
--- projects/sendfile/sys/arm/samsung/exynos/chrome_kb.c	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sys/arm/samsung/exynos/chrome_kb.c	Wed May 28 13:06:53 2014	(r266805)
@@ -131,6 +131,7 @@ struct ckb_softc {
 	int			rows;
 	int			cols;
 	device_t		dev;
+	device_t		gpio_dev;
 	struct thread		*sc_poll_thread;
 
 	uint8_t			*scan_local;
@@ -331,6 +332,7 @@ ckb_read_char_locked(keyboard_t *kbd, in
 	uint16_t key;
 	int oldbit;
 	int newbit;
+	int status;
 
 	sc = kbd->kb_data;
 
@@ -347,7 +349,20 @@ ckb_read_char_locked(keyboard_t *kbd, in
 	};
 
 	if (sc->sc_flags & CKB_FLAG_POLLING) {
-		/* TODO */
+		for (;;) {
+			GPIO_PIN_GET(sc->gpio_dev, KB_GPIO_INT, &status);
+			if (status == 0) {
+				if (ec_command(EC_CMD_MKBP_STATE, sc->scan, sc->cols,
+				    sc->scan, sc->cols)) {
+					return (NOKEY);
+				}
+				break;
+			}
+			if (!wait) {
+				return (NOKEY);
+			}
+			DELAY(1000);
+		}
 	};
 
 	for (i = 0; i < sc->cols; i++) {
@@ -710,6 +725,12 @@ chrome_kb_attach(device_t dev)
 	if ((error = parse_dts(sc)) != 0)
 		return error;
 
+	sc->gpio_dev = devclass_get_device(devclass_find("gpio"), 0);
+	if (sc->gpio_dev == NULL) {
+		device_printf(sc->dev, "Can't find gpio device.\n");
+		return (ENXIO);
+	}
+
 #if 0
 	device_printf(sc->dev, "Keyboard matrix [%dx%d]\n",
 	    sc->cols, sc->rows);

Copied: projects/sendfile/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dts (from r266804, head/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dts)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/sendfile/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dts	Wed May 28 13:06:53 2014	(r266805, copy of r266804, head/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dts)
@@ -0,0 +1,77 @@
+/*-
+ * Copyright (c) 2014 Ruslan Bukin <br at bsdpad.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/dts-v1/;
+
+/include/ "exynos5250.dtsi"
+
+/ {
+	model = "Samsung Chromebook";
+
+	memory {
+		device_type = "memory";
+		reg = < 0x40000000 0x80000000 >;  /* 2G */
+	};
+
+	SOC: Exynos5 at 0 {
+
+		pad0: pad at 11400000 {
+			status = "okay";
+		};
+
+		fimd0: fimd at 14400000 {
+			status = "okay";
+
+			panel-size = < 1366 768 >;
+			panel-hsync = < 80 32 48 >;
+			panel-vsync = < 14 5 3 >;
+			panel-clk-div = < 17 >;
+			panel-backlight-pin = < 25 >;
+		};
+
+		i2c4: i2c at 12CA0000 {
+			status = "okay";
+		};
+
+		keyboard-controller {
+			compatible = "google,cros-ec-keyb";
+			keypad,num-rows = <8>;
+			keypad,num-columns = <13>;
+		};
+	};
+
+	i2c-arbitrator {
+		freebsd,our-gpio = <177>;
+		freebsd,ec-gpio = <168>;
+	};
+
+	chosen {
+		stdin = &serial2;
+		stdout = &serial2;
+	};
+};

Copied: projects/sendfile/sys/boot/fdt/dts/arm/exynos5250-chromebook-spring.dts (from r266804, head/sys/boot/fdt/dts/arm/exynos5250-chromebook-spring.dts)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/sendfile/sys/boot/fdt/dts/arm/exynos5250-chromebook-spring.dts	Wed May 28 13:06:53 2014	(r266805, copy of r266804, head/sys/boot/fdt/dts/arm/exynos5250-chromebook-spring.dts)
@@ -0,0 +1,72 @@
+/*-
+ * Copyright (c) 2014 Ruslan Bukin <br at bsdpad.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/dts-v1/;
+
+/include/ "exynos5250.dtsi"
+
+/ {
+	model = "HP Chromebook 11";
+
+	memory {
+		device_type = "memory";
+		reg = < 0x40000000 0x80000000 >;  /* 2G */
+	};
+
+	SOC: Exynos5 at 0 {
+
+		pad0: pad at 11400000 {
+			status = "okay";
+		};
+
+		fimd0: fimd at 14400000 {
+			status = "okay";
+
+			panel-size = < 1366 768 >;
+			panel-hsync = < 80 32 48 >;
+			panel-vsync = < 14 5 3 >;
+			panel-clk-div = < 17 >;
+			panel-backlight-pin = < 25 >;
+		};
+
+		i2c4: i2c at 12CA0000 {
+			status = "okay";
+		};
+
+		keyboard-controller {
+			compatible = "google,cros-ec-keyb";
+			keypad,num-rows = <8>;
+			keypad,num-columns = <13>;
+		};
+	};
+
+	chosen {
+		stdin = &serial2;
+		stdout = &serial2;
+	};
+};

Modified: projects/sendfile/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
==============================================================================
--- projects/sendfile/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c	Wed May 28 13:06:53 2014	(r266805)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  */
@@ -206,7 +206,18 @@ zfs_prop_init(void)
 		{ NULL }
 	};
 
+	static zprop_index_t redundant_metadata_table[] = {
+		{ "all",	ZFS_REDUNDANT_METADATA_ALL },
+		{ "most",	ZFS_REDUNDANT_METADATA_MOST },
+		{ NULL }
+	};
+
 	/* inherit index properties */
+	zprop_register_index(ZFS_PROP_REDUNDANT_METADATA, "redundant_metadata",
+	    ZFS_REDUNDANT_METADATA_ALL,
+	    PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
+	    "all | most", "REDUND_MD",
+	    redundant_metadata_table);
 	zprop_register_index(ZFS_PROP_SYNC, "sync", ZFS_SYNC_STANDARD,
 	    PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
 	    "standard | always | disabled", "SYNC",

Modified: projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
==============================================================================
--- projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Wed May 28 13:06:53 2014	(r266805)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  */
 /* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */
 /* Copyright (c) 2013, Joyent, Inc. All rights reserved. */
@@ -1630,6 +1630,12 @@ TUNABLE_INT("vfs.zfs.mdcomp_disable", &z
 SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RW,
     &zfs_mdcomp_disable, 0, "Disable metadata compression");
 
+/*
+ * When the "redundant_metadata" property is set to "most", only indirect
+ * blocks of this level and higher will have an additional ditto block.
+ */
+int zfs_redundant_metadata_most_ditto_level = 2;
+
 void
 dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp)
 {
@@ -1669,6 +1675,13 @@ dmu_write_policy(objset_t *os, dnode_t *
 		if (zio_checksum_table[checksum].ci_correctable < 1 ||
 		    zio_checksum_table[checksum].ci_eck)
 			checksum = ZIO_CHECKSUM_FLETCHER_4;
+
+		if (os->os_redundant_metadata == ZFS_REDUNDANT_METADATA_ALL ||
+		    (os->os_redundant_metadata ==
+		    ZFS_REDUNDANT_METADATA_MOST &&
+		    (level >= zfs_redundant_metadata_most_ditto_level ||
+		    DMU_OT_IS_METADATA(type) || (wp & WP_SPILL))))
+			copies++;
 	} else if (wp & WP_NOFILL) {
 		ASSERT(level == 0);
 
@@ -1716,7 +1729,7 @@ dmu_write_policy(objset_t *os, dnode_t *
 	zp->zp_compress = compress;
 	zp->zp_type = (wp & WP_SPILL) ? dn->dn_bonustype : type;
 	zp->zp_level = level;
-	zp->zp_copies = MIN(copies + ismd, spa_max_replication(os->os_spa));
+	zp->zp_copies = MIN(copies, spa_max_replication(os->os_spa));
 	zp->zp_dedup = dedup;
 	zp->zp_dedup_verify = dedup && dedup_verify;
 	zp->zp_nopwrite = nopwrite;

Modified: projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
==============================================================================
--- projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c	Wed May 28 13:01:10 2014	(r266804)
+++ projects/sendfile/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c	Wed May 28 13:06:53 2014	(r266805)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  */
@@ -115,13 +115,13 @@ dmu_objset_id(objset_t *os)
 	return (ds ? ds->ds_object : 0);
 }
 
-uint64_t
+zfs_sync_type_t
 dmu_objset_syncprop(objset_t *os)
 {
 	return (os->os_sync);
 }
 
-uint64_t
+zfs_logbias_op_t
 dmu_objset_logbias(objset_t *os)
 {
 	return (os->os_logbias);
@@ -230,6 +230,20 @@ sync_changed_cb(void *arg, uint64_t newv
 }
 
 static void
+redundant_metadata_changed_cb(void *arg, uint64_t newval)
+{
+	objset_t *os = arg;
+
+	/*
+	 * Inheritance and range checking should have been done by now.
+	 */
+	ASSERT(newval == ZFS_REDUNDANT_METADATA_ALL ||
+	    newval == ZFS_REDUNDANT_METADATA_MOST);
+
+	os->os_redundant_metadata = newval;
+}
+
+static void
 logbias_changed_cb(void *arg, uint64_t newval)
 {
 	objset_t *os = arg;
@@ -364,6 +378,12 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat
 				    zfs_prop_to_name(ZFS_PROP_SYNC),
 				    sync_changed_cb, os);
 			}
+			if (err == 0) {
+				err = dsl_prop_register(ds,
+				    zfs_prop_to_name(
+				    ZFS_PROP_REDUNDANT_METADATA),
+				    redundant_metadata_changed_cb, os);
+			}
 		}
 		if (err != 0) {
 			VERIFY(arc_buf_remove_ref(os->os_phys_buf,
@@ -377,9 +397,9 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat
 		os->os_compress = ZIO_COMPRESS_LZJB;
 		os->os_copies = spa_max_replication(spa);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list