btrfs: add cond_resched to btrfs_qgroup_trace_leaf_items

On an uncontended system, we can end up hitting soft lockups while
doing replace_path.  At the core, and frequently called is
btrfs_qgroup_trace_leaf_items, so it makes sense to add a cond_resched
there.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Jeff Mahoney 2017-06-20 08:15:26 -04:00 committed by David Sterba
parent 7dfb8be11b
commit cddf3b2cb3
1 changed files with 1 additions and 0 deletions

View File

@ -1559,6 +1559,7 @@ int btrfs_qgroup_trace_leaf_items(struct btrfs_trans_handle *trans,
if (ret)
return ret;
}
cond_resched();
return 0;
}