FreeBSD ZFS
The Zettabyte File System
|
Pool-wide transaction groups. More...
#include <sys/zfs_context.h>
#include <sys/txg_impl.h>
#include <sys/dmu_impl.h>
#include <sys/dmu_tx.h>
#include <sys/dsl_pool.h>
#include <sys/dsl_scan.h>
#include <sys/callb.h>
Go to the source code of this file.
Functions | |
static void | txg_sync_thread (void *arg) |
static void | txg_quiesce_thread (void *arg) |
SYSCTL_DECL (_vfs_zfs) | |
SYSCTL_NODE (_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW, 0,"ZFS TXG") | |
TUNABLE_INT ("vfs.zfs.txg.timeout",&zfs_txg_timeout) | |
SYSCTL_INT (_vfs_zfs_txg, OID_AUTO, timeout, CTLFLAG_RW,&zfs_txg_timeout, 0,"Maximum seconds worth of delta per txg") | |
void | txg_init (dsl_pool_t *dp, uint64_t txg) |
Prepares the txg subsystem. | |
void | txg_fini (dsl_pool_t *dp) |
Closes down the txg subsystem. | |
void | txg_sync_start (dsl_pool_t *dp) |
Starts syncing transaction groups. | |
static void | txg_thread_enter (tx_state_t *tx, callb_cpr_t *cpr) |
static void | txg_thread_exit (tx_state_t *tx, callb_cpr_t *cpr, kthread_t **tpp) |
static void | txg_thread_wait (tx_state_t *tx, callb_cpr_t *cpr, kcondvar_t *cv, uint64_t time) |
void | txg_sync_stop (dsl_pool_t *dp) |
Stops syncing transaction groups. | |
uint64_t | txg_hold_open (dsl_pool_t *dp, txg_handle_t *th) |
void | txg_rele_to_quiesce (txg_handle_t *th) |
void | txg_register_callbacks (txg_handle_t *th, list_t *tx_callbacks) |
void | txg_rele_to_sync (txg_handle_t *th) |
static void | txg_quiesce (dsl_pool_t *dp, uint64_t txg) |
Blocks until all transactions in the group are released. | |
static void | txg_do_callbacks (void *arg) |
static void | txg_dispatch_callbacks (dsl_pool_t *dp, uint64_t txg) |
Dispatch the commit callbacks registered on this txg. | |
void | txg_delay (dsl_pool_t *dp, uint64_t txg, int ticks) |
Delay this thread by 'ticks' if we are still in the open transaction group and there is already a waiting txg quiesing or quiesced. | |
void | txg_wait_synced (dsl_pool_t *dp, uint64_t txg) |
Wait until the given transaction group has finished syncing. | |
void | txg_wait_open (dsl_pool_t *dp, uint64_t txg) |
Wait until the given transaction group, or one after it, is the open transaction group. | |
boolean_t | txg_stalled (dsl_pool_t *dp) |
Are we waiting for the syncing transaction to complete? | |
boolean_t | txg_sync_waiting (dsl_pool_t *dp) |
void | txg_list_create (txg_list_t *tl, size_t offset) |
Per-txg object lists. | |
void | txg_list_destroy (txg_list_t *tl) |
boolean_t | txg_list_empty (txg_list_t *tl, uint64_t txg) |
int | txg_list_add (txg_list_t *tl, void *p, uint64_t txg) |
Add an entry to the list. | |
int | txg_list_add_tail (txg_list_t *tl, void *p, uint64_t txg) |
Add an entry to the end of the list (walks list to find end). | |
void * | txg_list_remove (txg_list_t *tl, uint64_t txg) |
Remove the head of the list and return it. | |
void * | txg_list_remove_this (txg_list_t *tl, void *p, uint64_t txg) |
Remove a specific item from the list and return it. | |
int | txg_list_member (txg_list_t *tl, void *p, uint64_t txg) |
void * | txg_list_head (txg_list_t *tl, uint64_t txg) |
Walk a txg list - only safe if you know it's not changing. | |
void * | txg_list_next (txg_list_t *tl, void *p, uint64_t txg) |
Variables | |
int | zfs_txg_timeout = 5 |
max seconds worth of delta per txg |
Pool-wide transaction groups.
Definition in file txg.c.
SYSCTL_DECL | ( | _vfs_zfs | ) |
SYSCTL_INT | ( | _vfs_zfs_txg | , |
OID_AUTO | , | ||
timeout | , | ||
CTLFLAG_RW | , | ||
& | zfs_txg_timeout, | ||
0 | , | ||
"Maximum seconds worth of delta per txg" | |||
) |
SYSCTL_NODE | ( | _vfs_zfs | , |
OID_AUTO | , | ||
txg | , | ||
CTLFLAG_RW | , | ||
0 | , | ||
"ZFS TXG" | |||
) |
TUNABLE_INT | ( | "vfs.zfs.txg.timeout" | , |
& | zfs_txg_timeout | ||
) |
void txg_delay | ( | dsl_pool_t * | dp, |
uint64_t | txg, | ||
int | ticks | ||
) |
Delay this thread by 'ticks' if we are still in the open transaction group and there is already a waiting txg quiesing or quiesced.
Delay the caller by the specified number of ticks or until the txg closes (whichever comes first).
Abort the delay if this txg stalls or enters the quiesing state.
static void txg_dispatch_callbacks | ( | dsl_pool_t * | dp, |
uint64_t | txg | ||
) | [static] |
void txg_fini | ( | dsl_pool_t * | dp | ) |
uint64_t txg_hold_open | ( | dsl_pool_t * | dp, |
txg_handle_t * | th | ||
) |
void txg_init | ( | dsl_pool_t * | dp, |
uint64_t | txg | ||
) |
int txg_list_add | ( | txg_list_t * | tl, |
void * | p, | ||
uint64_t | txg | ||
) |
int txg_list_add_tail | ( | txg_list_t * | tl, |
void * | p, | ||
uint64_t | txg | ||
) |
void txg_list_create | ( | txg_list_t * | tl, |
size_t | offset | ||
) |
void txg_list_destroy | ( | txg_list_t * | tl | ) |
boolean_t txg_list_empty | ( | txg_list_t * | tl, |
uint64_t | txg | ||
) |
void* txg_list_head | ( | txg_list_t * | tl, |
uint64_t | txg | ||
) |
int txg_list_member | ( | txg_list_t * | tl, |
void * | p, | ||
uint64_t | txg | ||
) |
void* txg_list_next | ( | txg_list_t * | tl, |
void * | p, | ||
uint64_t | txg | ||
) |
void* txg_list_remove | ( | txg_list_t * | tl, |
uint64_t | txg | ||
) |
void* txg_list_remove_this | ( | txg_list_t * | tl, |
void * | p, | ||
uint64_t | txg | ||
) |
static void txg_quiesce | ( | dsl_pool_t * | dp, |
uint64_t | txg | ||
) | [static] |
void txg_register_callbacks | ( | txg_handle_t * | th, |
list_t * | tx_callbacks | ||
) |
void txg_rele_to_quiesce | ( | txg_handle_t * | th | ) |
void txg_rele_to_sync | ( | txg_handle_t * | th | ) |
boolean_t txg_stalled | ( | struct dsl_pool * | dp | ) |
void txg_sync_start | ( | dsl_pool_t * | dp | ) |
void txg_sync_stop | ( | dsl_pool_t * | dp | ) |
boolean_t txg_sync_waiting | ( | struct dsl_pool * | dp | ) |
static void txg_thread_enter | ( | tx_state_t * | tx, |
callb_cpr_t * | cpr | ||
) | [static] |
static void txg_thread_exit | ( | tx_state_t * | tx, |
callb_cpr_t * | cpr, | ||
kthread_t ** | tpp | ||
) | [static] |
static void txg_thread_wait | ( | tx_state_t * | tx, |
callb_cpr_t * | cpr, | ||
kcondvar_t * | cv, | ||
uint64_t | time | ||
) | [static] |
void txg_wait_open | ( | struct dsl_pool * | dp, |
uint64_t | txg | ||
) |
void txg_wait_synced | ( | struct dsl_pool * | dp, |
uint64_t | txg | ||
) |