2013-03-24 07:11:31 +08:00
|
|
|
#ifndef _BCACHE_DEBUG_H
|
|
|
|
#define _BCACHE_DEBUG_H
|
|
|
|
|
2013-12-18 15:47:33 +08:00
|
|
|
struct bio;
|
|
|
|
struct cached_dev;
|
|
|
|
struct cache_set;
|
2013-03-24 07:11:31 +08:00
|
|
|
|
|
|
|
#ifdef CONFIG_BCACHE_DEBUG
|
|
|
|
|
2013-12-18 14:49:08 +08:00
|
|
|
void bch_btree_verify(struct btree *);
|
2013-09-11 10:02:45 +08:00
|
|
|
void bch_data_verify(struct cached_dev *, struct bio *);
|
2013-10-25 07:36:03 +08:00
|
|
|
|
|
|
|
#define expensive_debug_checks(c) ((c)->expensive_debug_checks)
|
|
|
|
#define key_merging_disabled(c) ((c)->key_merging_disabled)
|
2013-09-11 05:27:42 +08:00
|
|
|
#define bypass_torture_test(d) ((d)->bypass_torture_test)
|
2013-03-24 07:11:31 +08:00
|
|
|
|
|
|
|
#else /* DEBUG */
|
|
|
|
|
2013-12-18 14:49:08 +08:00
|
|
|
static inline void bch_btree_verify(struct btree *b) {}
|
2013-10-25 07:36:03 +08: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-11 05:27:42 +08:00
|
|
|
#define bypass_torture_test(d) 0
|
2013-03-24 07:11:31 +08: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
|