mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
Illumos 5269 - zpool import slow
5269 zpool import slow Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george@delphix.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Dan McDonald <danmcd@omniti.com> References: https://www.illumos.org/issues/5269 https://github.com/illumos/illumos-gate/commit/12380e1e Ported-by: DHE <git@dehacked.net> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3396
This commit is contained in:
committed by
Brian Behlendorf
parent
d050c627b5
commit
9c43027b3f
+6
-5
@@ -1773,6 +1773,7 @@ static boolean_t
|
||||
spa_check_logs(spa_t *spa)
|
||||
{
|
||||
boolean_t rv = B_FALSE;
|
||||
dsl_pool_t *dp = spa_get_dsl(spa);
|
||||
|
||||
switch (spa->spa_log_state) {
|
||||
default:
|
||||
@@ -1780,8 +1781,8 @@ spa_check_logs(spa_t *spa)
|
||||
case SPA_LOG_MISSING:
|
||||
/* need to recheck in case slog has been restored */
|
||||
case SPA_LOG_UNKNOWN:
|
||||
rv = (dmu_objset_find(spa->spa_name, zil_check_log_chain,
|
||||
NULL, DS_FIND_CHILDREN) != 0);
|
||||
rv = (dmu_objset_find_dp(dp, dp->dp_root_dir_obj,
|
||||
zil_check_log_chain, NULL, DS_FIND_CHILDREN) != 0);
|
||||
if (rv)
|
||||
spa_set_log_state(spa, SPA_LOG_MISSING);
|
||||
break;
|
||||
@@ -2763,6 +2764,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config,
|
||||
spa->spa_load_max_txg == UINT64_MAX)) {
|
||||
dmu_tx_t *tx;
|
||||
int need_update = B_FALSE;
|
||||
dsl_pool_t *dp = spa_get_dsl(spa);
|
||||
int c;
|
||||
|
||||
ASSERT(state != SPA_LOAD_TRYIMPORT);
|
||||
@@ -2776,9 +2778,8 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config,
|
||||
*/
|
||||
spa->spa_claiming = B_TRUE;
|
||||
|
||||
tx = dmu_tx_create_assigned(spa_get_dsl(spa),
|
||||
spa_first_txg(spa));
|
||||
(void) dmu_objset_find(spa_name(spa),
|
||||
tx = dmu_tx_create_assigned(dp, spa_first_txg(spa));
|
||||
(void) dmu_objset_find_dp(dp, dp->dp_root_dir_obj,
|
||||
zil_claim, tx, DS_FIND_CHILDREN);
|
||||
dmu_tx_commit(tx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user