blob: ff043275b78444a2b4d377bb8faf9a78cb12670e [file] [log] [blame]
David Sterba9888c342018-04-03 19:16:55 +02001/* SPDX-License-Identifier: GPL-2.0 */
Qu Wenruo557ea5d2017-10-09 01:51:02 +00002/*
3 * Copyright (C) Qu Wenruo 2017. All rights reserved.
Qu Wenruo557ea5d2017-10-09 01:51:02 +00004 */
5
David Sterba9888c342018-04-03 19:16:55 +02006#ifndef BTRFS_TREE_CHECKER_H
7#define BTRFS_TREE_CHECKER_H
Qu Wenruo557ea5d2017-10-09 01:51:02 +00008
9#include "ctree.h"
10#include "extent_io.h"
11
Qu Wenruo69fc6cb2017-11-08 08:54:24 +080012/*
13 * Comprehensive leaf checker.
14 * Will check not only the item pointers, but also every possible member
15 * in item data.
16 */
Qu Wenruo2f659542018-01-25 14:56:18 +080017int btrfs_check_leaf_full(struct btrfs_fs_info *fs_info,
18 struct extent_buffer *leaf);
Qu Wenruo69fc6cb2017-11-08 08:54:24 +080019
20/*
21 * Less strict leaf checker.
22 * Will only check item pointers, not reading item data.
23 */
Qu Wenruo2f659542018-01-25 14:56:18 +080024int btrfs_check_leaf_relaxed(struct btrfs_fs_info *fs_info,
Qu Wenruo69fc6cb2017-11-08 08:54:24 +080025 struct extent_buffer *leaf);
Qu Wenruo2f659542018-01-25 14:56:18 +080026int btrfs_check_node(struct btrfs_fs_info *fs_info, struct extent_buffer *node);
Qu Wenruo557ea5d2017-10-09 01:51:02 +000027
28#endif