]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - repair/dinode.h
xfs_db: add a superblock info command
[thirdparty/xfsprogs-dev.git] / repair / dinode.h
1 /*
2 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 #ifndef _XR_DINODE_H
19 #define _XR_DINODE_H
20
21 struct blkmap;
22 struct prefetch_args;
23
24 int
25 verify_agbno(xfs_mount_t *mp,
26 xfs_agnumber_t agno,
27 xfs_agblock_t agbno);
28
29 int
30 verify_dfsbno(xfs_mount_t *mp,
31 xfs_fsblock_t fsbno);
32
33 void
34 convert_extent(
35 xfs_bmbt_rec_t *rp,
36 xfs_fileoff_t *op, /* starting offset (blockno in file) */
37 xfs_fsblock_t *sp, /* starting block (fs blockno) */
38 xfs_filblks_t *cp, /* blockcount */
39 int *fp); /* extent flag */
40
41 int
42 process_bmbt_reclist(xfs_mount_t *mp,
43 xfs_bmbt_rec_t *rp,
44 int *numrecs,
45 int type,
46 xfs_ino_t ino,
47 xfs_rfsblock_t *tot,
48 struct blkmap **blkmapp,
49 uint64_t *first_key,
50 uint64_t *last_key,
51 int whichfork);
52
53 int
54 scan_bmbt_reclist(
55 xfs_mount_t *mp,
56 xfs_bmbt_rec_t *rp,
57 int *numrecs,
58 int type,
59 xfs_ino_t ino,
60 xfs_rfsblock_t *tot,
61 int whichfork);
62
63 void
64 update_rootino(xfs_mount_t *mp);
65
66 int
67 process_dinode(xfs_mount_t *mp,
68 xfs_dinode_t *dino,
69 xfs_agnumber_t agno,
70 xfs_agino_t ino,
71 int was_free,
72 int *dirty,
73 int *used,
74 int check_dirs,
75 int check_dups,
76 int extra_attr_check,
77 int *isa_dir,
78 xfs_ino_t *parent);
79
80 int
81 verify_dinode(xfs_mount_t *mp,
82 xfs_dinode_t *dino,
83 xfs_agnumber_t agno,
84 xfs_agino_t ino);
85
86 int
87 verify_uncertain_dinode(xfs_mount_t *mp,
88 xfs_dinode_t *dino,
89 xfs_agnumber_t agno,
90 xfs_agino_t ino);
91
92 int
93 verify_inum(xfs_mount_t *mp,
94 xfs_ino_t ino);
95
96 int
97 verify_aginum(xfs_mount_t *mp,
98 xfs_agnumber_t agno,
99 xfs_agino_t agino);
100
101 int
102 process_uncertain_aginodes(xfs_mount_t *mp,
103 xfs_agnumber_t agno);
104 void
105 process_aginodes(xfs_mount_t *mp,
106 struct prefetch_args *pf_args,
107 xfs_agnumber_t agno,
108 int check_dirs,
109 int check_dups,
110 int extra_attr_check);
111
112 void
113 check_uncertain_aginodes(xfs_mount_t *mp,
114 xfs_agnumber_t agno);
115
116 struct xfs_buf *
117 get_agino_buf(
118 struct xfs_mount *mp,
119 xfs_agnumber_t agno,
120 xfs_agino_t agino,
121 struct xfs_dinode **dipp);
122
123 void dinode_bmbt_translation_init(void);
124 char * get_forkname(int whichfork);
125
126 #endif /* _XR_DINODE_H */