]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - repair/dinode.h
Update copyright/license notices to match SGI legal prefered boilerplate.
[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
23 int
24 verify_agbno(xfs_mount_t *mp,
25 xfs_agnumber_t agno,
26 xfs_agblock_t agbno);
27
28 int
29 verify_dfsbno(xfs_mount_t *mp,
30 xfs_dfsbno_t fsbno);
31
32 void
33 convert_extent(
34 xfs_bmbt_rec_32_t *rp,
35 xfs_dfiloff_t *op, /* starting offset (blockno in file) */
36 xfs_dfsbno_t *sp, /* starting block (fs blockno) */
37 xfs_dfilblks_t *cp, /* blockcount */
38 int *fp); /* extent flag */
39
40 int
41 process_bmbt_reclist(xfs_mount_t *mp,
42 xfs_bmbt_rec_32_t *rp,
43 int numrecs,
44 int type,
45 xfs_ino_t ino,
46 xfs_drfsbno_t *tot,
47 struct blkmap **blkmapp,
48 __uint64_t *first_key,
49 __uint64_t *last_key,
50 int whichfork);
51
52 int
53 scan_bmbt_reclist(
54 xfs_mount_t *mp,
55 xfs_bmbt_rec_32_t *rp,
56 int numrecs,
57 int type,
58 xfs_ino_t ino,
59 xfs_drfsbno_t *tot,
60 int whichfork);
61
62 int
63 verify_inode_chunk(xfs_mount_t *mp,
64 xfs_ino_t ino,
65 xfs_ino_t *start_ino);
66
67 int verify_aginode_chunk(xfs_mount_t *mp,
68 xfs_agnumber_t agno,
69 xfs_agino_t agino,
70 xfs_agino_t *agino_start);
71
72 int
73 clear_dinode(xfs_mount_t *mp, xfs_dinode_t *dino, xfs_ino_t ino_num);
74
75 void
76 update_rootino(xfs_mount_t *mp);
77
78 int
79 process_dinode(xfs_mount_t *mp,
80 xfs_dinode_t *dino,
81 xfs_agnumber_t agno,
82 xfs_agino_t ino,
83 int was_free,
84 int *dirty,
85 int *tossit,
86 int *used,
87 int check_dirs,
88 int check_dups,
89 int extra_attr_check,
90 int *isa_dir,
91 xfs_ino_t *parent);
92
93 int
94 verify_dinode(xfs_mount_t *mp,
95 xfs_dinode_t *dino,
96 xfs_agnumber_t agno,
97 xfs_agino_t ino);
98
99 int
100 verify_uncertain_dinode(xfs_mount_t *mp,
101 xfs_dinode_t *dino,
102 xfs_agnumber_t agno,
103 xfs_agino_t ino);
104
105 int
106 verify_inum(xfs_mount_t *mp,
107 xfs_ino_t ino);
108
109 int
110 verify_aginum(xfs_mount_t *mp,
111 xfs_agnumber_t agno,
112 xfs_agino_t agino);
113
114 int
115 process_uncertain_aginodes(xfs_mount_t *mp,
116 xfs_agnumber_t agno);
117 void
118 process_aginodes(xfs_mount_t *mp,
119 xfs_agnumber_t agno,
120 int check_dirs,
121 int check_dups,
122 int extra_attr_check);
123
124 void
125 check_uncertain_aginodes(xfs_mount_t *mp,
126 xfs_agnumber_t agno);
127
128 xfs_buf_t *
129 get_agino_buf(xfs_mount_t *mp,
130 xfs_agnumber_t agno,
131 xfs_agino_t agino,
132 xfs_dinode_t **dipp);
133
134 xfs_dfsbno_t
135 get_bmapi(xfs_mount_t *mp,
136 xfs_dinode_t *dip,
137 xfs_ino_t ino_num,
138 xfs_dfiloff_t bno,
139 int whichfork );
140
141 #endif /* _XR_DINODE_H */