blob: 3d53e8d6fda0ca8312dd2477d9dd36fc3ba245b8 [file] [log] [blame]
Qu Wenruo90eb4c02017-10-09 01:51:02 +00001/*
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
17#ifndef __BTRFS_TREE_CHECKER__
18#define __BTRFS_TREE_CHECKER__
19
20#include "ctree.h"
21#include "extent_io.h"
22
Qu Wenruof7438e62017-11-08 08:54:24 +080023/*
24 * Comprehensive leaf checker.
25 * Will check not only the item pointers, but also every possible member
26 * in item data.
27 */
28int btrfs_check_leaf_full(struct btrfs_root *root, struct extent_buffer *leaf);
29
30/*
31 * Less strict leaf checker.
32 * Will only check item pointers, not reading item data.
33 */
34int btrfs_check_leaf_relaxed(struct btrfs_root *root,
35 struct extent_buffer *leaf);
Qu Wenruo90eb4c02017-10-09 01:51:02 +000036int btrfs_check_node(struct btrfs_root *root, struct extent_buffer *node);
37
38#endif