summaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu_traverse.c
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2015-09-03 07:13:15 -0500
committerBrian Behlendorf <[email protected]>2015-09-04 08:43:28 -0700
commitdca8c34da4212ed85a92111f26bd3a3cd782f270 (patch)
tree4c42584782d3832f6130bec373b7e99e2acccb82 /module/zfs/dmu_traverse.c
parent0282c4137e7409e6d85289f4955adf07fac834f5 (diff)
Prevent reclaim in the traverse prefetch thread
Reclaim in the traverse prefetch thread, which is run on the system taskq, can overrun the stack. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Tim Chase <[email protected]> Closes #3733
Diffstat (limited to 'module/zfs/dmu_traverse.c')
-rw-r--r--module/zfs/dmu_traverse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/dmu_traverse.c b/module/zfs/dmu_traverse.c
index 44b23280d..12d099bfd 100644
--- a/module/zfs/dmu_traverse.c
+++ b/module/zfs/dmu_traverse.c
@@ -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;
@@ -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);
}
/*