aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2019-11-06 08:58:03 +0000
committerAndriy Gapon <avg@FreeBSD.org>2019-11-06 08:58:03 +0000
commit41e8562cdc86ecf5f8d662c3db12b84596a07ff6 (patch)
tree636f669cec1ec7decfb316e4631656449105e225 /common
parentdb46f5eb51be9602d298a84b1d77d50be3336fea (diff)
downloadsrc-41e8562cdc86ecf5f8d662c3db12b84596a07ff6.tar.gz
src-41e8562cdc86ecf5f8d662c3db12b84596a07ff6.zip
10601 10757 Pool allocation classes
illumos/illumos-gate@663207adb1669640c01c5ec6949ce78fd806efae https://github.com/illumos/illumos-gate/commit/663207adb1669640c01c5ec6949ce78fd806efae 10601 Pool allocation classes https://www.illumos.org/issues/10601 illumos port of ZoL Pool allocation classes. Includes at least these two commits: 441709695 Pool allocation classes misplacing small file blocks cc99f275a Pool allocation classes 10757 Add -gLp to zpool subcommands for alt vdev names https://www.illumos.org/issues/10757 Port from ZoL of d2f3e292d Add -gLp to zpool subcommands for alt vdev names Note that a subsequent ZoL commit changed -p to -P a77f29f93 Change full path subcommand flag from -p to -P Portions contributed by: Jerry Jelinek <jerry.jelinek@joyent.com> Portions contributed by: HÃ¥kan Johansson <f96hajo@chalmers.se> Portions contributed by: Richard Yao <ryao@gentoo.org> Portions contributed by: Chunwei Chen <david.chen@nutanix.com> Portions contributed by: loli10K <ezomori.nozomu@gmail.com> Author: Don Brady <don.brady@delphix.com>
Notes
Notes: svn path=/vendor-sys/illumos/dist/; revision=354382
Diffstat (limited to 'common')
-rw-r--r--common/zfs/zfeature_common.c10
-rw-r--r--common/zfs/zfeature_common.h2
-rw-r--r--common/zfs/zfs_prop.c3
3 files changed, 14 insertions, 1 deletions
diff --git a/common/zfs/zfeature_common.c b/common/zfs/zfeature_common.c
index ae7a06802796..b4e80758eee6 100644
--- a/common/zfs/zfeature_common.c
+++ b/common/zfs/zfeature_common.c
@@ -20,11 +20,12 @@
*/
/*
- * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2018 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
* Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2014 Integros [integros.com]
+ * Copyright (c) 2017, Intel Corporation.
*/
#ifdef _KERNEL
@@ -298,4 +299,11 @@ zpool_feature_init(void)
"Reduce memory used by removed devices when their blocks are "
"freed or remapped.",
ZFEATURE_FLAG_READONLY_COMPAT, obsolete_counts_deps);
+
+ {
+ zfeature_register(SPA_FEATURE_ALLOCATION_CLASSES,
+ "org.zfsonlinux:allocation_classes", "allocation_classes",
+ "Support for separate allocation classes.",
+ ZFEATURE_FLAG_READONLY_COMPAT, NULL);
+ }
}
diff --git a/common/zfs/zfeature_common.h b/common/zfs/zfeature_common.h
index 3376b9921bac..af29560ae902 100644
--- a/common/zfs/zfeature_common.h
+++ b/common/zfs/zfeature_common.h
@@ -24,6 +24,7 @@
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
* Copyright (c) 2014 Integros [integros.com]
+ * Copyright (c) 2017, Intel Corporation.
*/
#ifndef _ZFEATURE_COMMON_H
@@ -61,6 +62,7 @@ typedef enum spa_feature {
SPA_FEATURE_OBSOLETE_COUNTS,
SPA_FEATURE_POOL_CHECKPOINT,
SPA_FEATURE_SPACEMAP_V2,
+ SPA_FEATURE_ALLOCATION_CLASSES,
SPA_FEATURES
} spa_feature_t;
diff --git a/common/zfs/zfs_prop.c b/common/zfs/zfs_prop.c
index ee792afc0afd..2e1a5421f535 100644
--- a/common/zfs/zfs_prop.c
+++ b/common/zfs/zfs_prop.c
@@ -435,6 +435,9 @@ zfs_prop_init(void)
zprop_register_number(ZFS_PROP_RECORDSIZE, "recordsize",
SPA_OLD_MAXBLOCKSIZE, PROP_INHERIT,
ZFS_TYPE_FILESYSTEM, "512 to 1M, power of 2", "RECSIZE");
+ zprop_register_number(ZFS_PROP_SPECIAL_SMALL_BLOCKS,
+ "special_small_blocks", 0, PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
+ "zero or 512 to 128K, power of 2", "SPECIAL_SMALL_BLOCKS");
/* hidden properties */
zprop_register_hidden(ZFS_PROP_REMAPTXG, "remaptxg", PROP_TYPE_NUMBER,