]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - drivers/md/bcache/debug.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/kernel/linux.git] / drivers / md / bcache / debug.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
cafe5635
KO
2#ifndef _BCACHE_DEBUG_H
3#define _BCACHE_DEBUG_H
4
dc9d98d6
KO
5struct bio;
6struct cached_dev;
7struct cache_set;
cafe5635
KO
8
9#ifdef CONFIG_BCACHE_DEBUG
10
78b77bf8 11void bch_btree_verify(struct btree *);
220bb38c 12void bch_data_verify(struct cached_dev *, struct bio *);
280481d0 13
280481d0
KO
14#define expensive_debug_checks(c) ((c)->expensive_debug_checks)
15#define key_merging_disabled(c) ((c)->key_merging_disabled)
5ceaaad7 16#define bypass_torture_test(d) ((d)->bypass_torture_test)
cafe5635
KO
17
18#else /* DEBUG */
19
78b77bf8 20static inline void bch_btree_verify(struct btree *b) {}
280481d0 21static inline void bch_data_verify(struct cached_dev *dc, struct bio *bio) {}
280481d0 22
280481d0
KO
23#define expensive_debug_checks(c) 0
24#define key_merging_disabled(c) 0
5ceaaad7 25#define bypass_torture_test(d) 0
cafe5635
KO
26
27#endif
28
29#ifdef CONFIG_DEBUG_FS
30void bch_debug_init_cache_set(struct cache_set *);
31#else
32static inline void bch_debug_init_cache_set(struct cache_set *c) {}
33#endif
34
35#endif