debug.h 840 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef _BCACHE_DEBUG_H
  2. #define _BCACHE_DEBUG_H
  3. struct bio;
  4. struct cached_dev;
  5. struct cache_set;
  6. #ifdef CONFIG_BCACHE_DEBUG
  7. void bch_btree_verify(struct btree *);
  8. void bch_data_verify(struct cached_dev *, struct bio *);
  9. #define expensive_debug_checks(c) ((c)->expensive_debug_checks)
  10. #define key_merging_disabled(c) ((c)->key_merging_disabled)
  11. #define bypass_torture_test(d) ((d)->bypass_torture_test)
  12. #else /* DEBUG */
  13. static inline void bch_btree_verify(struct btree *b) {}
  14. static inline void bch_data_verify(struct cached_dev *dc, struct bio *bio) {}
  15. #define expensive_debug_checks(c) 0
  16. #define key_merging_disabled(c) 0
  17. #define bypass_torture_test(d) 0
  18. #endif
  19. #ifdef CONFIG_DEBUG_FS
  20. void bch_debug_init_cache_set(struct cache_set *);
  21. #else
  22. static inline void bch_debug_init_cache_set(struct cache_set *c) {}
  23. #endif
  24. #endif