Commit | Line | Data |
---|---|---|
cafe5635 KO |
1 | #ifndef _BCACHE_DEBUG_H |
2 | #define _BCACHE_DEBUG_H | |
3 | ||
dc9d98d6 KO |
4 | struct bio; |
5 | struct cached_dev; | |
6 | struct cache_set; | |
cafe5635 KO |
7 | |
8 | #ifdef CONFIG_BCACHE_DEBUG | |
9 | ||
78b77bf8 | 10 | void bch_btree_verify(struct btree *); |
220bb38c | 11 | void bch_data_verify(struct cached_dev *, struct bio *); |
280481d0 | 12 | |
280481d0 KO |
13 | #define expensive_debug_checks(c) ((c)->expensive_debug_checks) |
14 | #define key_merging_disabled(c) ((c)->key_merging_disabled) | |
5ceaaad7 | 15 | #define bypass_torture_test(d) ((d)->bypass_torture_test) |
cafe5635 KO |
16 | |
17 | #else /* DEBUG */ | |
18 | ||
78b77bf8 | 19 | static inline void bch_btree_verify(struct btree *b) {} |
280481d0 | 20 | static inline void bch_data_verify(struct cached_dev *dc, struct bio *bio) {} |
280481d0 | 21 | |
280481d0 KO |
22 | #define expensive_debug_checks(c) 0 |
23 | #define key_merging_disabled(c) 0 | |
5ceaaad7 | 24 | #define bypass_torture_test(d) 0 |
cafe5635 KO |
25 | |
26 | #endif | |
27 | ||
28 | #ifdef CONFIG_DEBUG_FS | |
29 | void bch_debug_init_cache_set(struct cache_set *); | |
30 | #else | |
31 | static inline void bch_debug_init_cache_set(struct cache_set *c) {} | |
32 | #endif | |
33 | ||
34 | #endif |