summaryrefslogtreecommitdiff
path: root/usr/src/common/zfs/zfeature_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/common/zfs/zfeature_common.h')
-rw-r--r--usr/src/common/zfs/zfeature_common.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/usr/src/common/zfs/zfeature_common.h b/usr/src/common/zfs/zfeature_common.h
index 6387eb4731..0664458794 100644
--- a/usr/src/common/zfs/zfeature_common.h
+++ b/usr/src/common/zfs/zfeature_common.h
@@ -38,36 +38,39 @@ extern "C" {
struct zfeature_info;
+typedef enum spa_feature {
+ SPA_FEATURE_NONE = -1,
+ SPA_FEATURE_ASYNC_DESTROY,
+ SPA_FEATURE_EMPTY_BPOBJ,
+ SPA_FEATURE_LZ4_COMPRESS,
+ SPA_FEATURE_FS_SS_LIMIT,
+ SPA_FEATURE_MULTI_VDEV_CRASH_DUMP,
+ SPA_FEATURE_SPACEMAP_HISTOGRAM,
+ SPA_FEATURE_EXTENSIBLE_DATASET,
+ SPA_FEATURES
+} spa_feature_t;
+
typedef struct zfeature_info {
+ spa_feature_t fi_feature;
const char *fi_uname; /* User-facing feature name */
const char *fi_guid; /* On-disk feature identifier */
const char *fi_desc; /* Feature description */
boolean_t fi_can_readonly; /* Can open pool readonly w/o support? */
boolean_t fi_mos; /* Is the feature necessary to read the MOS? */
- struct zfeature_info **fi_depends; /* array; null terminated */
+ /* array of dependencies, terminated by SPA_FEATURE_NONE */
+ const spa_feature_t *fi_depends;
} zfeature_info_t;
typedef int (zfeature_func_t)(zfeature_info_t *fi, void *arg);
#define ZFS_FEATURE_DEBUG
-enum spa_feature {
- SPA_FEATURE_ASYNC_DESTROY,
- SPA_FEATURE_EMPTY_BPOBJ,
- SPA_FEATURE_LZ4_COMPRESS,
- SPA_FEATURE_FS_SS_LIMIT,
- SPA_FEATURE_MULTI_VDEV_CRASH_DUMP,
- SPA_FEATURE_SPACEMAP_HISTOGRAM,
- SPA_FEATURES
-} spa_feature_t;
-
extern zfeature_info_t spa_feature_table[SPA_FEATURES];
extern boolean_t zfeature_is_valid_guid(const char *);
extern boolean_t zfeature_is_supported(const char *);
-extern int zfeature_lookup_guid(const char *, zfeature_info_t **res);
-extern int zfeature_lookup_name(const char *, zfeature_info_t **res);
+extern int zfeature_lookup_name(const char *name, spa_feature_t *res);
extern void zpool_feature_init(void);