Lines Matching refs:txg
190 dsl_pool_open_impl(spa_t *spa, uint64_t txg) in dsl_pool_open_impl() argument
199 txg_init(dp, txg); in dsl_pool_open_impl()
240 dsl_pool_init(spa_t *spa, uint64_t txg, dsl_pool_t **dpp) in dsl_pool_init() argument
243 dsl_pool_t *dp = dsl_pool_open_impl(spa, txg); in dsl_pool_init()
478 dsl_crypto_params_t *dcp, uint64_t txg) in dsl_pool_create() argument
481 dsl_pool_t *dp = dsl_pool_open_impl(spa, txg); in dsl_pool_create()
482 dmu_tx_t *tx = dmu_tx_create_assigned(dp, txg); in dsl_pool_create()
504 VERIFY0(dsl_scan_init(dp, txg)); in dsl_pool_create()
615 dsl_pool_wrlog_count(dsl_pool_t *dp, int64_t size, uint64_t txg) in dsl_pool_wrlog_count() argument
619 aggsum_add(&dp->dp_wrlog_pertxg[txg & TXG_MASK], size); in dsl_pool_wrlog_count()
625 if (aggsum_compare(&dp->dp_wrlog_pertxg[txg & TXG_MASK], sync_min) > 0) in dsl_pool_wrlog_count()
626 txg_kick(dp, txg); in dsl_pool_wrlog_count()
639 dsl_pool_wrlog_clear(dsl_pool_t *dp, uint64_t txg) in dsl_pool_wrlog_clear() argument
642 delta = -(int64_t)aggsum_value(&dp->dp_wrlog_pertxg[txg & TXG_MASK]); in dsl_pool_wrlog_clear()
643 aggsum_add(&dp->dp_wrlog_pertxg[txg & TXG_MASK], delta); in dsl_pool_wrlog_clear()
646 (void) aggsum_value(&dp->dp_wrlog_pertxg[txg & TXG_MASK]); in dsl_pool_wrlog_clear()
652 dsl_early_sync_task_verify(dsl_pool_t *dp, uint64_t txg) in dsl_early_sync_task_verify() argument
662 for (ms = txg_list_head(tl, TXG_CLEAN(txg)); ms; in dsl_early_sync_task_verify()
663 ms = txg_list_next(tl, ms, TXG_CLEAN(txg))) { in dsl_early_sync_task_verify()
672 #define dsl_early_sync_task_verify(dp, txg) \ argument
673 ((void) sizeof (dp), (void) sizeof (txg), B_TRUE)
677 dsl_pool_sync(dsl_pool_t *dp, uint64_t txg) in dsl_pool_sync() argument
689 tx = dmu_tx_create_assigned(dp, txg); in dsl_pool_sync()
696 if (!txg_list_empty(&dp->dp_early_sync_tasks, txg)) { in dsl_pool_sync()
701 txg_list_remove(&dp->dp_early_sync_tasks, txg)) != NULL) { in dsl_pool_sync()
702 ASSERT(dsl_early_sync_task_verify(dp, txg)); in dsl_pool_sync()
705 ASSERT(dsl_early_sync_task_verify(dp, txg)); in dsl_pool_sync()
713 while ((ds = txg_list_remove(&dp->dp_dirty_datasets, txg)) != NULL) { in dsl_pool_sync()
731 dp->dp_long_free_dirty_pertxg[txg & TXG_MASK] == 0); in dsl_pool_sync()
732 dp->dp_long_free_dirty_pertxg[txg & TXG_MASK] = 0; in dsl_pool_sync()
755 while ((ds = txg_list_remove(&dp->dp_dirty_datasets, txg)) != NULL) { in dsl_pool_sync()
768 !os->os_next_write_raw[txg & TXG_MASK]) { in dsl_pool_sync()
788 !os->os_next_write_raw[txg & TXG_MASK]) { in dsl_pool_sync()
797 while ((dd = txg_list_remove(&dp->dp_dirty_dirs, txg)) != NULL) { in dsl_pool_sync()
817 if (dmu_objset_is_dirty(mos, txg)) { in dsl_pool_sync()
834 dsl_pool_undirty_space(dp, dp->dp_dirty_pertxg[txg & TXG_MASK], txg); in dsl_pool_sync()
845 if (!txg_list_empty(&dp->dp_sync_tasks, txg)) { in dsl_pool_sync()
852 while ((dst = txg_list_remove(&dp->dp_sync_tasks, txg)) != NULL) in dsl_pool_sync()
858 DTRACE_PROBE2(dsl_pool_sync__done, dsl_pool_t *dp, dp, uint64_t, txg); in dsl_pool_sync()
862 dsl_pool_sync_done(dsl_pool_t *dp, uint64_t txg) in dsl_pool_sync_done() argument
866 while ((zilog = txg_list_head(&dp->dp_dirty_zilogs, txg))) { in dsl_pool_sync_done()
874 zil_clean(zilog, txg); in dsl_pool_sync_done()
875 (void) txg_list_remove_this(&dp->dp_dirty_zilogs, zilog, txg); in dsl_pool_sync_done()
876 ASSERT(!dmu_objset_is_dirty(zilog->zl_os, txg)); in dsl_pool_sync_done()
880 dsl_pool_wrlog_clear(dp, txg); in dsl_pool_sync_done()
882 ASSERT(!dmu_objset_is_dirty(dp->dp_meta_objset, txg)); in dsl_pool_sync_done()
981 dsl_pool_need_dirty_sync(dsl_pool_t *dp, uint64_t txg) in dsl_pool_need_dirty_sync() argument
985 uint64_t dirty = dp->dp_dirty_pertxg[txg & TXG_MASK]; in dsl_pool_need_dirty_sync()
1007 dsl_pool_undirty_space(dsl_pool_t *dp, int64_t space, uint64_t txg) in dsl_pool_undirty_space() argument
1014 if (dp->dp_dirty_pertxg[txg & TXG_MASK] < space) { in dsl_pool_undirty_space()
1016 space = dp->dp_dirty_pertxg[txg & TXG_MASK]; in dsl_pool_undirty_space()
1018 ASSERT3U(dp->dp_dirty_pertxg[txg & TXG_MASK], >=, space); in dsl_pool_undirty_space()
1019 dp->dp_dirty_pertxg[txg & TXG_MASK] -= space; in dsl_pool_undirty_space()