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>

@@ -1832,12 +1832,11 @@
 static int
 zfs_mvdev_dump_feature_check(void *arg, dmu_tx_t *tx)
 {
         spa_t *spa = dmu_tx_pool(tx)->dp_spa;
 
-        if (spa_feature_is_active(spa,
-            &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP]))
+        if (spa_feature_is_active(spa, SPA_FEATURE_MULTI_VDEV_CRASH_DUMP))
                 return (1);
         return (0);
 }
 
 /*ARGSUSED*/

@@ -1844,12 +1843,11 @@
 static void
 zfs_mvdev_dump_activate_feature_sync(void *arg, dmu_tx_t *tx)
 {
         spa_t *spa = dmu_tx_pool(tx)->dp_spa;
 
-        spa_feature_incr(spa,
-            &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP], tx);
+        spa_feature_incr(spa, SPA_FEATURE_MULTI_VDEV_CRASH_DUMP, tx);
 }
 
 static int
 zvol_dump_init(zvol_state_t *zv, boolean_t resize)
 {

@@ -1880,11 +1878,11 @@
          *   Now have spa_root_vdev->vdev_children == 1 (the raidz vdev),
          *   the raidz vdev itself has 3 children.
          */
         if (vd->vdev_children > 1 || vd->vdev_ops == &vdev_raidz_ops) {
                 if (!spa_feature_is_enabled(spa,
-                    &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP]))
+                    SPA_FEATURE_MULTI_VDEV_CRASH_DUMP))
                         return (SET_ERROR(ENOTSUP));
                 (void) dsl_sync_task(spa_name(spa),
                     zfs_mvdev_dump_feature_check,
                     zfs_mvdev_dump_activate_feature_sync, NULL, 2);
         }

@@ -1901,12 +1899,12 @@
         /*
          * If MULTI_VDEV_CRASH_DUMP is active, use the NOPARITY checksum
          * function.  Otherwise, use the old default -- OFF.
          */
         checksum = spa_feature_is_active(spa,
-            &spa_feature_table[SPA_FEATURE_MULTI_VDEV_CRASH_DUMP]) ?
-            ZIO_CHECKSUM_NOPARITY : ZIO_CHECKSUM_OFF;
+            SPA_FEATURE_MULTI_VDEV_CRASH_DUMP) ? ZIO_CHECKSUM_NOPARITY :
+            ZIO_CHECKSUM_OFF;
 
         /*
          * If we are resizing the dump device then we only need to
          * update the refreservation to match the newly updated
          * zvolsize. Otherwise, we save off the original state of the