tree-checker.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (C) Qu Wenruo 2017. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public
  6. * License v2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public
  14. * License along with this program.
  15. */
  16. #ifndef __BTRFS_TREE_CHECKER__
  17. #define __BTRFS_TREE_CHECKER__
  18. #include "ctree.h"
  19. #include "extent_io.h"
  20. /*
  21. * Comprehensive leaf checker.
  22. * Will check not only the item pointers, but also every possible member
  23. * in item data.
  24. */
  25. int btrfs_check_leaf_full(struct btrfs_root *root, struct extent_buffer *leaf);
  26. /*
  27. * Less strict leaf checker.
  28. * Will only check item pointers, not reading item data.
  29. */
  30. int btrfs_check_leaf_relaxed(struct btrfs_root *root,
  31. struct extent_buffer *leaf);
  32. int btrfs_check_node(struct btrfs_root *root, struct extent_buffer *node);
  33. #endif