Lines Matching defs:spa
25 #include <sys/spa.h>
122 spa_read_history_init(spa_t *spa)
124 spa_history_list_t *shl = &spa->spa_stats.read_history;
129 spa_name(spa),
140 spa_read_history_destroy(spa_t *spa)
142 spa_history_list_t *shl = &spa->spa_stats.read_history;
149 spa_read_history_add(spa_t *spa, const zbookmark_phys_t *zb, uint32_t aflags)
151 spa_history_list_t *shl = &spa->spa_stats.read_history;
154 ASSERT3P(spa, !=, NULL);
288 spa_txg_history_init(spa_t *spa)
290 spa_history_list_t *shl = &spa->spa_stats.txg_history;
295 spa_name(spa),
306 spa_txg_history_destroy(spa_t *spa)
308 spa_history_list_t *shl = &spa->spa_stats.txg_history;
318 spa_txg_history_add(spa_t *spa, uint64_t txg, hrtime_t birth_time)
320 spa_history_list_t *shl = &spa->spa_stats.txg_history;
342 spa_txg_history_set(spa_t *spa, uint64_t txg, txg_state_t completed_state,
345 spa_history_list_t *shl = &spa->spa_stats.txg_history;
371 spa_txg_history_set_io(spa_t *spa, uint64_t txg, uint64_t nread,
374 spa_history_list_t *shl = &spa->spa_stats.txg_history;
400 spa_txg_history_init_io(spa_t *spa, uint64_t txg, dsl_pool_t *dp)
409 spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER);
410 vdev_get_stats(spa->spa_root_vdev, &ts->vs1);
411 spa_config_exit(spa, SCL_CONFIG, FTAG);
416 spa_txg_history_set(spa, txg, TXG_STATE_WAIT_FOR_SYNC, gethrtime());
422 spa_txg_history_fini_io(spa_t *spa, txg_stat_t *ts)
432 spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER);
433 vdev_get_stats(spa->spa_root_vdev, &ts->vs2);
434 spa_config_exit(spa, SCL_CONFIG, FTAG);
436 spa_txg_history_set(spa, ts->txg, TXG_STATE_SYNCED, gethrtime());
437 spa_txg_history_set_io(spa, ts->txg,
465 spa_t *spa = ksp->ks_private;
466 spa_history_kstat_t *shk = &spa->spa_stats.tx_assign_histogram;
485 spa_tx_assign_init(spa_t *spa)
487 spa_history_kstat_t *shk = &spa->spa_stats.tx_assign_histogram;
499 name = kmem_asprintf("zfs/%s", spa_name(spa));
518 ksp->ks_private = spa;
526 spa_tx_assign_destroy(spa_t *spa)
528 spa_history_kstat_t *shk = &spa->spa_stats.tx_assign_histogram;
540 spa_tx_assign_add_nsecs(spa_t *spa, uint64_t nsecs)
542 spa_history_kstat_t *shk = &spa->spa_stats.tx_assign_histogram;
641 spa_mmp_history_init(spa_t *spa)
643 spa_history_list_t *shl = &spa->spa_stats.mmp_history;
649 spa_name(spa),
660 spa_mmp_history_destroy(spa_t *spa)
662 spa_history_list_t *shl = &spa->spa_stats.mmp_history;
676 spa_mmp_history_set_skip(spa_t *spa, uint64_t mmp_node_id)
678 spa_history_list_t *shl = &spa->spa_stats.mmp_history;
706 spa_mmp_history_set(spa_t *spa, uint64_t mmp_node_id, int io_error,
709 spa_history_list_t *shl = &spa->spa_stats.mmp_history;
738 spa_mmp_history_add(spa_t *spa, uint64_t txg, uint64_t timestamp,
742 spa_history_list_t *shl = &spa->spa_stats.mmp_history;
784 spa_t *spa = (spa_t *)data;
785 (void) snprintf(buf, size, "%s\n", spa_state_to_name(spa));
797 spa_state_init(spa_t *spa)
799 spa_history_kstat_t *shk = &spa->spa_stats.state;
805 name = kmem_asprintf("zfs/%s", spa_name(spa));
813 ksp->ks_private = spa;
825 spa_t *spa = (spa_t *)data;
826 (void) snprintf(buf, size, "%llu\n", (u_longlong_t)spa_guid(spa));
831 spa_guid_init(spa_t *spa)
833 spa_history_kstat_t *shk = &spa->spa_stats.guid;
839 name = kmem_asprintf("zfs/%s", spa_name(spa));
848 ksp->ks_private = spa;
858 spa_health_destroy(spa_t *spa)
860 spa_history_kstat_t *shk = &spa->spa_stats.state;
869 spa_guid_destroy(spa_t *spa)
871 spa_history_kstat_t *shk = &spa->spa_stats.guid;
912 spa_iostats_trim_add(spa_t *spa, trim_type_t type,
917 spa_history_kstat_t *shk = &spa->spa_stats.iostats;
950 spa_iostats_read_add(spa_t *spa, uint64_t size, uint64_t iops, uint32_t flags)
952 spa_history_kstat_t *shk = &spa->spa_stats.iostats;
969 spa_iostats_write_add(spa_t *spa, uint64_t size, uint64_t iops, uint32_t flags)
971 spa_history_kstat_t *shk = &spa->spa_stats.iostats;
999 spa_iostats_init(spa_t *spa)
1001 spa_history_kstat_t *shk = &spa->spa_stats.iostats;
1005 char *name = kmem_asprintf("zfs/%s", spa_name(spa));
1014 ksp->ks_private = spa;
1025 spa_iostats_destroy(spa_t *spa)
1027 spa_history_kstat_t *shk = &spa->spa_stats.iostats;
1038 spa_stats_init(spa_t *spa)
1040 spa_read_history_init(spa);
1041 spa_txg_history_init(spa);
1042 spa_tx_assign_init(spa);
1043 spa_mmp_history_init(spa);
1044 spa_state_init(spa);
1045 spa_guid_init(spa);
1046 spa_iostats_init(spa);
1050 spa_stats_destroy(spa_t *spa)
1052 spa_iostats_destroy(spa);
1053 spa_health_destroy(spa);
1054 spa_tx_assign_destroy(spa);
1055 spa_txg_history_destroy(spa);
1056 spa_read_history_destroy(spa);
1057 spa_mmp_history_destroy(spa);
1058 spa_guid_destroy(spa);