diff options
author | TulsiJain <[email protected]> | 2019-05-28 14:14:23 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-06-03 09:40:48 -0700 |
commit | a3c98d5728701d455e036d7687e3f7dbbb6100e5 (patch) | |
tree | 1b8e45786a002a88364e991e4af7e012aab43ee8 | |
parent | 2531ce372015a90f090176ae61105a9ea1a8f992 (diff) |
Make zfs_async_block_max_blocks handle zero correctly
Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Paul Dagnelie <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: TulsiJain <[email protected]>
Closes #8829
Closes #8289
-rw-r--r-- | module/zfs/dsl_scan.c | 4 |
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 || |