bcachefs: Track the maximum btree_paths ever allocated by each transaction
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 12 Aug 2022 00:14:54 +0000 (20:14 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:38 +0000 (17:09 -0400)
commit5c0bb66ae341c71e5f62c193ea4d7b0cf278a914
treed7b3bcdc29039b2debad1c2bab4d91bb97f885f3
parent4aba7d4569f70167edf183055e809a37cd73cdd1
bcachefs: Track the maximum btree_paths ever allocated by each transaction

We need a way to check if the machinery for handling btree_paths with in
a transaction is behaving reasonably, as it often has not been - we've
had bugs with transaction path overflows caused by duplicate paths and
plenty of other things.

This patch tracks, per transaction fn, the most btree paths ever
allocated by that transaction and makes it available in debugfs.

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