WIP FPC-III support
[linux/fpc-iii.git] / drivers / md / bcache / debug.h
blobfb3d4dff4b26ea7ad5e088d1e67e65ebe1992903
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHE_DEBUG_H
3 #define _BCACHE_DEBUG_H
5 struct bio;
6 struct cached_dev;
7 struct cache_set;
9 #ifdef CONFIG_BCACHE_DEBUG
11 void bch_btree_verify(struct btree *b);
12 void bch_data_verify(struct cached_dev *dc, struct bio *bio);
14 #define expensive_debug_checks(c) ((c)->expensive_debug_checks)
15 #define key_merging_disabled(c) ((c)->key_merging_disabled)
16 #define bypass_torture_test(d) ((d)->bypass_torture_test)
18 #else /* DEBUG */
20 static inline void bch_btree_verify(struct btree *b) {}
21 static inline void bch_data_verify(struct cached_dev *dc, struct bio *bio) {}
23 #define expensive_debug_checks(c) 0
24 #define key_merging_disabled(c) 0
25 #define bypass_torture_test(d) 0
27 #endif
29 #ifdef CONFIG_DEBUG_FS
30 void bch_debug_init_cache_set(struct cache_set *c);
31 #else
32 static inline void bch_debug_init_cache_set(struct cache_set *c) {}
33 #endif
35 #endif