From 96d994b37cfcf468bf1d71527ae95ad93a311e38 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 22 Aug 2022 23:12:11 -0400 Subject: bcachefs: Print deadlock cycle in debugfs In the event that we're not finished debugging the cycle detector, this adds a new file to debugfs that shows what the cycle detector finds, if anything. By comparing this with btree_transactions, which shows held locks for every btree_transaction, we'll be able to determine if it's the cycle detector that's buggy or something else. Signed-off-by: Kent Overstreet --- fs/bcachefs/btree_locking.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/bcachefs/btree_locking.h') diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index 874dd4428b3a..86f68b26cc94 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -426,6 +426,7 @@ struct six_lock_count bch2_btree_node_lock_counts(struct btree_trans *, struct btree_bkey_cached_common *b, unsigned); +int bch2_check_for_deadlock(struct btree_trans *, struct printbuf *); #ifdef CONFIG_BCACHEFS_DEBUG void bch2_btree_path_verify_locks(struct btree_path *); -- cgit v1.2.3