Merge remote-tracking branch 'asoc/topic/ac97' into asoc-fsl
[deliverable/linux.git] / drivers / md / bcache / debug.h
CommitLineData
cafe5635
KO
1#ifndef _BCACHE_DEBUG_H
2#define _BCACHE_DEBUG_H
3
4/* Btree/bkey debug printing */
5
85b1492e
KO
6int bch_bkey_to_text(char *buf, size_t size, const struct bkey *k);
7int bch_btree_to_text(char *buf, size_t size, const struct btree *b);
cafe5635
KO
8
9#ifdef CONFIG_BCACHE_EDEBUG
10
11unsigned bch_count_data(struct btree *);
12void bch_check_key_order_msg(struct btree *, struct bset *, const char *, ...);
13void bch_check_keys(struct btree *, const char *, ...);
14
15#define bch_check_key_order(b, i) \
16 bch_check_key_order_msg(b, i, "keys out of order")
17#define EBUG_ON(cond) BUG_ON(cond)
18
19#else /* EDEBUG */
20
21#define bch_count_data(b) 0
22#define bch_check_key_order(b, i) do {} while (0)
23#define bch_check_key_order_msg(b, i, ...) do {} while (0)
24#define bch_check_keys(b, ...) do {} while (0)
25#define EBUG_ON(cond) do {} while (0)
26
27#endif
28
29#ifdef CONFIG_BCACHE_DEBUG
30
31void bch_btree_verify(struct btree *, struct bset *);
32void bch_data_verify(struct search *);
33
34#else /* DEBUG */
35
36static inline void bch_btree_verify(struct btree *b, struct bset *i) {}
37static inline void bch_data_verify(struct search *s) {};
38
39#endif
40
41#ifdef CONFIG_DEBUG_FS
42void bch_debug_init_cache_set(struct cache_set *);
43#else
44static inline void bch_debug_init_cache_set(struct cache_set *c) {}
45#endif
46
47#endif
This page took 0.068511 seconds and 5 git commands to generate.