Lines Matching defs:spa

144 #include <sys/spa.h>
164 spa_checkpoint_get_stats(spa_t *spa, pool_checkpoint_stat_t *pcs)
166 if (!spa_feature_is_active(spa, SPA_FEATURE_POOL_CHECKPOINT))
171 int error = zap_contains(spa_meta_objset(spa),
180 pcs->pcs_space = spa->spa_checkpoint_info.sci_dspace;
181 pcs->pcs_start_time = spa->spa_checkpoint_info.sci_timestamp;
189 spa_t *spa = arg;
191 spa->spa_checkpoint_info.sci_timestamp = 0;
193 spa_feature_decr(spa, SPA_FEATURE_POOL_CHECKPOINT, tx);
194 spa_notify_waiters(spa);
196 spa_history_log_internal(spa, "spa discard checkpoint", tx,
256 spa_checkpoint_accounting_verify(spa_t *spa)
258 vdev_t *rvd = spa->spa_root_vdev;
276 ASSERT3U(spa->spa_checkpoint_info.sci_dspace, ==, ckpoint_sm_space_sum);
367 spa_checkpoint_discard_is_done(spa_t *spa)
369 vdev_t *rvd = spa->spa_root_vdev;
371 ASSERT(!spa_has_checkpoint(spa));
372 ASSERT(spa_feature_is_active(spa, SPA_FEATURE_POOL_CHECKPOINT));
387 spa_t *spa = arg;
389 if (!spa_feature_is_active(spa, SPA_FEATURE_POOL_CHECKPOINT))
392 if (spa_has_checkpoint(spa))
401 spa_t *spa = arg;
402 vdev_t *rvd = spa->spa_root_vdev;
437 VERIFY0(dsl_sync_task(spa->spa_name, NULL,
445 VERIFY(spa_checkpoint_discard_is_done(spa));
446 VERIFY0(spa->spa_checkpoint_info.sci_dspace);
447 VERIFY0(dsl_sync_task(spa->spa_name, NULL,
448 spa_checkpoint_discard_complete_sync, spa,
457 spa_t *spa = dmu_tx_pool(tx)->dp_spa;
459 if (!spa_feature_is_enabled(spa, SPA_FEATURE_POOL_CHECKPOINT))
462 if (!spa_top_vdevs_spacemap_addressable(spa))
465 if (spa->spa_removing_phys.sr_state == DSS_SCANNING)
468 if (spa->spa_raidz_expand != NULL)
471 if (spa->spa_checkpoint_txg != 0)
474 if (spa_feature_is_active(spa, SPA_FEATURE_POOL_CHECKPOINT))
485 spa_t *spa = dp->dp_spa;
486 uberblock_t checkpoint = spa->spa_ubsync;
491 ASSERT3U(zap_contains(spa_meta_objset(spa), DMU_POOL_DIRECTORY_OBJECT,
494 ASSERT0(spa->spa_checkpoint_info.sci_timestamp);
495 ASSERT0(spa->spa_checkpoint_info.sci_dspace);
502 ASSERT3U(checkpoint.ub_txg, ==, spa->spa_syncing_txg - 1);
514 spa->spa_checkpoint_txg = checkpoint.ub_txg;
515 spa->spa_checkpoint_info.sci_timestamp = checkpoint.ub_timestamp;
518 VERIFY0(zap_add(spa->spa_dsl_pool->dp_meta_objset,
529 spa_feature_incr(spa, SPA_FEATURE_POOL_CHECKPOINT, tx);
531 spa_history_log_internal(spa, "spa checkpoint", tx,
542 spa_t *spa;
544 error = spa_open(pool, &spa, FTAG);
548 mutex_enter(&spa->spa_vdev_top_lock);
558 txg_wait_synced(spa_get_dsl(spa), 0);
571 mutex_exit(&spa->spa_vdev_top_lock);
573 spa_close(spa, FTAG);
581 spa_t *spa = dmu_tx_pool(tx)->dp_spa;
583 if (!spa_feature_is_active(spa, SPA_FEATURE_POOL_CHECKPOINT))
586 if (spa->spa_checkpoint_txg == 0)
589 VERIFY0(zap_contains(spa_meta_objset(spa),
599 spa_t *spa = dmu_tx_pool(tx)->dp_spa;
601 VERIFY0(zap_remove(spa_meta_objset(spa), DMU_POOL_DIRECTORY_OBJECT,
604 spa->spa_checkpoint_txg = 0;
606 zthr_wakeup(spa->spa_checkpoint_discard_zthr);
608 spa_history_log_internal(spa, "spa discard checkpoint", tx,