summaryrefslogtreecommitdiffstats
path: root/include/zfeature_common.h
diff options
context:
space:
mode:
authorDon Brady <[email protected]>2018-09-02 15:09:53 -0400
committerBrian Behlendorf <[email protected]>2018-09-02 12:09:53 -0700
commite8bcb693d6a19962291e4429f2dc4ce60693bef7 (patch)
treea4afbb8d0562aae23e9fd8fd561fd2182b14db8e /include/zfeature_common.h
parentbb91178e60df553071ce2e18b0067ef703f7b583 (diff)
Add zfs module feature and property info to sysfs
This extends our sysfs '/sys/module/zfs' entry to include feature and property attributes. The primary consumer of this information is user processes, like the zfs CLI, that need to know what the current loaded ZFS module supports. The libzfs binary will consult this information when instantiating the zfs and zpool property tables and the pool features table. This introduces 4 kernel objects (dirs) into '/sys/module/zfs' with corresponding attributes (files): features.runtime features.pool properties.dataset properties.pool Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Don Brady <[email protected]> Closes #7706
Diffstat (limited to 'include/zfeature_common.h')
-rw-r--r--include/zfeature_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/zfeature_common.h b/include/zfeature_common.h
index c5aabce0e..8d31309e8 100644
--- a/include/zfeature_common.h
+++ b/include/zfeature_common.h
@@ -85,6 +85,7 @@ typedef struct zfeature_info {
const char *fi_guid; /* On-disk feature identifier */
const char *fi_desc; /* Feature description */
zfeature_flags_t fi_flags;
+ boolean_t fi_zfs_mod_supported; /* supported by running zfs module */
/* array of dependencies, terminated by SPA_FEATURE_NONE */
const spa_feature_t *fi_depends;
} zfeature_info_t;
@@ -98,6 +99,7 @@ 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 *, spa_feature_t *);
extern int zfeature_lookup_name(const char *, spa_feature_t *);
extern boolean_t zfeature_depends_on(spa_feature_t, spa_feature_t);