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
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 ||