Lines Matching defs:txg

683 	uint64_t start, uint64_t size, uint64_t txg)
713 * If we're opening an existing pool (txg == 0) or creating
714 * a new one (txg == TXG_INITIAL), all space is available now.
716 * does not become available until after this txg has synced.
718 if (txg <= TXG_INITIAL)
721 if (txg != 0) {
722 vdev_dirty(vd, 0, NULL, txg);
723 vdev_dirty(vd, VDD_METASLAB, msp, txg);
913 metaslab_sync(metaslab_t *msp, uint64_t txg)
918 space_map_t *allocmap = &msp->ms_allocmap[txg & TXG_MASK];
919 space_map_t *freemap = &msp->ms_freemap[txg & TXG_MASK];
920 space_map_t *freed_map = &msp->ms_freemap[TXG_CLEAN(txg) & TXG_MASK];
934 * be modifying this txg's allocmap, freemap, freed_map, or smo.
940 tx = dmu_tx_create_assigned(spa_get_dsl(spa), txg);
967 * minus what's been freed this txg (freed_map),
985 space_map_walk(&msp->ms_allocmap[(txg + t) & TXG_MASK],
1012 metaslab_sync_done(metaslab_t *msp, uint64_t txg)
1017 space_map_t *freed_map = &msp->ms_freemap[TXG_CLEAN(txg) & TXG_MASK];
1018 space_map_t *defer_map = &msp->ms_defermap[txg % TXG_DEFER_SIZE];
1051 ASSERT(msp->ms_allocmap[txg & TXG_MASK].sm_space == 0);
1052 ASSERT(msp->ms_freemap[txg & TXG_MASK].sm_space == 0);
1058 * transfer freed_map (this txg's frees) to defer_map.
1074 vdev_dirty(vd, VDD_METASLAB, msp, txg + 1);
1086 if (msp->ms_allocmap[(txg + t) & TXG_MASK].sm_space)
1142 metaslab_group_alloc(metaslab_group_t *mg, uint64_t size, uint64_t txg,
1224 if (msp->ms_allocmap[txg & TXG_MASK].sm_space == 0)
1225 vdev_dirty(mg->mg_vd, VDD_METASLAB, msp, txg);
1227 space_map_add(&msp->ms_allocmap[txg & TXG_MASK], offset, size);
1239 dva_t *dva, int d, dva_t *hintdva, uint64_t txg, int flags)
1354 offset = metaslab_group_alloc(mg, asize, txg, distance, dva, d);
1420 metaslab_free_dva(spa_t *spa, const dva_t *dva, uint64_t txg, boolean_t now)
1430 if (txg > spa_freeze_txg(spa))
1449 space_map_remove(&msp->ms_allocmap[txg & TXG_MASK],
1453 if (msp->ms_freemap[txg & TXG_MASK].sm_space == 0)
1454 vdev_dirty(vd, VDD_METASLAB, msp, txg);
1455 space_map_add(&msp->ms_freemap[txg & TXG_MASK], offset, size);
1468 metaslab_claim_dva(spa_t *spa, const dva_t *dva, uint64_t txg)
1490 if ((txg != 0 && spa_writeable(spa)) || !msp->ms_map.sm_loaded)
1496 if (error || txg == 0) { /* txg == 0 indicates dry run */
1504 if (msp->ms_allocmap[txg & TXG_MASK].sm_space == 0)
1505 vdev_dirty(vd, VDD_METASLAB, msp, txg);
1506 space_map_add(&msp->ms_allocmap[txg & TXG_MASK], offset, size);
1516 int ndvas, uint64_t txg, blkptr_t *hintbp, int flags)
1538 txg, flags);
1541 metaslab_free_dva(spa, &dva[d], txg, B_TRUE);
1553 BP_SET_BIRTH(bp, txg, txg);
1559 metaslab_free(spa_t *spa, const blkptr_t *bp, uint64_t txg, boolean_t now)
1570 metaslab_free_dva(spa, &dva[d], txg, now);
1576 metaslab_claim(spa_t *spa, const blkptr_t *bp, uint64_t txg)
1584 if (txg != 0) {
1596 if ((error = metaslab_claim_dva(spa, &dva[d], txg)) != 0)
1601 ASSERT(error == 0 || txg == 0);