diff options
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/dmu_impl.h | 3 | ||||
-rw-r--r-- | include/sys/dnode.h | 1 | ||||
-rw-r--r-- | include/sys/dsl_dataset.h | 9 | ||||
-rw-r--r-- | include/sys/zap.h | 6 | ||||
-rw-r--r-- | include/sys/zfeature.h | 27 |
5 files changed, 35 insertions, 11 deletions
diff --git a/include/sys/dmu_impl.h b/include/sys/dmu_impl.h index bbff15df9..cb4afbaae 100644 --- a/include/sys/dmu_impl.h +++ b/include/sys/dmu_impl.h @@ -273,6 +273,9 @@ typedef struct dmu_sendarg { uint64_t dsa_last_data_offset; } dmu_sendarg_t; +void dmu_object_zapify(objset_t *, uint64_t, dmu_object_type_t, dmu_tx_t *); +void dmu_object_free_zapified(objset_t *, uint64_t, dmu_tx_t *); + #ifdef __cplusplus } #endif diff --git a/include/sys/dnode.h b/include/sys/dnode.h index fa0aa4bb7..4ca2a8a13 100644 --- a/include/sys/dnode.h +++ b/include/sys/dnode.h @@ -200,6 +200,7 @@ typedef struct dnode { uint16_t dn_datablkszsec; /* in 512b sectors */ uint32_t dn_datablksz; /* in bytes */ uint64_t dn_maxblkid; + uint8_t dn_next_type[TXG_SIZE]; uint8_t dn_next_nblkptr[TXG_SIZE]; uint8_t dn_next_nlevels[TXG_SIZE]; uint8_t dn_next_indblkshift[TXG_SIZE]; diff --git a/include/sys/dsl_dataset.h b/include/sys/dsl_dataset.h index f6449c687..27ef405e0 100644 --- a/include/sys/dsl_dataset.h +++ b/include/sys/dsl_dataset.h @@ -49,9 +49,9 @@ struct dsl_pool; #define DS_FLAG_INCONSISTENT (1ULL<<0) #define DS_IS_INCONSISTENT(ds) \ ((ds)->ds_phys->ds_flags & DS_FLAG_INCONSISTENT) + /* - * Note: nopromote can not yet be set, but we want support for it in this - * on-disk version, so that we don't need to upgrade for it later. + * Do not allow this dataset to be promoted. */ #define DS_FLAG_NOPROMOTE (1ULL<<1) @@ -71,6 +71,11 @@ struct dsl_pool; ((ds)->ds_phys->ds_flags & DS_FLAG_DEFER_DESTROY) /* + * DS_FIELD_* are strings that are used in the "extensified" dataset zap object. + * They should be of the format <reverse-dns>:<field>. + */ + +/* * DS_FLAG_CI_DATASET is set if the dataset contains a file system whose * name lookups should be performed case-insensitively. */ diff --git a/include/sys/zap.h b/include/sys/zap.h index aabfca7ba..fbd513098 100644 --- a/include/sys/zap.h +++ b/include/sys/zap.h @@ -141,6 +141,12 @@ uint64_t zap_create_link(objset_t *os, dmu_object_type_t ot, uint64_t parent_obj, const char *name, dmu_tx_t *tx); /* + * Initialize an already-allocated object. + */ +void mzap_create_impl(objset_t *os, uint64_t obj, int normflags, + zap_flags_t flags, dmu_tx_t *tx); + +/* * Create a new zapobj with no attributes from the given (unallocated) * object number. */ diff --git a/include/sys/zfeature.h b/include/sys/zfeature.h index 9df7e4973..c2ca63f7c 100644 --- a/include/sys/zfeature.h +++ b/include/sys/zfeature.h @@ -27,6 +27,7 @@ #define _SYS_ZFEATURE_H #include <sys/nvpair.h> +#include <sys/txg.h> #include "zfeature_common.h" #ifdef __cplusplus @@ -37,17 +38,25 @@ struct spa; struct dmu_tx; struct objset; -extern boolean_t feature_is_supported(struct objset *os, uint64_t obj, - uint64_t desc_obj, nvlist_t *unsup_feat, nvlist_t *enabled_feat); - extern void spa_feature_create_zap_objects(struct spa *, struct dmu_tx *); -extern void spa_feature_enable(struct spa *, zfeature_info_t *, +extern void spa_feature_enable(struct spa *, spa_feature_t, + struct dmu_tx *); +extern void spa_feature_incr(struct spa *, spa_feature_t, struct dmu_tx *); +extern void spa_feature_decr(struct spa *, spa_feature_t, struct dmu_tx *); +extern boolean_t spa_feature_is_enabled(struct spa *, spa_feature_t); +extern boolean_t spa_feature_is_active(struct spa *, spa_feature_t); +extern uint64_t spa_feature_refcount(spa_t *, spa_feature_t, uint64_t); +extern boolean_t spa_features_check(spa_t *, boolean_t, nvlist_t *, nvlist_t *); + +/* + * These functions are only exported for zhack and zdb; normal callers should + * use the above interfaces. + */ +extern int feature_get_refcount(struct spa *, zfeature_info_t *, uint64_t *); +extern void feature_enable_sync(struct spa *, zfeature_info_t *, + struct dmu_tx *); +extern void feature_sync(struct spa *, zfeature_info_t *, uint64_t, struct dmu_tx *); -extern void spa_feature_incr(struct spa *, zfeature_info_t *, struct dmu_tx *); -extern void spa_feature_decr(struct spa *, zfeature_info_t *, struct dmu_tx *); -extern boolean_t spa_feature_is_enabled(struct spa *, zfeature_info_t *); -extern boolean_t spa_feature_is_active(struct spa *, zfeature_info_t *); -extern int spa_feature_get_refcount(struct spa *, zfeature_info_t *); #ifdef __cplusplus } |