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