From: Kent Overstreet Date: Mon, 2 Nov 2020 23:36:08 +0000 (-0500) Subject: bcachefs: Split out debug_check_btree_accounting X-Git-Tag: v6.7-rc1~201^2~1955 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=692d4031a458092bc602840739f97c4acf155dcb;p=thirdparty%2Fkernel%2Flinux.git bcachefs: Split out debug_check_btree_accounting This check is very expensive Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index 85b8b7c4c9e1d..d56057f27e8f0 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -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 " \ diff --git a/fs/bcachefs/bset.h b/fs/bcachefs/bset.h index c9fe83ded267c..21e4ed4eacc3a 100644 --- a/fs/bcachefs/bset.h +++ b/fs/bcachefs/bset.h @@ -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); }