]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/debug.h
Update bcachefs sources to dab31ca168 bcachefs: Add some logging for btree node rewri...
[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 void __bch2_btree_verify(struct bch_fs *, struct btree *);
12
13 static inline void bch2_btree_verify(struct bch_fs *c, struct btree *b)
14 {
15         if (bch2_verify_btree_ondisk)
16                 __bch2_btree_verify(c, b);
17 }
18
19 #ifdef CONFIG_DEBUG_FS
20 void bch2_fs_debug_exit(struct bch_fs *);
21 void bch2_fs_debug_init(struct bch_fs *);
22 #else
23 static inline void bch2_fs_debug_exit(struct bch_fs *c) {}
24 static inline void bch2_fs_debug_init(struct bch_fs *c) {}
25 #endif
26
27 void bch2_debug_exit(void);
28 int bch2_debug_init(void);
29
30 #endif /* _BCACHEFS_DEBUG_H */