Linux 6.13-rc4
[linux.git] / fs / bcachefs / debug.h
blob2c37143b5fd1803e20eeddead3ad5160711d7a27
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_DEBUG_H
3 #define _BCACHEFS_DEBUG_H
5 #include "bcachefs.h"
7 struct bio;
8 struct btree;
9 struct bch_fs;
11 void __bch2_btree_verify(struct bch_fs *, struct btree *);
12 void bch2_btree_node_ondisk_to_text(struct printbuf *, struct bch_fs *,
13 const struct btree *);
15 static inline void bch2_btree_verify(struct bch_fs *c, struct btree *b)
17 if (bch2_verify_btree_ondisk)
18 __bch2_btree_verify(c, b);
21 #ifdef CONFIG_DEBUG_FS
22 void bch2_fs_debug_exit(struct bch_fs *);
23 void bch2_fs_debug_init(struct bch_fs *);
24 #else
25 static inline void bch2_fs_debug_exit(struct bch_fs *c) {}
26 static inline void bch2_fs_debug_init(struct bch_fs *c) {}
27 #endif
29 void bch2_debug_exit(void);
30 int bch2_debug_init(void);
32 #endif /* _BCACHEFS_DEBUG_H */