bcachefs: Print deadlock cycle in debugfs
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 23 Aug 2022 03:12:11 +0000 (23:12 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:41 +0000 (17:09 -0400)
commit96d994b37cfcf468bf1d71527ae95ad93a311e38
treed87dc4766e6ccf5a7d32b995a9749d2ee8583eec
parent33bd5d068603f9e81e0b73dbe50e9b88b2e56d0d
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>
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_locking.c
fs/bcachefs/btree_locking.h
fs/bcachefs/debug.c