Lines Matching defs:txg
330 vdev_default_asize(vdev_t *vd, uint64_t psize, uint64_t txg)
336 csize = vdev_psize_to_asize_txg(vd->vdev_child[c], psize, txg);
1519 vdev_metaslab_init(vdev_t *vd, uint64_t txg)
1528 ASSERT(txg == 0 || spa_config_held(spa, SCL_ALLOC, RW_WRITER));
1557 if (txg == 0 && vd->vdev_ms_array != 0) {
1569 error = metaslab_init(vd->vdev_mg, m, object, txg,
1609 if (txg != 0) {
1611 slog_ms, txg);
1615 VERIFY0(metaslab_init(vd->vdev_log_mg, slog_msid, sm_obj, txg,
1619 if (txg == 0)
1637 if (txg == 0)
1955 * account for existing bp's. We also hard-code txg 0 for the same reason
1957 * txg's.
2328 uint64_t txg;
2371 * was modified at a point after the current txg.
2372 * If config lock is not held do not check for the txg. spa_sync could
2377 txg = UINT64_MAX;
2379 txg = spa_last_synced_txg(spa);
2381 if ((label = vdev_label_read_config(vd, txg)) == NULL) {
2385 "txg %llu", (u_longlong_t)txg);
2803 vdev_create(vdev_t *vd, uint64_t txg, boolean_t isreplacing)
2823 (error = vdev_label_init(vd, txg, isreplacing ?
2904 vdev_dirty(vdev_t *vd, int flags, void *arg, uint64_t txg)
2913 (void) txg_list_add(&vd->vdev_ms_list, arg, txg);
2916 (void) txg_list_add(&vd->vdev_dtl_list, arg, txg);
2918 (void) txg_list_add(&vd->vdev_spa->spa_vdev_txg_list, vd, txg);
2922 vdev_dirty_leaves(vdev_t *vd, int flags, uint64_t txg)
2925 vdev_dirty_leaves(vd->vdev_child[c], flags, txg);
2928 vdev_dirty(vd->vdev_top, flags, vd, txg);
2970 vdev_dtl_dirty(vdev_t *vd, vdev_dtl_type_t t, uint64_t txg, uint64_t size)
2979 if (!range_tree_contains(rt, txg, size))
2980 range_tree_add(rt, txg, size);
2985 vdev_dtl_contains(vdev_t *vd, vdev_dtl_type_t t, uint64_t txg, uint64_t size)
3003 dirty = range_tree_contains(rt, txg, size);
3023 * Check if the txg falls within the range which must be
3057 * Returns the lowest txg in the DTL range.
3070 * Returns the highest txg in the DTL.
3114 * up to the rebuild max txg has been reconstructed and the DTL
3134 * scn_max_txg value to the highest txg value that exists
3151 * Reassess DTLs after a config change or scrub completion. If txg == 0 no
3155 vdev_dtl_reassess_impl(vdev_t *vd, uint64_t txg, uint64_t scrub_txg,
3165 vdev_dtl_reassess_impl(vd->vdev_child[c], txg,
3192 zfs_dbgmsg("guid:%llu txg:%llu scrub:%llu started:%d "
3194 (u_longlong_t)vd->vdev_guid, (u_longlong_t)txg,
3230 * that each txg in that range has refcnt -1 or 0.
3281 if (txg != 0 &&
3295 if (txg != 0)
3296 vdev_dirty(vd->vdev_top, VDD_DTL, vd, txg);
3337 vdev_dtl_reassess(vdev_t *vd, uint64_t txg, uint64_t scrub_txg,
3340 return (vdev_dtl_reassess_impl(vd, txg, scrub_txg, scrub_done,
3496 vdev_dtl_sync(vdev_t *vd, uint64_t txg)
3508 tx = dmu_tx_create_assigned(spa->spa_dsl_pool, txg);
3560 vdev_dbgmsg(vd, "txg %llu, spa %s, DTL old object %llu, "
3561 "new object %llu", (u_longlong_t)txg, spa_name(spa),
3612 * Determine if resilver is needed, and if so the txg range.
4020 vdev_remove_empty_log(vdev_t *vd, uint64_t txg)
4026 ASSERT3U(txg, ==, spa_syncing_txg(spa));
4028 dmu_tx_t *tx = dmu_tx_create_assigned(spa_get_dsl(spa), txg);
4040 vdev_sync_done(vdev_t *vd, uint64_t txg)
4043 boolean_t reassess = !txg_list_empty(&vd->vdev_ms_list, TXG_CLEAN(txg));
4047 while ((msp = txg_list_remove(&vd->vdev_ms_list, TXG_CLEAN(txg)))
4049 metaslab_sync_done(msp, txg);
4059 vdev_sync(vdev_t *vd, uint64_t txg)
4065 ASSERT3U(txg, ==, spa->spa_syncing_txg);
4066 dmu_tx_t *tx = dmu_tx_create_assigned(spa->spa_dsl_pool, txg);
4078 ASSERT(txg_list_empty(&vd->vdev_ms_list, txg));
4079 ASSERT(txg_list_empty(&vd->vdev_dtl_list, txg));
4097 while ((msp = txg_list_remove(&vd->vdev_ms_list, txg)) != NULL) {
4098 metaslab_sync(msp, txg);
4099 (void) txg_list_add(&vd->vdev_ms_list, msp, TXG_CLEAN(txg));
4102 while ((lvd = txg_list_remove(&vd->vdev_dtl_list, txg)) != NULL)
4103 vdev_dtl_sync(lvd, txg);
4110 vdev_remove_empty_log(vd, txg);
4112 (void) txg_list_add(&spa->spa_vdev_txg_list, vd, TXG_CLEAN(txg));
4123 vdev_psize_to_asize_txg(vdev_t *vd, uint64_t psize, uint64_t txg)
4125 return (vd->vdev_ops->vdev_op_asize(vd, psize, txg));
4891 uint64_t txg = zio->io_txg;
5057 if (type == ZIO_TYPE_WRITE && txg != 0 &&
5064 * made by zil_claim() during spa_load() in the first txg.
5066 * txg as the block was born. In the scrub-induced repair
5077 uint64_t commit_txg = txg;
5081 vdev_dtl_dirty(vd, DTL_SCRUB, txg, 1);
5088 if (vdev_dtl_contains(vd, DTL_MISSING, txg, 1))
5091 vdev_dtl_dirty(pvd, DTL_PARTIAL, txg, 1);
5095 vdev_dtl_dirty(vd, DTL_MISSING, txg, 1);
5570 vdev_expand(vdev_t *vd, uint64_t txg)
5583 VERIFY(vdev_metaslab_init(vd, txg) == 0);