diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-08-11 20:14:54 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:38 -0400 |
commit | 5c0bb66ae341c71e5f62c193ea4d7b0cf278a914 (patch) | |
tree | d7b3bcdc29039b2debad1c2bab4d91bb97f885f3 /fs/bcachefs/bcachefs.h | |
parent | 4aba7d4569f70167edf183055e809a37cd73cdd1 (diff) |
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>
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r-- | fs/bcachefs/bcachefs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index 9fe96516c114..f8b7434534eb 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -531,6 +531,9 @@ struct btree_debug { struct btree_transaction_stats { struct bch2_time_stats lock_hold_times; + struct mutex lock; + unsigned nr_max_paths; + char *max_paths_text; }; struct bch_fs_pcpu { |