Skip to content

Commit

Permalink
Prevent reclaim in the traverse prefetch thread
Browse files Browse the repository at this point in the history
Reclaim in the traverse prefetch thread, which is run on the system
taskq, can overrun the stack.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Closes #3733
  • Loading branch information
dweeezil authored and behlendorf committed Sep 4, 2015
1 parent 0282c41 commit dca8c34
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions module/zfs/dmu_traverse.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ traverse_prefetch_thread(void *arg)
traverse_data_t *td_main = arg;
traverse_data_t td = *td_main;
zbookmark_phys_t czb;
fstrans_cookie_t cookie = spl_fstrans_mark();

td.td_func = traverse_prefetcher;
td.td_arg = td_main->td_pfd;
Expand All @@ -489,6 +490,7 @@ traverse_prefetch_thread(void *arg)
td_main->td_pfd->pd_exited = B_TRUE;
cv_broadcast(&td_main->td_pfd->pd_cv);
mutex_exit(&td_main->td_pfd->pd_mtx);
spl_fstrans_unmark(cookie);
}

/*
Expand Down

0 comments on commit dca8c34

Please sign in to comment.