Make zfs_async_block_max_blocks handle zero correctly
Reviewed-by: Matt Ahrens <mahrens@delphix.com> Reviewed-by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: TulsiJain <tulsi.jain@delphix.com> Closes #8829 Closes #8289
This commit is contained in:
parent
2531ce3720
commit
a3c98d5728
|
@ -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 ||
|
||||
|
|
Loading…
Reference in New Issue