Lines Matching refs:sth

219 	spa_txg_history_t *sth = (spa_txg_history_t *)data;  in spa_txg_history_show()  local
223 switch (sth->state) { in spa_txg_history_show()
233 if (sth->times[TXG_STATE_OPEN]) in spa_txg_history_show()
234 open = sth->times[TXG_STATE_OPEN] - in spa_txg_history_show()
235 sth->times[TXG_STATE_BIRTH]; in spa_txg_history_show()
237 if (sth->times[TXG_STATE_QUIESCED]) in spa_txg_history_show()
238 quiesce = sth->times[TXG_STATE_QUIESCED] - in spa_txg_history_show()
239 sth->times[TXG_STATE_OPEN]; in spa_txg_history_show()
241 if (sth->times[TXG_STATE_WAIT_FOR_SYNC]) in spa_txg_history_show()
242 wait = sth->times[TXG_STATE_WAIT_FOR_SYNC] - in spa_txg_history_show()
243 sth->times[TXG_STATE_QUIESCED]; in spa_txg_history_show()
245 if (sth->times[TXG_STATE_SYNCED]) in spa_txg_history_show()
246 sync = sth->times[TXG_STATE_SYNCED] - in spa_txg_history_show()
247 sth->times[TXG_STATE_WAIT_FOR_SYNC]; in spa_txg_history_show()
251 (longlong_t)sth->txg, sth->times[TXG_STATE_BIRTH], state, in spa_txg_history_show()
252 (u_longlong_t)sth->ndirty, in spa_txg_history_show()
253 (u_longlong_t)sth->nread, (u_longlong_t)sth->nwritten, in spa_txg_history_show()
254 (u_longlong_t)sth->reads, (u_longlong_t)sth->writes, in spa_txg_history_show()
265 spa_txg_history_t *sth; in spa_txg_history_truncate() local
267 sth = list_remove_head(&shl->procfs_list.pl_list); in spa_txg_history_truncate()
268 ASSERT3P(sth, !=, NULL); in spa_txg_history_truncate()
269 kmem_free(sth, sizeof (spa_txg_history_t)); in spa_txg_history_truncate()
322 spa_txg_history_t *sth; in spa_txg_history_add() local
327 sth = kmem_zalloc(sizeof (spa_txg_history_t), KM_SLEEP); in spa_txg_history_add()
328 sth->txg = txg; in spa_txg_history_add()
329 sth->state = TXG_STATE_OPEN; in spa_txg_history_add()
330 sth->times[TXG_STATE_BIRTH] = birth_time; in spa_txg_history_add()
333 procfs_list_add(&shl->procfs_list, sth); in spa_txg_history_add()
347 spa_txg_history_t *sth; in spa_txg_history_set() local
354 for (sth = list_tail(&shl->procfs_list.pl_list); sth != NULL; in spa_txg_history_set()
355 sth = list_prev(&shl->procfs_list.pl_list, sth)) { in spa_txg_history_set()
356 if (sth->txg == txg) { in spa_txg_history_set()
357 sth->times[completed_state] = completed_time; in spa_txg_history_set()
358 sth->state++; in spa_txg_history_set()
376 spa_txg_history_t *sth; in spa_txg_history_set_io() local
383 for (sth = list_tail(&shl->procfs_list.pl_list); sth != NULL; in spa_txg_history_set_io()
384 sth = list_prev(&shl->procfs_list.pl_list, sth)) { in spa_txg_history_set_io()
385 if (sth->txg == txg) { in spa_txg_history_set_io()
386 sth->nread = nread; in spa_txg_history_set_io()
387 sth->nwritten = nwritten; in spa_txg_history_set_io()
388 sth->reads = reads; in spa_txg_history_set_io()
389 sth->writes = writes; in spa_txg_history_set_io()
390 sth->ndirty = ndirty; in spa_txg_history_set_io()