aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/zfs/dsl_scan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c
index b15c39ac9..04a439fad 100644
--- a/module/zfs/dsl_scan.c
+++ b/module/zfs/dsl_scan.c
@@ -3025,8 +3025,10 @@ dsl_scan_async_block_should_pause(dsl_scan_t *scn)
if (zfs_recover)
return (B_FALSE);
- if (scn->scn_visited_this_txg >= zfs_async_block_max_blocks)
+ if (zfs_async_block_max_blocks != 0 &&
+ scn->scn_visited_this_txg >= zfs_async_block_max_blocks) {
return (B_TRUE);
+ }
elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time;
return (elapsed_nanosecs / NANOSEC > zfs_txg_timeout ||