Skip to content

Commit

Permalink
update the pacth with proposal of grwilson(george.wilson@delphix.com)
Browse files Browse the repository at this point in the history
Signed-off-by: GeLiXin <47034221@qq.com>
  • Loading branch information
GeLiXin committed May 21, 2016
1 parent 3564fa7 commit 47a660a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions module/zfs/dsl_pool.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,19 @@ dsl_pool_init(spa_t *spa, uint64_t txg, dsl_pool_t **dpp)
int err;
dsl_pool_t *dp = dsl_pool_open_impl(spa, txg);

/*
* initialize the caller's dsl_pool_t structure before we actally open
* the meta objset, in case the self-healing write zio which may be
* issued by the open process want to access it before we get ready.
*/
*dpp = dp;

err = dmu_objset_open_impl(spa, NULL, &dp->dp_meta_rootbp,
&dp->dp_meta_objset);
if (err != 0)
if (err != 0) {
dsl_pool_close(dp);
else
*dpp = dp;
*dpp = NULL;
}

return (err);
}
Expand Down

0 comments on commit 47a660a

Please sign in to comment.