1cafe5635SKent Overstreet #ifndef _BCACHE_DEBUG_H 2cafe5635SKent Overstreet #define _BCACHE_DEBUG_H 3cafe5635SKent Overstreet 4*dc9d98d6SKent Overstreet struct bio; 5*dc9d98d6SKent Overstreet struct cached_dev; 6*dc9d98d6SKent Overstreet struct cache_set; 7cafe5635SKent Overstreet 8cafe5635SKent Overstreet #ifdef CONFIG_BCACHE_DEBUG 9cafe5635SKent Overstreet 1078b77bf8SKent Overstreet void bch_btree_verify(struct btree *); 11220bb38cSKent Overstreet void bch_data_verify(struct cached_dev *, struct bio *); 12280481d0SKent Overstreet 13280481d0SKent Overstreet #define expensive_debug_checks(c) ((c)->expensive_debug_checks) 14280481d0SKent Overstreet #define key_merging_disabled(c) ((c)->key_merging_disabled) 155ceaaad7SKent Overstreet #define bypass_torture_test(d) ((d)->bypass_torture_test) 16cafe5635SKent Overstreet 17cafe5635SKent Overstreet #else /* DEBUG */ 18cafe5635SKent Overstreet 1978b77bf8SKent Overstreet static inline void bch_btree_verify(struct btree *b) {} 20280481d0SKent Overstreet static inline void bch_data_verify(struct cached_dev *dc, struct bio *bio) {} 21280481d0SKent Overstreet 22280481d0SKent Overstreet #define expensive_debug_checks(c) 0 23280481d0SKent Overstreet #define key_merging_disabled(c) 0 245ceaaad7SKent Overstreet #define bypass_torture_test(d) 0 25cafe5635SKent Overstreet 26cafe5635SKent Overstreet #endif 27cafe5635SKent Overstreet 28cafe5635SKent Overstreet #ifdef CONFIG_DEBUG_FS 29cafe5635SKent Overstreet void bch_debug_init_cache_set(struct cache_set *); 30cafe5635SKent Overstreet #else 31cafe5635SKent Overstreet static inline void bch_debug_init_cache_set(struct cache_set *c) {} 32cafe5635SKent Overstreet #endif 33cafe5635SKent Overstreet 34cafe5635SKent Overstreet #endif 35