Lines Matching refs:txg

54 #include <sys/txg.h>
1836 * current txg so that the "stubby" block can be removed
2849 * This must all happen in a single txg.
2945 * If spa_load() fails this function will try loading prior txg's. If
2947 * will be rewound to that txg. If 'state' is not SPA_LOAD_RECOVER this
3599 uint64_t txg = TXG_INITIAL;
3642 spa->spa_first_txg = txg;
3643 spa->spa_uberblock.ub_txg = txg - 1;
3673 (error = vdev_create(rvd, txg, B_FALSE)) == 0 &&
3674 (error = spa_validate_aux(spa, nvroot, txg,
3678 vdev_expand(rvd->vdev_child[c], txg);
3723 spa->spa_dsl_pool = dp = dsl_pool_create(spa, zplprops, txg);
3734 tx = dmu_tx_create_assigned(dp, txg);
3818 txg_wait_synced(spa->spa_dsl_pool, txg);
3887 * device has a more recent txg.
3890 spa_alt_rootvdev(vdev_t *vd, vdev_t **avd, uint64_t *txg)
3893 spa_alt_rootvdev(vd->vdev_child[c], avd, txg);
3909 if (label_txg > *txg) {
3910 *txg = label_txg;
3935 uint64_t guid, txg;
3960 VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg) == 0);
4006 spa_alt_rootvdev(rvd, &avd, &txg);
4474 uint64_t txg, id;
4483 txg = spa_vdev_enter(spa);
4487 return (spa_vdev_exit(spa, NULL, txg, error));
4500 return (spa_vdev_exit(spa, vd, txg, EINVAL));
4503 (error = vdev_create(vd, txg, B_FALSE)) != 0)
4504 return (spa_vdev_exit(spa, vd, txg, error));
4510 if ((error = spa_validate_aux(spa, nvroot, txg, VDEV_ALLOC_ADD)) != 0)
4511 return (spa_vdev_exit(spa, vd, txg, error));
4561 (void) spa_vdev_exit(spa, vd, txg, 0);
4587 uint64_t txg, dtl_max_txg;
4597 txg = spa_vdev_enter(spa);
4602 return (spa_vdev_exit(spa, NULL, txg, ENODEV));
4605 return (spa_vdev_exit(spa, NULL, txg, ENOTSUP));
4611 return (spa_vdev_exit(spa, NULL, txg, EINVAL));
4614 return (spa_vdev_exit(spa, newrootvd, txg, EINVAL));
4619 return (spa_vdev_exit(spa, newrootvd, txg, EINVAL));
4621 if ((error = vdev_create(newrootvd, txg, replacing)) != 0)
4622 return (spa_vdev_exit(spa, newrootvd, txg, error));
4628 return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP));
4637 return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP));
4648 return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP));
4660 return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP));
4663 return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP));
4676 return (spa_vdev_exit(spa, newrootvd, txg, EOVERFLOW));
4683 return (spa_vdev_exit(spa, newrootvd, txg, EDOM));
4702 newvd->vdev_resilver_txg = txg;
4734 dtl_max_txg = txg + TXG_CONCURRENT_STATES;
4749 * Mark newvd's DTL dirty in this txg.
4751 vdev_dirty(tvd, VDD_DTL, newvd, txg);
4791 uint64_t txg;
4801 txg = spa_vdev_enter(spa);
4806 return (spa_vdev_exit(spa, NULL, txg, ENODEV));
4809 return (spa_vdev_exit(spa, NULL, txg, ENOTSUP));
4827 return (spa_vdev_exit(spa, NULL, txg, EBUSY));
4834 return (spa_vdev_exit(spa, NULL, txg, ENOTSUP));
4845 return (spa_vdev_exit(spa, NULL, txg, ENOTSUP));
4852 return (spa_vdev_exit(spa, NULL, txg, EBUSY));
4916 * reason, we must remove the spare now, in the same txg as the detach;
4960 vdev_expand(tvd, txg);
4966 * Mark vd's DTL as dirty in this txg. vdev_dtl_sync() will see that
4968 * But first make sure we're not on any *other* txg's DTL list, to
4975 vdev_dirty(tvd, VDD_DTL, vd, txg);
4982 error = spa_vdev_exit(spa, vd, txg, 0);
5030 uint64_t txg, *glist;
5041 txg = spa_vdev_enter(spa);
5045 (void) spa_vdev_config_exit(spa, NULL, txg, 0, FTAG);
5047 txg = spa_vdev_config_enter(spa);
5053 return (spa_vdev_exit(spa, NULL, txg, error));
5057 return (spa_vdev_exit(spa, NULL, txg, EEXIST));
5065 return (spa_vdev_exit(spa, NULL, txg, EINVAL));
5083 return (spa_vdev_exit(spa, NULL, txg, EINVAL));
5088 return (spa_vdev_exit(spa, NULL, txg, EINVAL));
5167 return (spa_vdev_exit(spa, NULL, txg, error));
5214 spa_vdev_config_exit(spa, NULL, txg, 0, FTAG);
5246 txg = spa_vdev_config_enter(newspa);
5248 (void) spa_vdev_config_exit(newspa, NULL, txg, 0, FTAG);
5256 txg = spa_vdev_config_enter(spa);
5277 (void) spa_vdev_exit(spa, NULL, txg, 0);
5300 txg = spa_vdev_config_enter(spa);
5311 (void) spa_vdev_exit(spa, NULL, txg, error);
5364 uint64_t txg;
5392 txg = spa_vdev_config_enter(spa);
5394 vdev_dirty_leaves(vd, VDD_DTL, txg);
5396 spa_vdev_config_exit(spa, NULL, txg, 0, FTAG);
5463 uint64_t txg = 0;
5471 txg = spa_vdev_enter(spa);
5523 txg + TXG_CONCURRENT_STATES + TXG_DEFER_SIZE, 0, FTAG);
5530 txg = spa_vdev_config_enter(spa);
5537 return (spa_vdev_exit(spa, NULL, txg, error));
5559 error = spa_vdev_exit(spa, NULL, txg, error);
6418 * reflect the new version this txg, so there must be no changes this
6419 * txg to anything that the upgrade code depends on after it executes.
6495 spa_sync(spa_t *spa, uint64_t txg)
6499 bplist_t *free_bpl = &spa->spa_free_bplist[txg & TXG_MASK];
6514 spa->spa_syncing_txg = txg;
6545 tx = dmu_tx_create_assigned(dp, txg);
6552 * If we are upgrading to SPA_VERSION_RAIDZ_DEFLATE this txg,
6576 * out this txg.
6615 spa_errlog_sync(spa, txg);
6616 dsl_pool_sync(dp, txg);
6630 ddt_sync(spa, txg);
6633 while (vd = txg_list_remove(&spa->spa_vdev_txg_list, txg))
6634 vdev_sync(vd, txg);
6638 ASSERT3U(txg, >=,
6651 if (spa->spa_uberblock.ub_rootbp.blk_birth < txg &&
6652 !dmu_objset_is_dirty(mos, txg)) {
6660 txg));
6661 ASSERT(txg_list_empty(&dp->dp_dirty_dirs, txg));
6662 ASSERT(txg_list_empty(&dp->dp_sync_tasks, txg));
6668 } while (dmu_objset_is_dirty(mos, txg));
6715 error = vdev_config_sync(svd, svdcount, txg);
6718 rvd->vdev_children, txg);
6747 spa->spa_config_txg = txg;
6751 dsl_pool_sync_done(dp, txg);
6760 while (vd = txg_list_remove(&spa->spa_vdev_txg_list, TXG_CLEAN(txg)))
6761 vdev_sync_done(vd, txg);
6769 ASSERT(txg_list_empty(&dp->dp_dirty_datasets, txg));
6770 ASSERT(txg_list_empty(&dp->dp_dirty_dirs, txg));
6771 ASSERT(txg_list_empty(&spa->spa_vdev_txg_list, txg));
6779 * that txg has been completed.