]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/debug.h
Update bcachefs sources to 021e62a098 bcachefs: Fix error in filesystem initialization
[bcachefs-tools-debian] / libbcachefs / debug.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_DEBUG_H
3 #define _BCACHEFS_DEBUG_H
4
5 #include "bcachefs.h"
6
7 struct bio;
8 struct btree;
9 struct bch_fs;
10
11 #ifdef CONFIG_BCACHEFS_DEBUG
12 void __bch2_btree_verify(struct bch_fs *, struct btree *);
13 #else
14 static inline void __bch2_btree_verify(struct bch_fs *c, struct btree *b) {}
15 #endif
16
17 static inline void bch2_btree_verify(struct bch_fs *c, struct btree *b)
18 {
19         if (bch2_verify_btree_ondisk)
20                 __bch2_btree_verify(c, b);
21 }
22
23 #ifdef CONFIG_DEBUG_FS
24 void bch2_fs_debug_exit(struct bch_fs *);
25 void bch2_fs_debug_init(struct bch_fs *);
26 #else
27 static inline void bch2_fs_debug_exit(struct bch_fs *c) {}
28 static inline void bch2_fs_debug_init(struct bch_fs *c) {}
29 #endif
30
31 void bch2_debug_exit(void);
32 int bch2_debug_init(void);
33
34 #endif /* _BCACHEFS_DEBUG_H */