David Sterba | 9888c34 | 2018-04-03 19:16:55 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Qu Wenruo | 557ea5d | 2017-10-09 01:51:02 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) Qu Wenruo 2017. All rights reserved. |
Qu Wenruo | 557ea5d | 2017-10-09 01:51:02 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
David Sterba | 9888c34 | 2018-04-03 19:16:55 +0200 | [diff] [blame] | 6 | #ifndef BTRFS_TREE_CHECKER_H |
| 7 | #define BTRFS_TREE_CHECKER_H |
Qu Wenruo | 557ea5d | 2017-10-09 01:51:02 +0000 | [diff] [blame] | 8 | |
| 9 | #include "ctree.h" |
| 10 | #include "extent_io.h" |
| 11 | |
Qu Wenruo | 69fc6cb | 2017-11-08 08:54:24 +0800 | [diff] [blame] | 12 | /* |
| 13 | * Comprehensive leaf checker. |
| 14 | * Will check not only the item pointers, but also every possible member |
| 15 | * in item data. |
| 16 | */ |
Qu Wenruo | 2f65954 | 2018-01-25 14:56:18 +0800 | [diff] [blame] | 17 | int btrfs_check_leaf_full(struct btrfs_fs_info *fs_info, |
| 18 | struct extent_buffer *leaf); |
Qu Wenruo | 69fc6cb | 2017-11-08 08:54:24 +0800 | [diff] [blame] | 19 | |
| 20 | /* |
| 21 | * Less strict leaf checker. |
| 22 | * Will only check item pointers, not reading item data. |
| 23 | */ |
Qu Wenruo | 2f65954 | 2018-01-25 14:56:18 +0800 | [diff] [blame] | 24 | int btrfs_check_leaf_relaxed(struct btrfs_fs_info *fs_info, |
Qu Wenruo | 69fc6cb | 2017-11-08 08:54:24 +0800 | [diff] [blame] | 25 | struct extent_buffer *leaf); |
Qu Wenruo | 2f65954 | 2018-01-25 14:56:18 +0800 | [diff] [blame] | 26 | int btrfs_check_node(struct btrfs_fs_info *fs_info, struct extent_buffer *node); |
Qu Wenruo | 557ea5d | 2017-10-09 01:51:02 +0000 | [diff] [blame] | 27 | |
| 28 | #endif |