diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-08-22 23:12:11 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:41 -0400 |
commit | 96d994b37cfcf468bf1d71527ae95ad93a311e38 (patch) | |
tree | d87dc4766e6ccf5a7d32b995a9749d2ee8583eec /fs/bcachefs/btree_locking.h | |
parent | 33bd5d068603f9e81e0b73dbe50e9b88b2e56d0d (diff) | |
download | linux-stable-96d994b37cfcf468bf1d71527ae95ad93a311e38.tar.gz linux-stable-96d994b37cfcf468bf1d71527ae95ad93a311e38.tar.bz2 linux-stable-96d994b37cfcf468bf1d71527ae95ad93a311e38.zip |
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.h | 1 |
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 *); |