btrfs-progs: check: Move node_refs structure to check/common.h
[platform/upstream/btrfs-progs.git] / check / common.h
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public
4  * License v2 as published by the Free Software Foundation.
5  *
6  * This program is distributed in the hope that it will be useful,
7  * but WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9  * General Public License for more details.
10  *
11  * You should have received a copy of the GNU General Public
12  * License along with this program; if not, write to the
13  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
14  * Boston, MA 021110-1307, USA.
15  */
16
17 /*
18  * Defines and function declarations for code shared by both lowmem and
19  * original mode
20  */
21 #ifndef __BTRFS_CHECK_COMMON_H__
22 #define __BTRFS_CHECK_COMMON_H__
23 #include "ctree.h"
24
25 /*
26  * Use for tree walk to walk through trees whose leaves/nodes can be shared
27  * between different trees. (Namely subvolume/fs trees)
28  */
29 struct node_refs {
30         u64 bytenr[BTRFS_MAX_LEVEL];
31         u64 refs[BTRFS_MAX_LEVEL];
32         int need_check[BTRFS_MAX_LEVEL];
33         /* field for checking all trees */
34         int checked[BTRFS_MAX_LEVEL];
35         /* the corresponding extent should be marked as full backref or not */
36         int full_backref[BTRFS_MAX_LEVEL];
37 };
38
39 #endif