Lines Matching refs:txg

3497 	uint64_t txg = TXG_INITIAL;  in spa_create()  local
3540 spa->spa_first_txg = txg; in spa_create()
3541 spa->spa_uberblock.ub_txg = txg - 1; in spa_create()
3570 (error = vdev_create(rvd, txg, B_FALSE)) == 0 && in spa_create()
3571 (error = spa_validate_aux(spa, nvroot, txg, in spa_create()
3575 vdev_expand(rvd->vdev_child[c], txg); in spa_create()
3620 spa->spa_dsl_pool = dp = dsl_pool_create(spa, zplprops, txg); in spa_create()
3631 tx = dmu_tx_create_assigned(dp, txg); in spa_create()
3715 txg_wait_synced(spa->spa_dsl_pool, txg); in spa_create()
3786 spa_alt_rootvdev(vdev_t *vd, vdev_t **avd, uint64_t *txg) in spa_alt_rootvdev() argument
3789 spa_alt_rootvdev(vd->vdev_child[c], avd, txg); in spa_alt_rootvdev()
3805 if (label_txg > *txg) { in spa_alt_rootvdev()
3806 *txg = label_txg; in spa_alt_rootvdev()
3831 uint64_t guid, txg; in spa_import_rootpool() local
3856 VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg) == 0); in spa_import_rootpool()
3902 spa_alt_rootvdev(rvd, &avd, &txg); in spa_import_rootpool()
4370 uint64_t txg, id; in spa_vdev_add() local
4379 txg = spa_vdev_enter(spa); in spa_vdev_add()
4383 return (spa_vdev_exit(spa, NULL, txg, error)); in spa_vdev_add()
4396 return (spa_vdev_exit(spa, vd, txg, EINVAL)); in spa_vdev_add()
4399 (error = vdev_create(vd, txg, B_FALSE)) != 0) in spa_vdev_add()
4400 return (spa_vdev_exit(spa, vd, txg, error)); in spa_vdev_add()
4406 if ((error = spa_validate_aux(spa, nvroot, txg, VDEV_ALLOC_ADD)) != 0) in spa_vdev_add()
4407 return (spa_vdev_exit(spa, vd, txg, error)); in spa_vdev_add()
4457 (void) spa_vdev_exit(spa, vd, txg, 0); in spa_vdev_add()
4483 uint64_t txg, dtl_max_txg; in spa_vdev_attach() local
4493 txg = spa_vdev_enter(spa); in spa_vdev_attach()
4498 return (spa_vdev_exit(spa, NULL, txg, ENODEV)); in spa_vdev_attach()
4501 return (spa_vdev_exit(spa, NULL, txg, ENOTSUP)); in spa_vdev_attach()
4507 return (spa_vdev_exit(spa, NULL, txg, EINVAL)); in spa_vdev_attach()
4510 return (spa_vdev_exit(spa, newrootvd, txg, EINVAL)); in spa_vdev_attach()
4515 return (spa_vdev_exit(spa, newrootvd, txg, EINVAL)); in spa_vdev_attach()
4517 if ((error = vdev_create(newrootvd, txg, replacing)) != 0) in spa_vdev_attach()
4518 return (spa_vdev_exit(spa, newrootvd, txg, error)); in spa_vdev_attach()
4524 return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP)); in spa_vdev_attach()
4533 return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP)); in spa_vdev_attach()
4544 return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP)); in spa_vdev_attach()
4556 return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP)); in spa_vdev_attach()
4559 return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP)); in spa_vdev_attach()
4572 return (spa_vdev_exit(spa, newrootvd, txg, EOVERFLOW)); in spa_vdev_attach()
4579 return (spa_vdev_exit(spa, newrootvd, txg, EDOM)); in spa_vdev_attach()
4598 newvd->vdev_resilver_txg = txg; in spa_vdev_attach()
4630 dtl_max_txg = txg + TXG_CONCURRENT_STATES; in spa_vdev_attach()
4647 vdev_dirty(tvd, VDD_DTL, newvd, txg); in spa_vdev_attach()
4687 uint64_t txg; in spa_vdev_detach() local
4697 txg = spa_vdev_enter(spa); in spa_vdev_detach()
4702 return (spa_vdev_exit(spa, NULL, txg, ENODEV)); in spa_vdev_detach()
4705 return (spa_vdev_exit(spa, NULL, txg, ENOTSUP)); in spa_vdev_detach()
4723 return (spa_vdev_exit(spa, NULL, txg, EBUSY)); in spa_vdev_detach()
4730 return (spa_vdev_exit(spa, NULL, txg, ENOTSUP)); in spa_vdev_detach()
4741 return (spa_vdev_exit(spa, NULL, txg, ENOTSUP)); in spa_vdev_detach()
4748 return (spa_vdev_exit(spa, NULL, txg, EBUSY)); in spa_vdev_detach()
4856 vdev_expand(tvd, txg); in spa_vdev_detach()
4871 vdev_dirty(tvd, VDD_DTL, vd, txg); in spa_vdev_detach()
4878 error = spa_vdev_exit(spa, vd, txg, 0); in spa_vdev_detach()
4926 uint64_t txg, *glist; in spa_vdev_split_mirror() local
4937 txg = spa_vdev_enter(spa); in spa_vdev_split_mirror()
4941 (void) spa_vdev_config_exit(spa, NULL, txg, 0, FTAG); in spa_vdev_split_mirror()
4943 txg = spa_vdev_config_enter(spa); in spa_vdev_split_mirror()
4949 return (spa_vdev_exit(spa, NULL, txg, error)); in spa_vdev_split_mirror()
4953 return (spa_vdev_exit(spa, NULL, txg, EEXIST)); in spa_vdev_split_mirror()
4961 return (spa_vdev_exit(spa, NULL, txg, EINVAL)); in spa_vdev_split_mirror()
4979 return (spa_vdev_exit(spa, NULL, txg, EINVAL)); in spa_vdev_split_mirror()
4984 return (spa_vdev_exit(spa, NULL, txg, EINVAL)); in spa_vdev_split_mirror()
5053 return (spa_vdev_exit(spa, NULL, txg, error)); in spa_vdev_split_mirror()
5098 spa_vdev_config_exit(spa, NULL, txg, 0, FTAG); in spa_vdev_split_mirror()
5130 txg = spa_vdev_config_enter(newspa); in spa_vdev_split_mirror()
5132 (void) spa_vdev_config_exit(newspa, NULL, txg, 0, FTAG); in spa_vdev_split_mirror()
5140 txg = spa_vdev_config_enter(spa); in spa_vdev_split_mirror()
5159 (void) spa_vdev_exit(spa, NULL, txg, 0); in spa_vdev_split_mirror()
5182 txg = spa_vdev_config_enter(spa); in spa_vdev_split_mirror()
5193 (void) spa_vdev_exit(spa, NULL, txg, error); in spa_vdev_split_mirror()
5246 uint64_t txg; in spa_vdev_remove_evacuate() local
5274 txg = spa_vdev_config_enter(spa); in spa_vdev_remove_evacuate()
5276 vdev_dirty_leaves(vd, VDD_DTL, txg); in spa_vdev_remove_evacuate()
5278 spa_vdev_config_exit(spa, NULL, txg, 0, FTAG); in spa_vdev_remove_evacuate()
5344 uint64_t txg = 0; in spa_vdev_remove() local
5352 txg = spa_vdev_enter(spa); in spa_vdev_remove()
5399 txg + TXG_CONCURRENT_STATES + TXG_DEFER_SIZE, 0, FTAG); in spa_vdev_remove()
5406 txg = spa_vdev_config_enter(spa); in spa_vdev_remove()
5413 return (spa_vdev_exit(spa, NULL, txg, error)); in spa_vdev_remove()
5434 return (spa_vdev_exit(spa, NULL, txg, error)); in spa_vdev_remove()
6271 spa_sync(spa_t *spa, uint64_t txg) in spa_sync() argument
6275 bplist_t *free_bpl = &spa->spa_free_bplist[txg & TXG_MASK]; in spa_sync()
6288 spa->spa_syncing_txg = txg; in spa_sync()
6315 tx = dmu_tx_create_assigned(dp, txg); in spa_sync()
6353 spa_errlog_sync(spa, txg); in spa_sync()
6354 dsl_pool_sync(dp, txg); in spa_sync()
6368 ddt_sync(spa, txg); in spa_sync()
6371 while (vd = txg_list_remove(&spa->spa_vdev_txg_list, txg)) in spa_sync()
6372 vdev_sync(vd, txg); in spa_sync()
6376 ASSERT3U(txg, >=, in spa_sync()
6389 if (spa->spa_uberblock.ub_rootbp.blk_birth < txg && in spa_sync()
6390 !dmu_objset_is_dirty(mos, txg)) { in spa_sync()
6398 txg)); in spa_sync()
6399 ASSERT(txg_list_empty(&dp->dp_dirty_dirs, txg)); in spa_sync()
6400 ASSERT(txg_list_empty(&dp->dp_sync_tasks, txg)); in spa_sync()
6406 } while (dmu_objset_is_dirty(mos, txg)); in spa_sync()
6438 error = vdev_config_sync(svd, svdcount, txg); in spa_sync()
6441 rvd->vdev_children, txg); in spa_sync()
6470 spa->spa_config_txg = txg; in spa_sync()
6476 dsl_pool_sync_done(dp, txg); in spa_sync()
6481 while (vd = txg_list_remove(&spa->spa_vdev_txg_list, TXG_CLEAN(txg))) in spa_sync()
6482 vdev_sync_done(vd, txg); in spa_sync()
6490 ASSERT(txg_list_empty(&dp->dp_dirty_datasets, txg)); in spa_sync()
6491 ASSERT(txg_list_empty(&dp->dp_dirty_dirs, txg)); in spa_sync()
6492 ASSERT(txg_list_empty(&spa->spa_vdev_txg_list, txg)); in spa_sync()