2018-04-03 17:16:55 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2017-10-09 01:51:02 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) Qu Wenruo 2017. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2018-04-03 17:16:55 +00:00
|
|
|
#ifndef BTRFS_TREE_CHECKER_H
|
|
|
|
#define BTRFS_TREE_CHECKER_H
|
2017-10-09 01:51:02 +00:00
|
|
|
|
|
|
|
#include "ctree.h"
|
|
|
|
#include "extent_io.h"
|
|
|
|
|
2017-11-08 00:54:24 +00:00
|
|
|
/*
|
|
|
|
* Comprehensive leaf checker.
|
|
|
|
* Will check not only the item pointers, but also every possible member
|
|
|
|
* in item data.
|
|
|
|
*/
|
2019-03-20 15:23:29 +00:00
|
|
|
int btrfs_check_leaf_full(struct extent_buffer *leaf);
|
2017-11-08 00:54:24 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Less strict leaf checker.
|
|
|
|
* Will only check item pointers, not reading item data.
|
|
|
|
*/
|
2018-01-25 06:56:18 +00:00
|
|
|
int btrfs_check_leaf_relaxed(struct btrfs_fs_info *fs_info,
|
2017-11-08 00:54:24 +00:00
|
|
|
struct extent_buffer *leaf);
|
2018-01-25 06:56:18 +00:00
|
|
|
int btrfs_check_node(struct btrfs_fs_info *fs_info, struct extent_buffer *node);
|
2017-10-09 01:51:02 +00:00
|
|
|
|
2019-03-20 05:16:42 +00:00
|
|
|
int btrfs_check_chunk_valid(struct btrfs_fs_info *fs_info,
|
|
|
|
struct extent_buffer *leaf,
|
|
|
|
struct btrfs_chunk *chunk, u64 logical);
|
|
|
|
|
2017-10-09 01:51:02 +00:00
|
|
|
#endif
|