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