Skip to content

Commit

Permalink
traverse_impl to pass zbookmark
Browse files Browse the repository at this point in the history
Appears to be missing compared to ZOL implementation
  • Loading branch information
lundman committed May 21, 2017
1 parent c4e5281 commit 2a16cf6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions usr/src/uts/common/fs/zfs/dmu_traverse.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ traverse_impl(spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp,
mutex_init(&pd.pd_mtx, NULL, MUTEX_DEFAULT, NULL);
cv_init(&pd.pd_cv, NULL, CV_DEFAULT, NULL);

SET_BOOKMARK(&czb, td.td_objset,
ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);

/* See comment on ZIL traversal in dsl_scan_visitds. */
if (ds != NULL && !ds->ds_is_snapshot && !BP_IS_HOLE(rootbp)) {
arc_flags_t flags = ARC_FLAG_WAIT;
Expand All @@ -609,7 +612,7 @@ traverse_impl(spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp,

err = arc_read(NULL, td.td_spa, rootbp,
arc_getbuf_func, &buf,
ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, NULL);
ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, &czb);
if (err != 0)
return (err);

Expand All @@ -623,8 +626,6 @@ traverse_impl(spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp,
&td, TQ_NOQUEUE))
pd.pd_exited = B_TRUE;

SET_BOOKMARK(&czb, td.td_objset,
ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);
err = traverse_visitbp(&td, NULL, rootbp, &czb);

mutex_enter(&pd.pd_mtx);
Expand Down

0 comments on commit 2a16cf6

Please sign in to comment.