mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Illumos 4171, 4172
4171 clean up spa_feature_*() interfaces 4172 implement extensible_dataset feature for use by other zpool features Reviewed by: Max Grossman <max.grossman@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Approved by: Garrett D'Amore <garrett@damore.org>a References: https://www.illumos.org/issues/4171 https://www.illumos.org/issues/4172 https://github.com/illumos/illumos-gate/commit/2acef22 Ported-by: Tim Chase <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2528
This commit is contained in:
committed by
Brian Behlendorf
parent
62b6939308
commit
fa86b5dbb6
+14
-11
@@ -37,34 +37,37 @@ 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_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
|
||||
|
||||
typedef enum spa_feature {
|
||||
SPA_FEATURE_ASYNC_DESTROY,
|
||||
SPA_FEATURE_EMPTY_BPOBJ,
|
||||
SPA_FEATURE_LZ4_COMPRESS,
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user