--- old/usr/src/common/zfs/zpool_prop.c	Mon Aug  5 17:15:52 2019
+++ new/usr/src/common/zfs/zpool_prop.c	Mon Aug  5 17:15:52 2019
@@ -18,15 +18,17 @@
  *
  * CDDL HEADER END
  */
+
 /*
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2017 Nexenta Systems, Inc.
  */
 
 #include <sys/zio.h>
 #include <sys/spa.h>
+#include <sys/special.h>
 #include <sys/zfs_acl.h>
 #include <sys/zfs_ioctl.h>
 #include <sys/fs/zfs.h>
@@ -58,6 +60,13 @@
 		{ NULL }
 	};
 
+	static zprop_index_t meta_placement_table[] = {
+		{ "off",	META_PLACEMENT_OFF},
+		{ "on",		META_PLACEMENT_ON},
+		{ "dual",	META_PLACEMENT_DUAL},
+		{ NULL }
+	};
+
 	static zprop_index_t failuremode_table[] = {
 		{ "wait",	ZIO_FAILURE_MODE_WAIT },
 		{ "continue",	ZIO_FAILURE_MODE_CONTINUE },
@@ -65,6 +74,21 @@
 		{ NULL }
 	};
 
+	static zprop_index_t sync_to_special_table[] = {
+		{ "disabled",	SYNC_TO_SPECIAL_DISABLED },
+		{ "standard",	SYNC_TO_SPECIAL_STANDARD },
+		{ "balanced",	SYNC_TO_SPECIAL_BALANCED },
+		{ "always",	SYNC_TO_SPECIAL_ALWAYS},
+		{ NULL }
+	};
+
+	/*
+	 * NOTE: When either adding or changing a property make sure
+	 * to update the zfs-tests zpool_get configuration file
+	 * at usr/src/test/zfs-tests/tests/functional/cli_root/zpool_get/
+	 * zpool_get.cfg
+	 */
+
 	/* string properties */
 	zprop_register_string(ZPOOL_PROP_ALTROOT, "altroot", NULL, PROP_DEFAULT,
 	    ZFS_TYPE_POOL, "<path>", "ALTROOT");
@@ -99,6 +123,9 @@
 	zprop_register_number(ZPOOL_PROP_DEDUPRATIO, "dedupratio", 0,
 	    PROP_READONLY, ZFS_TYPE_POOL, "<1.00x or higher if deduped>",
 	    "DEDUP");
+	zprop_register_index(ZPOOL_PROP_DDTCAPPED, "ddt_capped", 0,
+	    PROP_READONLY, ZFS_TYPE_POOL, "off | on", "DDT_CAPPED",
+	    boolean_table);
 
 	/* system partition size */
 	zprop_register_number(ZPOOL_PROP_BOOTSIZE, "bootsize", 0, PROP_ONETIME,
@@ -109,12 +136,27 @@
 	    PROP_DEFAULT, ZFS_TYPE_POOL, "<version>", "VERSION");
 	zprop_register_number(ZPOOL_PROP_DEDUPDITTO, "dedupditto", 0,
 	    PROP_DEFAULT, ZFS_TYPE_POOL, "<threshold (min 100)>", "DEDUPDITTO");
+	zprop_register_number(ZPOOL_PROP_DEDUPMETA_DITTO, "dedup_meta_ditto", 0,
+	    PROP_DEFAULT, ZFS_TYPE_POOL, "<number of copies>",
+	    "DEDUP_META_DITTO");
+	zprop_register_number(ZPOOL_PROP_DEDUP_LO_BEST_EFFORT,
+	    "dedup_lo_best_effort", 60, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "0-100", "DEDUP_LO_BEST_EFFORT");
+	zprop_register_number(ZPOOL_PROP_DEDUP_HI_BEST_EFFORT,
+	    "dedup_hi_best_effort", 80, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "0-100", "DEDUP_HI_BEST_EFFORT");
+	zprop_register_number(ZPOOL_PROP_SCRUB_PRIO,
+	    "scrubprio", 5, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "0-100", "SCRUB_PRIO");
+	zprop_register_number(ZPOOL_PROP_RESILVER_PRIO,
+	    "resilverprio", 10, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "0-100", "RESILVER_PRIO");
 
 	/* default index (boolean) properties */
 	zprop_register_index(ZPOOL_PROP_DELEGATION, "delegation", 1,
 	    PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "DELEGATION",
 	    boolean_table);
