summaryrefslogtreecommitdiffstats
path: root/module/zcommon/zpool_prop.c
diff options
context:
space:
mode:
authorLOLi <[email protected]>2017-05-03 18:31:05 +0200
committerBrian Behlendorf <[email protected]>2017-05-03 09:31:05 -0700
commitdddef7d600580ea35177299fe8394f665cc13387 (patch)
tree980db4683bb602f8ef7925739517563520d8b357 /module/zcommon/zpool_prop.c
parent9d3f7b87919b7d0d869153ca72844f565cd0bf52 (diff)
More ashift improvements
This commit allow higher ashift values (up to 16) in 'zpool create' The ashift value was previously limited to 13 (8K block) in b41c990 because the limited number of uberblocks we could fit in the statically sized (128K) vdev label ring buffer could prevent the ability the safely roll back a pool to recover it. Since b02fe35 the largest uberblock size we support is 8K: this allow us to store a minimum number of 16 uberblocks in the vdev label, even with higher ashift values. Additionally change 'ashift' pool property behaviour: if set it will be used as the default hint value in subsequent vdev operations ('zpool add', 'attach' and 'replace'). A custom ashift value can still be specified from the command line, if desired. Finally, fix a bug in add-o_ashift.ksh caused by a missing variable. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #2024 Closes #4205 Closes #4740 Closes #5763
Diffstat (limited to 'module/zcommon/zpool_prop.c')
-rw-r--r--module/zcommon/zpool_prop.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/module/zcommon/zpool_prop.c b/module/zcommon/zpool_prop.c
index 4a5836e5b..77b4d62ff 100644
--- a/module/zcommon/zpool_prop.c
+++ b/module/zcommon/zpool_prop.c
@@ -99,15 +99,13 @@ zpool_prop_init(void)
PROP_READONLY, ZFS_TYPE_POOL, "<1.00x or higher if deduped>",
"DEDUP");
- /* readonly onetime number properties */
- zprop_register_number(ZPOOL_PROP_ASHIFT, "ashift", 0, PROP_ONETIME,
- ZFS_TYPE_POOL, "<ashift, 9-13, or 0=default>", "ASHIFT");
-
/* default number properties */
zprop_register_number(ZPOOL_PROP_VERSION, "version", SPA_VERSION,
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_ASHIFT, "ashift", 0, PROP_DEFAULT,
+ ZFS_TYPE_POOL, "<ashift, 9-16, or 0=default>", "ASHIFT");
/* default index (boolean) properties */
zprop_register_index(ZPOOL_PROP_DELEGATION, "delegation", 1,