Print this page
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>

@@ -350,11 +350,11 @@
         if (err != 0)
                 return (err);
 
         /* Make sure dsobj has the correct object type. */
         dmu_object_info_from_db(dbuf, &doi);
-        if (doi.doi_type != DMU_OT_DSL_DATASET) {
+        if (doi.doi_bonus_type != DMU_OT_DSL_DATASET) {
                 dmu_buf_rele(dbuf, tag);
                 return (SET_ERROR(EINVAL));
         }
 
         ds = dmu_buf_get_user(dbuf);

@@ -2969,6 +2969,14 @@
         if (error != 0)
                 return (B_FALSE);
         ret = dsl_dataset_is_before(origin, earlier);
         dsl_dataset_rele(origin, FTAG);
         return (ret);
+}
+
+
+void
+dsl_dataset_zapify(dsl_dataset_t *ds, dmu_tx_t *tx)
+{
+        objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset;
+        dmu_object_zapify(mos, ds->ds_object, DMU_OT_DSL_DATASET, tx);
 }