Skip to contentSkip to conversation

btrfs: add cond_resched to btrfs_qgroup_trace_leaf_items

PATCH In review [email protected] 2 participants 2 messages Jun 20, 2017 – Jun 21, 2017 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: add cond_resched to btrfs_qgroup_trace_leaf_items

From: Jeff Mahoney <[email protected]>

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.

---
 fs/btrfs/qgroup.c | 1 +
 1 file changed, 1 insertion(+)
fs/btrfs/qgroup.c +1 -0
index deffbeb74a0b..7a3cfa22e178 100644
@@ -1559,6 +1559,7 @@ int btrfs_qgroup_trace_leaf_items(struct btrfs_trans_handle *trans,
 		if (ret)
 			return ret;
 	}
+	cond_resched();
 	return 0;
 }
 
Signature · 1 line
2.11.0