]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bcachefs: Split out debug_check_btree_accounting
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 2 Nov 2020 23:36:08 +0000 (18:36 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:45 +0000 (17:08 -0400)
This check is very expensive

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs.h
fs/bcachefs/bset.h

index 85b8b7c4c9e1d3da2e1e353cab338edb12346abd..d56057f27e8f0d3036a718c43a2dd3120635e151 100644 (file)
@@ -265,6 +265,8 @@ do {                                                                        \
        BCH_DEBUG_PARAM(debug_check_bkeys,                              \
                "Run bkey_debugcheck (primarily checking GC/allocation "\
                "information) when iterating over keys")                \
+       BCH_DEBUG_PARAM(debug_check_btree_accounting,                   \
+               "Verify btree accounting for keys within a node")       \
        BCH_DEBUG_PARAM(verify_btree_ondisk,                            \
                "Reread btree nodes at various points to verify the "   \
                "mergesort in the read path against modifications "     \
index c9fe83ded267cc06df13d31f4859300d5c463fbc..21e4ed4eacc3ae0253f0a8dd0343ee3926af4366 100644 (file)
@@ -658,7 +658,7 @@ static inline void bch2_verify_insert_pos(struct btree *b,
 
 static inline void bch2_verify_btree_nr_keys(struct btree *b)
 {
-       if (bch2_expensive_debug_checks)
+       if (bch2_debug_check_btree_accounting)
                __bch2_verify_btree_nr_keys(b);
 }