diff options
author | Jeff Mahoney <jeffm@suse.com> | 2017-06-20 14:15:26 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-21 15:48:01 +0200 |
commit | cddf3b2cb33e01087e82580a4a7d508f08ba59e4 (patch) | |
tree | 824ddac5ec4cf65c11bb4a0ccc70898b80ed8f2e | |
parent | btrfs: Round down values which are written for total_bytes_size (diff) | |
download | linux-cddf3b2cb33e01087e82580a4a7d508f08ba59e4.tar.xz linux-cddf3b2cb33e01087e82580a4a7d508f08ba59e4.zip |
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>
-rw-r--r-- | fs/btrfs/qgroup.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 458fec01d814..7d16f0692d73 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -1559,6 +1559,7 @@ int btrfs_qgroup_trace_leaf_items(struct btrfs_trans_handle *trans, if (ret) return ret; } + cond_resched(); return 0; } |