summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/spa.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sys/spa.h b/include/sys/spa.h
index a4a717ac0..85a62588a 100644
--- a/include/sys/spa.h
+++ b/include/sys/spa.h
@@ -548,12 +548,26 @@ typedef struct spa_stats_history {
typedef struct spa_stats {
spa_stats_history_t read_history;
+ spa_stats_history_t txg_history;
} spa_stats_t;
+typedef enum txg_state {
+ TXG_STATE_BIRTH = 0,
+ TXG_STATE_OPEN = 1,
+ TXG_STATE_QUIESCED = 2,
+ TXG_STATE_SYNCED = 3,
+ TXG_STATE_COMMITTED = 4,
+} txg_state_t;
+
extern void spa_stats_init(spa_t *spa);
extern void spa_stats_destroy(spa_t *spa);
extern void spa_read_history_add(spa_t *spa, const zbookmark_t *zb,
uint32_t aflags);
+extern void spa_txg_history_add(spa_t *spa, uint64_t txg);
+extern int spa_txg_history_set(spa_t *spa, uint64_t txg,
+ txg_state_t completed_state, hrtime_t completed_time);
+extern int spa_txg_history_set_io(spa_t *spa, uint64_t txg, uint64_t nread,
+ uint64_t nwritten, uint64_t reads, uint64_t writes, uint64_t nreserved);
/* Pool configuration locks */
extern int spa_config_tryenter(spa_t *spa, int locks, void *tag, krw_t rw);