-	zprop_register_index(ZPOOL_PROP_AUTOREPLACE, "autoreplace", 0,
+	zprop_register_index(ZPOOL_PROP_AUTOREPLACE, "autoreplace", 1,
 	    PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "REPLACE", boolean_table);
 	zprop_register_index(ZPOOL_PROP_LISTSNAPS, "listsnapshots", 0,
 	    PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "LISTSNAPS",
@@ -123,12 +165,64 @@
 	    PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "EXPAND", boolean_table);
 	zprop_register_index(ZPOOL_PROP_READONLY, "readonly", 0,
 	    PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "RDONLY", boolean_table);
+	zprop_register_index(ZPOOL_PROP_DDT_DESEGREGATION, "ddt_desegregation",
+	    0, PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "DDT_DESEG",
+	    boolean_table);
+	zprop_register_index(ZPOOL_PROP_DEDUP_BEST_EFFORT, "dedup_best_effort",
+	    0, PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "DEDUP_BEST_EFFORT",
+	    boolean_table);
 
+	zprop_register_index(ZPOOL_PROP_META_PLACEMENT, "meta_placement", 0,
+	    PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "META_PLCMNT",
+	    boolean_table);
+	zprop_register_index(ZPOOL_PROP_SYNC_TO_SPECIAL, "sync_to_special",
+	    SYNC_TO_SPECIAL_STANDARD, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "disabled | standard | balanced | always", "SYNC_TO_SPECIAL",
+	    sync_to_special_table);
+	zprop_register_index(ZPOOL_PROP_DDT_META_TO_METADEV,
+	    "ddt_meta_to_metadev", META_PLACEMENT_OFF, PROP_DEFAULT,
+	    ZFS_TYPE_POOL, "on | dual | off",
+	    "DDTMETA_TO_MD", meta_placement_table);
+	zprop_register_index(ZPOOL_PROP_ZFS_META_TO_METADEV,
+	    "zfs_meta_to_metadev", META_PLACEMENT_OFF, PROP_DEFAULT,
+	    ZFS_TYPE_POOL, "on | dual | off",
+	    "ZFSMETA_TO_MD", meta_placement_table);
+
 	/* default index properties */
 	zprop_register_index(ZPOOL_PROP_FAILUREMODE, "failmode",
 	    ZIO_FAILURE_MODE_WAIT, PROP_DEFAULT, ZFS_TYPE_POOL,
 	    "wait | continue | panic", "FAILMODE", failuremode_table);
+	zprop_register_index(ZPOOL_PROP_FORCETRIM, "forcetrim",
+	    SPA_FORCE_TRIM_OFF, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "on | off", "FORCETRIM", boolean_table);
+	zprop_register_index(ZPOOL_PROP_AUTOTRIM, "autotrim",
+	    SPA_AUTO_TRIM_OFF, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "on | off", "AUTOTRIM", boolean_table);
 
+	/* special device status (enabled/disabled) */
+	zprop_register_index(ZPOOL_PROP_ENABLESPECIAL, "enablespecial", 0,
+	    PROP_READONLY, ZFS_TYPE_POOL, "on | off", "ENABLESPECIAL",
+	    boolean_table);
+
+	/* pool's min watermark in percents (for write cache) */
+	zprop_register_number(ZPOOL_PROP_MINWATERMARK, "min-watermark",
+	    20, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "<watermark 0-100%>", "MINWATERMARK");
+
+	/* pool's low watermark in percents (for write cache) */
+	zprop_register_number(ZPOOL_PROP_LOWATERMARK, "low-watermark",
+	    60, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "<watermark 0-100%>", "LOWATERMARK");
+
+	/* pool's high watermark in percents (for write cache) */
+	zprop_register_number(ZPOOL_PROP_HIWATERMARK, "high-watermark",
+	    80, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "<watermark 0-100%>", "HIWATERMARK");
+
+	zprop_register_number(ZPOOL_PROP_SMALL_DATA_TO_METADEV,
+	    "small_data_to_metadev", 0, PROP_DEFAULT, ZFS_TYPE_POOL,
+	    "Threshold to route to md", "SMALLDATA_TO_MD");
+
 	/* hidden properties */
 	zprop_register_hidden(ZPOOL_PROP_NAME, "name", PROP_TYPE_STRING,
 	    PROP_READONLY, ZFS_TYPE_POOL, "NAME");
