Home
last modified time | relevance | path

Searched refs:txg (Results 1 – 25 of 93) sorted by relevance

1234

/freebsd/sys/contrib/openzfs/module/zfs/
H A Dtxg.c44 * these transaction groups. Each successive transaction group (txg) is
47 * there may be an active txg associated with each state; each active txg may
49 * be up to three active txgs, and there is always a txg in the open state
52 * accepted into the txg in the open state, and are completed while the txg is
58 * When a new txg becomes active, it first enters the open state. New
60 * currently open txg. There is always a txg in the open state so that ZFS can
61 * accept new changes (though the txg ma
120 txg_init(dsl_pool_t * dp,uint64_t txg) txg_init() argument
321 uint64_t txg; txg_hold_open() local
386 txg_quiesce(dsl_pool_t * dp,uint64_t txg) txg_quiesce() argument
448 txg_dispatch_callbacks(dsl_pool_t * dp,uint64_t txg) txg_dispatch_callbacks() argument
533 uint64_t txg; txg_sync_thread() local
618 uint64_t txg; txg_quiesce_thread() local
665 txg_delay(dsl_pool_t * dp,uint64_t txg,hrtime_t delay,hrtime_t resolution) txg_delay() argument
693 txg_wait_synced_impl(dsl_pool_t * dp,uint64_t txg,boolean_t wait_sig) txg_wait_synced_impl() argument
734 txg_wait_synced(dsl_pool_t * dp,uint64_t txg) txg_wait_synced() argument
744 txg_wait_synced_sig(dsl_pool_t * dp,uint64_t txg) txg_wait_synced_sig() argument
754 txg_wait_open(dsl_pool_t * dp,uint64_t txg,boolean_t should_quiesce) txg_wait_open() argument
791 txg_kick(dsl_pool_t * dp,uint64_t txg) txg_kick() argument
830 txg_verify(spa_t * spa,uint64_t txg) txg_verify() argument
859 txg_list_empty_impl(txg_list_t * tl,uint64_t txg) txg_list_empty_impl() argument
867 txg_list_empty(txg_list_t * tl,uint64_t txg) txg_list_empty() argument
909 txg_list_add(txg_list_t * tl,void * p,uint64_t txg) txg_list_add() argument
934 txg_list_add_tail(txg_list_t * tl,void * p,uint64_t txg) txg_list_add_tail() argument
962 txg_list_remove(txg_list_t * tl,uint64_t txg) txg_list_remove() argument
987 txg_list_remove_this(txg_list_t * tl,void * p,uint64_t txg) txg_list_remove_this() argument
1011 txg_list_member(txg_list_t * tl,void * p,uint64_t txg) txg_list_member() argument
1024 txg_list_head(txg_list_t * tl,uint64_t txg) txg_list_head() argument
1038 txg_list_next(txg_list_t * tl,void * p,uint64_t txg) txg_list_next() argument
[all...]
H A Ddsl_pool.c189 dsl_pool_open_impl(spa_t *spa, uint64_t txg) in dsl_pool_open_impl() argument
198 txg_init(dp, txg); in dsl_pool_open_impl()
239 dsl_pool_init(spa_t *spa, uint64_t txg, dsl_pool_t **dpp) in dsl_pool_init() argument
242 dsl_pool_t *dp = dsl_pool_open_impl(spa, txg); in dsl_pool_init()
469 dsl_crypto_params_t *dcp, uint64_t txg) in dsl_pool_create() argument
472 dsl_pool_t *dp = dsl_pool_open_impl(spa, txg); in dsl_pool_create()
473 dmu_tx_t *tx = dmu_tx_create_assigned(dp, txg); in dsl_pool_create()
495 VERIFY0(dsl_scan_init(dp, txg)); in dsl_pool_create()
606 dsl_pool_wrlog_count(dsl_pool_t *dp, int64_t size, uint64_t txg) in dsl_pool_wrlog_count() argument
610 aggsum_add(&dp->dp_wrlog_pertxg[txg & TXG_MASK], size); in dsl_pool_wrlog_count()
[all …]
H A Dvdev_removal.c192 vdev_passivate(vdev_t *vd, uint64_t *txg) in vdev_passivate() argument
238 *txg + TXG_CONCURRENT_STATES + TXG_DEFER_SIZE, 0, FTAG); in vdev_passivate()
248 *txg = spa_vdev_config_enter(spa); in vdev_passivate()
278 uint64_t txg; in spa_vdev_noalloc() local
284 txg = spa_vdev_enter(spa); in spa_vdev_noalloc()
295 error = vdev_passivate(vd, &txg); in spa_vdev_noalloc()
298 vdev_dirty_leaves(vd, VDD_DTL, txg); in spa_vdev_noalloc()
302 error = spa_vdev_exit(spa, NULL, txg, error); in spa_vdev_noalloc()
311 uint64_t txg; in spa_vdev_alloc() local
317 txg = spa_vdev_enter(spa); in spa_vdev_alloc()
[all …]
H A Dzil.c461 zil_parse_lr_func_t *parse_lr_func, void *arg, uint64_t txg, in zil_parse() argument
501 error = parse_blk_func(zilog, &blk, arg, txg); in zil_parse()
555 error = parse_lr_func(zilog, lr, arg, txg); in zil_parse()
816 uint64_t txg, lwb_state_t state) in zil_alloc_lwb() argument
848 lwb->lwb_alloc_txg = txg; in zil_alloc_lwb()
891 zilog_dirty(zilog_t *zilog, uint64_t txg) in zilog_dirty() argument
901 if (txg_list_add(&dp->dp_dirty_zilogs, zilog, txg)) { in zilog_dirty()
905 zilog->zl_dirty_max_txg = MAX(txg, zilog->zl_dirty_max_txg); in zilog_dirty()
917 zilog_is_dirty_in_txg(zilog_t *zilog, uint64_t txg) in zilog_is_dirty_in_txg() argument
921 if (txg_list_member(&dp->dp_dirty_zilogs, zilog, txg & TXG_MASK)) in zilog_is_dirty_in_txg()
[all …]
H A Dspa_log_spacemap.c392 summary_entry_is_full(spa_t *spa, log_summary_entry_t *e, uint64_t txg) in summary_entry_is_full() argument
394 if (e->lse_end == txg) in summary_entry_is_full()
418 spa_log_summary_decrement_mscount(spa_t *spa, uint64_t txg, boolean_t dirty) in spa_log_summary_decrement_mscount() argument
430 if (e->lse_start > txg) in spa_log_summary_decrement_mscount()
547 spa_log_sm_decrement_mscount(spa_t *spa, uint64_t txg) in spa_log_sm_decrement_mscount() argument
549 spa_log_sm_t target = { .sls_txg = txg }; in spa_log_sm_decrement_mscount()
575 summary_add_data(spa_t *spa, uint64_t txg, uint64_t metaslabs_flushed, in summary_add_data() argument
580 if (e == NULL || summary_entry_is_full(spa, e, txg)) { in summary_add_data()
582 e->lse_start = e->lse_end = txg; in summary_add_data()
587 ASSERT3U(e->lse_start, <=, txg); in summary_add_data()
[all …]
H A Duberblock.c48 uberblock_update(uberblock_t *ub, vdev_t *rvd, uint64_t txg, uint64_t mmp_delay) in uberblock_update() argument
50 ASSERT(ub->ub_txg < txg); in uberblock_update()
57 ub->ub_txg = txg; in uberblock_update()
73 return (BP_GET_LOGICAL_BIRTH(&ub->ub_rootbp) == txg); in uberblock_update()
H A Dspa_stats.c194 uint64_t txg; /* txg id */ member
250 (longlong_t)sth->txg, sth->times[TXG_STATE_BIRTH], state, in spa_txg_history_show()
318 spa_txg_history_add(spa_t *spa, uint64_t txg, hrtime_t birth_time) in spa_txg_history_add() argument
327 sth->txg = txg; in spa_txg_history_add()
342 spa_txg_history_set(spa_t *spa, uint64_t txg, txg_state_t completed_state, in spa_txg_history_set() argument
355 if (sth->txg == txg) { in spa_txg_history_set()
371 spa_txg_history_set_io(spa_t *spa, uint64_t txg, uint64_t nread, in spa_txg_history_set_io() argument
384 if (sth->txg == txg) { in spa_txg_history_set_io()
400 spa_txg_history_init_io(spa_t *spa, uint64_t txg, dsl_pool_t *dp) in spa_txg_history_init_io() argument
413 ts->txg = txg; in spa_txg_history_init_io()
[all …]
H A Dmetaslab.c638 metaslab_class_evict_old(metaslab_class_t *mc, uint64_t txg) in metaslab_class_evict_old() argument
663 if (txg > in metaslab_class_evict_old()
669 metaslab_evict(msp, txg); in metaslab_class_evict_old()
1945 metaslab_verify_space(metaslab_t *msp, uint64_t txg) in metaslab_verify_space() argument
1964 if (txg != spa_syncing_txg(spa) || msp->ms_sm == NULL || in metaslab_verify_space()
1991 range_tree_space(msp->ms_allocating[(txg + t) & TXG_MASK]); in metaslab_verify_space()
2660 metaslab_set_selected_txg(metaslab_t *msp, uint64_t txg) in metaslab_set_selected_txg() argument
2668 msp->ms_selected_txg = txg; in metaslab_set_selected_txg()
2689 uint64_t txg, metaslab_t **msp) in metaslab_init() argument
2780 if (txg <= TXG_INITIAL) { in metaslab_init()
[all …]
H A Dspa.c3664 uint64_t txg = ub->ub_txg; in spa_activity_check() local
3727 if (txg != ub->ub_txg || timestamp != ub->ub_timestamp || in spa_activity_check()
3733 (u_longlong_t)txg, (u_longlong_t)ub->ub_txg, in spa_activity_check()
6393 uint64_t txg = TXG_INITIAL; local
6483 spa->spa_first_txg = txg;
6484 spa->spa_uberblock.ub_txg = txg - 1;
6518 (error = vdev_create(rvd, txg, B_FALSE)) == 0 &&
6520 (error = spa_validate_aux(spa, nvroot, txg, VDEV_ALLOC_ADD)) == 0) {
6529 vdev_expand(vd, txg);
6575 spa->spa_dsl_pool = dp = dsl_pool_create(spa, zplprops, dcp, txg);
[all …]
H A Dspa_config.c415 spa_config_generate(spa_t *spa, vdev_t *vd, uint64_t txg, int getstats) in spa_config_generate() argument
436 if (txg == -1ULL) in spa_config_generate()
437 txg = spa->spa_config_txg; in spa_config_generate()
460 fnvlist_add_uint64(config, ZPOOL_CONFIG_POOL_TXG, txg); in spa_config_generate()
569 uint64_t txg; in spa_config_update() local
575 txg = spa_last_synced_txg(spa) + 1; in spa_config_update()
602 vdev_expand(tvd, txg); in spa_config_update()
610 txg_wait_synced(spa->spa_dsl_pool, txg); in spa_config_update()
H A Dvdev_label.c788 vdev_label_read_config(vdev_t *vd, uint64_t txg) in vdev_label_read_config() argument
848 } else if (label_txg <= txg && label_txg > best_txg) { in vdev_label_read_config()
872 (u_longlong_t)txg); in vdev_label_read_config()
891 uint64_t state, pool_guid, device_guid, txg, spare_pool; in vdev_inuse() local
921 &txg) != 0)) { in vdev_inuse()
947 txg == 0 && vdtxg == crtxg) in vdev_inuse()
1179 uint64_t txg = 0ULL; in vdev_label_init() local
1182 txg = spa->spa_uberblock.ub_txg; in vdev_label_init()
1183 label = spa_config_generate(spa, vd, txg, B_FALSE); in vdev_label_init()
1899 vdev_t *vd, int l, uint64_t txg, int flags) in vdev_label_sync() argument
[all …]
H A Dvdev.c330 vdev_default_asize(vdev_t *vd, uint64_t psize, uint64_t txg) in vdev_default_asize() argument
336 csize = vdev_psize_to_asize_txg(vd->vdev_child[c], psize, txg); in vdev_default_asize()
1519 vdev_metaslab_init(vdev_t *vd, uint64_t txg) in vdev_metaslab_init() argument
1528 ASSERT(txg == 0 || spa_config_held(spa, SCL_ALLOC, RW_WRITER)); in vdev_metaslab_init()
1557 if (txg == 0 && vd->vdev_ms_array != 0) { in vdev_metaslab_init()
1569 error = metaslab_init(vd->vdev_mg, m, object, txg, in vdev_metaslab_init()
1609 if (txg != 0) { in vdev_metaslab_init()
1611 slog_ms, txg); in vdev_metaslab_init()
1615 VERIFY0(metaslab_init(vd->vdev_log_mg, slog_msid, sm_obj, txg, in vdev_metaslab_init()
1619 if (txg == 0) in vdev_metaslab_init()
[all …]
H A Ddmu_redact.c93 uint64_t txg; /* txg to traverse since */ member
371 err = traverse_dataset_resume(rt_arg->ds, rt_arg->txg, in redact_traverse_thread()
522 uint64_t txg = dmu_tx_get_txg(tx); in redaction_list_update_sync() local
523 list_t *list = &md->md_blocks[txg & TXG_MASK]; in redaction_list_update_sync()
525 &md->md_furthest[txg & TXG_MASK]; in redaction_list_update_sync()
559 md->md_synctask_txg[txg & TXG_MASK] = B_FALSE; in redaction_list_update_sync()
571 uint64_t txg = dmu_tx_get_txg(tx); in commit_rl_updates() local
572 if (!md->md_synctask_txg[txg & TXG_MASK]) { in commit_rl_updates()
575 md->md_synctask_txg[txg & TXG_MASK] = B_TRUE; in commit_rl_updates()
576 md->md_latest_synctask_txg = txg; in commit_rl_updates()
[all …]
H A Dbrt.c1387 uint64_t txg; in brt_pending_add() local
1390 txg = dmu_tx_get_txg(tx); in brt_pending_add()
1391 ASSERT3U(txg, !=, 0); in brt_pending_add()
1392 pending_tree = &brt->brt_pending_tree[txg & TXG_MASK]; in brt_pending_add()
1393 pending_lock = &brt->brt_pending_lock[txg & TXG_MASK]; in brt_pending_add()
1430 uint64_t txg; in brt_pending_remove() local
1433 txg = dmu_tx_get_txg(tx); in brt_pending_remove()
1434 ASSERT3U(txg, !=, 0); in brt_pending_remove()
1435 pending_tree = &brt->brt_pending_tree[txg & TXG_MASK]; in brt_pending_remove()
1436 pending_lock = &brt->brt_pending_lock[txg & TXG_MASK]; in brt_pending_remove()
[all …]
/freebsd/sys/contrib/openzfs/include/sys/
H A Dtxg.h43 #define TXG_IDX (txg & TXG_MASK)
70 extern void txg_init(struct dsl_pool *dp, uint64_t txg);
79 extern void txg_delay(struct dsl_pool *dp, uint64_t txg, hrtime_t delta,
81 extern void txg_kick(struct dsl_pool *dp, uint64_t txg);
89 extern void txg_wait_synced(struct dsl_pool *dp, uint64_t txg);
94 extern boolean_t txg_wait_synced_sig(struct dsl_pool *dp, uint64_t txg);
102 extern void txg_wait_open(struct dsl_pool *dp, uint64_t txg,
114 extern void txg_verify(spa_t *spa, uint64_t txg);
126 #define TXG_CLEAN(txg) ((txg) - 1) argument
130 extern boolean_t txg_list_empty(txg_list_t *tl, uint64_t txg);
[all …]
H A Ddsl_pool.h153 int dsl_pool_init(spa_t *spa, uint64_t txg, dsl_pool_t **dpp);
157 struct dsl_crypto_params *dcp, uint64_t txg);
158 void dsl_pool_sync(dsl_pool_t *dp, uint64_t txg);
159 void dsl_pool_sync_done(dsl_pool_t *dp, uint64_t txg);
165 void dsl_pool_wrlog_count(dsl_pool_t *dp, int64_t size, uint64_t txg);
168 void dsl_pool_undirty_space(dsl_pool_t *dp, int64_t space, uint64_t txg);
169 void dsl_free(dsl_pool_t *dp, uint64_t txg, const blkptr_t *bpp);
170 void dsl_free_sync(zio_t *pio, dsl_pool_t *dp, uint64_t txg,
H A Dvdev.h65 extern int vdev_create(vdev_t *, uint64_t txg, boolean_t isreplace);
75 uint64_t txg, uint64_t size);
77 uint64_t txg, uint64_t size);
83 extern void vdev_dtl_reassess(vdev_t *vd, uint64_t txg, uint64_t scrub_txg,
102 extern int vdev_metaslab_init(vdev_t *vd, uint64_t txg);
105 extern void vdev_expand(vdev_t *vd, uint64_t txg);
136 uint64_t txg);
177 extern int vdev_config_sync(vdev_t **svd, int svdcount, uint64_t txg);
204 extern nvlist_t *vdev_label_read_config(vdev_t *vd, uint64_t txg);
223 extern int vdev_label_init(vdev_t *vd, uint64_t txg, vdev_labeltype_t reason);
H A Dbrt.h52 extern void brt_pending_apply(spa_t *spa, uint64_t txg);
57 extern void brt_sync(spa_t *spa, uint64_t txg);
/freebsd/sys/contrib/openzfs/include/os/linux/zfs/sys/
H A Dtrace_txg.h46 TP_PROTO(dsl_pool_t *dp, uint64_t txg),
47 TP_ARGS(dp, txg),
49 __field(uint64_t, txg)
52 __entry->txg = txg;
54 TP_printk("txg %llu", __entry->txg)
60 TP_PROTO(dsl_pool_t *dp, uint64_t txg), \
61 TP_ARGS(dp, txg))
H A Dtrace_dmu.h93 uint64_t txg),
94 TP_ARGS(long_free_dirty_all_txgs, chunk_len, txg),
98 __field(uint64_t, txg)
103 __entry->txg = txg;
107 __entry->chunk_len, __entry->txg)
114 uint64_t chunk_len, uint64_t txg), \
115 TP_ARGS(long_free_dirty_all_txgs, chunk_len, txg))
H A Dtrace_vdev.h89 TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size, uint64_t txg),
90 TP_ARGS(spa, offset, size, txg),
101 __entry->vdev_txg = txg;
110 TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size,uint64_t txg), \
111 TP_ARGS(spa, offset, size, txg))
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/
H A Dimport_rewind_device_replaced.ksh94 typeset txg
95 txg=$(get_last_txg_synced $TESTPOOL1)
117 log_must zpool import -d $DEVICE_DIR -o readonly=on -T $txg $TESTPOOL1
137 log_must zpool import -d $DEVICE_DIR -T $txg $TESTPOOL1
/freebsd/sys/contrib/openzfs/lib/libzpool/
H A Darc_os.c61 arc_memory_throttle(spa_t *spa, uint64_t reserve, uint64_t txg) in arc_memory_throttle() argument
63 (void) spa, (void) reserve, (void) txg; in arc_memory_throttle()
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/
H A Dspa_os.c95 uint64_t txg; in spa_generate_rootconf() local
99 txg = fnvlist_lookup_uint64(configs[i], ZPOOL_CONFIG_POOL_TXG); in spa_generate_rootconf()
100 if (txg > best_txg) { in spa_generate_rootconf()
101 best_txg = txg; in spa_generate_rootconf()
/freebsd/sys/contrib/openzfs/cmd/
H A Dztest.c1819 uint64_t txg; in ztest_tx_assign() local
1837 txg = dmu_tx_get_txg(tx); in ztest_tx_assign()
1838 ASSERT3U(txg, !=, 0); in ztest_tx_assign()
1839 return (txg); in ztest_tx_assign()
1844 uint64_t dnodesize, uint64_t offset, uint64_t gen, uint64_t txg, in ztest_bt_generate() argument
1853 bt->bt_txg = txg; in ztest_bt_generate()
1859 uint64_t dnodesize, uint64_t offset, uint64_t gen, uint64_t txg, in ztest_bt_verify() argument
1868 ASSERT3U(bt->bt_txg, <=, txg); in ztest_bt_verify()
2055 uint64_t txg; in ztest_replay_create() local
2075 txg = ztest_tx_assign(tx, TXG_WAIT, FTAG); in ztest_replay_create()
[all …]

1234