Lines Matching +full:non +full:- +full:descriptive

9  * or https://opensource.org/licenses/CDDL-1.0.
37 * -----------------
39 * ZFS feature flags are used to provide fine-grained versioning to the ZFS
40 * on-disk format. Once enabled on a pool feature flags replace the old
43 * Each new on-disk format change will be given a uniquely identifying string
45 * organizations creating new on-disk formats with the same version number. To
51 * ----------------
59 * feature, but the feature has not been used yet, so no on-disk
66 * Feature flags makes no differentiation between non-zero reference counts
74 * It is the responsibility of the individual features to maintain a non-zero
78 * ------------
86 * On-disk Format
87 * --------------
91 * SPA_VERSION_BEFORE_FEATURES (28) first, so all pre-feature flags on disk
98 * 1) features_for_read: feature GUID -> reference count
100 * 2) features_for_write: feature GUID -> reference count
102 * 3) feature_descriptions: feature GUID -> descriptive string
108 * To open a pool in read-only mode only the features listed in
111 * To open the pool in read-write mode features in both features_for_read and
126 * -------------------
141 * Features may not perform enable-time initialization. Instead, any such
143 * enforces that on-disk changes be made only when features are used. Code
156 * has made an on-disk format change. Later, after the destroyed dataset's
159 * decremented back to 0 to indicate that it has undone its on-disk format
170 * this software. Adds each unsupported feature (name -> description) to
177 objset_t *os = spa->spa_meta_objset;
182 spa->spa_feat_for_write_obj : spa->spa_feat_for_read_obj;
193 ASSERT(za->za_integer_length == sizeof (uint64_t) &&
194 za->za_num_integers == 1);
197 fnvlist_add_uint64(enabled_feat, za->za_name,
198 za->za_first_integer);
201 if (za->za_first_integer != 0 &&
202 !zfeature_is_supported(za->za_name)) {
208 if (zap_lookup(os, spa->spa_feat_desc_obj,
209 za->za_name, 1, MAXPATHLEN, buf) == 0)
213 za->za_name, desc) == 0);
227 * Use an in-memory cache of feature refcounts for quick retrieval.
229 * Note: well-designed features will not need to use this; they should
231 * However, this is non-static for zdb, zhack, and spa_add_feature_stats().
236 ASSERT(VALID_FEATURE_FID(feature->fi_feature));
237 if (spa->spa_feat_refcount_cache[feature->fi_feature] ==
241 *res = spa->spa_feat_refcount_cache[feature->fi_feature];
246 * Note: well-designed features will not need to use this; they should
248 * However, this is non-static for zdb and zhack.
256 uint64_t zapobj = (feature->fi_flags & ZFEATURE_FLAG_READONLY_COMPAT) ?
257 spa->spa_feat_for_write_obj : spa->spa_feat_for_read_obj;
266 err = zap_lookup(spa->spa_meta_objset, zapobj,
267 feature->fi_guid, sizeof (uint64_t), 1, &refcount);
282 uint64_t enabled_txg_obj __maybe_unused = spa->spa_feat_enabled_txg_obj;
284 ASSERT(zfeature_depends_on(feature->fi_feature,
287 if (!spa_feature_is_enabled(spa, feature->fi_feature)) {
293 VERIFY0(zap_lookup(spa->spa_meta_objset, spa->spa_feat_enabled_txg_obj,
294 feature->fi_guid, sizeof (uint64_t), 1, res));
300 * This function is non-static for zhack; it should otherwise not be used
307 ASSERT(VALID_FEATURE_OR_NONE(feature->fi_feature));
308 uint64_t zapobj = (feature->fi_flags & ZFEATURE_FLAG_READONLY_COMPAT) ?
309 spa->spa_feat_for_write_obj : spa->spa_feat_for_read_obj;
310 VERIFY0(zap_update(spa->spa_meta_objset, zapobj, feature->fi_guid,
320 if (feature->fi_feature != SPA_FEATURE_NONE) {
322 &spa->spa_feat_refcount_cache[feature->fi_feature];
328 spa_deactivate_mos_feature(spa, feature->fi_guid);
329 else if (feature->fi_flags & ZFEATURE_FLAG_MOS)
330 spa_activate_mos_feature(spa, feature->fi_guid, tx);
334 * This function is non-static for zhack; it should otherwise not be used
341 (feature->fi_flags & ZFEATURE_FLAG_ACTIVATE_ON_ENABLE) ? 1 : 0;
342 uint64_t zapobj = (feature->fi_flags & ZFEATURE_FLAG_READONLY_COMPAT) ?
343 spa->spa_feat_for_write_obj : spa->spa_feat_for_read_obj;
346 ASSERT(zfeature_is_valid_guid(feature->fi_guid));
352 if (zap_contains(spa->spa_meta_objset, zapobj, feature->fi_guid) == 0)
355 for (int i = 0; feature->fi_depends[i] != SPA_FEATURE_NONE; i++)
356 spa_feature_enable(spa, feature->fi_depends[i], tx);
358 VERIFY0(zap_update(spa->spa_meta_objset, spa->spa_feat_desc_obj,
359 feature->fi_guid, 1, strlen(feature->fi_desc) + 1,
360 feature->fi_desc, tx));
367 if (spa->spa_feat_enabled_txg_obj == 0ULL) {
368 spa->spa_feat_enabled_txg_obj =
369 zap_create_link(spa->spa_meta_objset,
375 VERIFY0(zap_add(spa->spa_meta_objset,
376 spa->spa_feat_enabled_txg_obj, feature->fi_guid,
387 if (spa->spa_errata == ZPOOL_ERRATA_ZOL_8308_ENCRYPTION &&
390 feature->fi_feature == SPA_FEATURE_BOOKMARK_V2)
391 spa->spa_errata = 0;
394 * Convert the old on-disk error log to the new format when activating
397 if (feature->fi_feature == SPA_FEATURE_HEAD_ERRLOG)
408 (feature->fi_flags & ZFEATURE_FLAG_READONLY_COMPAT) ?
409 spa->spa_feat_for_write_obj : spa->spa_feat_for_read_obj;
413 ASSERT(zfeature_is_valid_guid(feature->fi_guid));
427 refcount--;
444 ASSERT((!spa->spa_sync_on && tx->tx_txg == TXG_INITIAL) ||
447 spa->spa_feat_for_read_obj = zap_create_link(spa->spa_meta_objset,
450 spa->spa_feat_for_write_obj = zap_create_link(spa->spa_meta_objset,
453 spa->spa_feat_desc_obj = zap_create_link(spa->spa_meta_objset,