2013-03-23 17:11:31 -06:00
|
|
|
#ifndef _BCACHE_DEBUG_H
|
|
|
|
#define _BCACHE_DEBUG_H
|
|
|
|
|
2013-12-18 00:47:33 -07:00
|
|
|
struct bio;
|
|
|
|
struct cached_dev;
|
|
|
|
struct cache_set;
|
2013-03-23 17:11:31 -06:00
|
|
|
|
|
|
|
#ifdef CONFIG_BCACHE_DEBUG
|
|
|
|
|
2013-12-17 23:49:08 -07:00
|
|
|
void bch_btree_verify(struct btree *);
|
2013-09-10 20:02:45 -06:00
|
|
|
void bch_data_verify(struct cached_dev *, struct bio *);
|
2013-10-24 17:36:03 -06:00
|
|
|
|
|
|
|
#define expensive_debug_checks(c) ((c)->expensive_debug_checks)
|
|
|
|
#define key_merging_disabled(c) ((c)->key_merging_disabled)
|
2013-09-10 15:27:42 -06:00
|
|
|
#define bypass_torture_test(d) ((d)->bypass_torture_test)
|
2013-03-23 17:11:31 -06:00
|
|
|
|
|
|
|
#else /* DEBUG */
|
|
|
|
|
2013-12-17 23:49:08 -07:00
|
|
|
static inline void bch_btree_verify(struct btree *b) {}
|
2013-10-24 17:36:03 -06:00
|
|
|
static inline void bch_data_verify(struct cached_dev *dc, struct bio *bio) {}
|
|
|
|
|
|
|
|
#define expensive_debug_checks(c) 0
|
|
|
|
#define key_merging_disabled(c) 0
|
2013-09-10 15:27:42 -06:00
|
|
|
#define bypass_torture_test(d) 0
|
2013-03-23 17:11:31 -06:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_FS
|
|
|
|
void bch_debug_init_cache_set(struct cache_set *);
|
|
|
|
#else
|
|
|
|
static inline void bch_debug_init_cache_set(struct cache_set *c) {}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|