summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_locking.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-08-23 06:12:11 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:41 +0300
commit96d994b37cfcf468bf1d71527ae95ad93a311e38 (patch)
treed87dc4766e6ccf5a7d32b995a9749d2ee8583eec /fs/bcachefs/btree_locking.h
parent33bd5d068603f9e81e0b73dbe50e9b88b2e56d0d (diff)
downloadlinux-96d994b37cfcf468bf1d71527ae95ad93a311e38.tar.xz
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 <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_locking.h')
-rw-r--r--fs/bcachefs/btree_locking.h1
1 files changed, 1 insertions, 0 deletions
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 *);