bcachefs: Print cycle on unrecoverable deadlock
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 9 Oct 2022 08:29:04 +0000 (04:29 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:42 +0000 (17:09 -0400)
commit1148a97f1fb9b80ef5355021f0c2dfc7b8f003a2
tree6acb14dfff4d86d895e01b67aca7428b6abb7723
parent1be887979bc12a6c88b33b0d53dfdc369bfa9d49
bcachefs: Print cycle on unrecoverable deadlock

Some lock operations can't fail; a cycle of nofail locks is impossible
to recover from. So we want to get rid of these nofail locking
operations, but as this is tricky it'll be done incrementally.

If such a cycle happens, this patch prints out which codepaths are
involved so we know what to work on next.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_locking.c
fs/bcachefs/debug.c
fs/bcachefs/util.c
fs/bcachefs/util.h