]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - repair/dinode.h
Update copyright/license notices to match SGI legal prefered boilerplate.
[thirdparty/xfsprogs-dev.git] / repair / dinode.h
CommitLineData
2bd0ea18 1/*
da23017d
NS
2 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
dfc130f3 4 *
da23017d
NS
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
2bd0ea18 7 * published by the Free Software Foundation.
dfc130f3 8 *
da23017d
NS
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.
dfc130f3 13 *
da23017d
NS
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
2bd0ea18
NS
17 */
18#ifndef _XR_DINODE_H
19#define _XR_DINODE_H
20
21struct blkmap;
22
23int
24verify_agbno(xfs_mount_t *mp,
25 xfs_agnumber_t agno,
26 xfs_agblock_t agbno);
27
28int
29verify_dfsbno(xfs_mount_t *mp,
30 xfs_dfsbno_t fsbno);
31
32void
33convert_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
dfc130f3 40int
2bd0ea18
NS
41process_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
52int
53scan_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
62int
63verify_inode_chunk(xfs_mount_t *mp,
64 xfs_ino_t ino,
65 xfs_ino_t *start_ino);
66
67int verify_aginode_chunk(xfs_mount_t *mp,
68 xfs_agnumber_t agno,
69 xfs_agino_t agino,
70 xfs_agino_t *agino_start);
71
72int
73clear_dinode(xfs_mount_t *mp, xfs_dinode_t *dino, xfs_ino_t ino_num);
74
75void
76update_rootino(xfs_mount_t *mp);
77
78int
79process_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
93int
94verify_dinode(xfs_mount_t *mp,
95 xfs_dinode_t *dino,
96 xfs_agnumber_t agno,
97 xfs_agino_t ino);
98
99int
100verify_uncertain_dinode(xfs_mount_t *mp,
101 xfs_dinode_t *dino,
102 xfs_agnumber_t agno,
103 xfs_agino_t ino);
104
105int
106verify_inum(xfs_mount_t *mp,
107 xfs_ino_t ino);
108
109int
110verify_aginum(xfs_mount_t *mp,
111 xfs_agnumber_t agno,
112 xfs_agino_t agino);
113
114int
115process_uncertain_aginodes(xfs_mount_t *mp,
116 xfs_agnumber_t agno);
117void
118process_aginodes(xfs_mount_t *mp,
119 xfs_agnumber_t agno,
120 int check_dirs,
121 int check_dups,
122 int extra_attr_check);
123
124void
125check_uncertain_aginodes(xfs_mount_t *mp,
126 xfs_agnumber_t agno);
127
128xfs_buf_t *
129get_agino_buf(xfs_mount_t *mp,
130 xfs_agnumber_t agno,
131 xfs_agino_t agino,
132 xfs_dinode_t **dipp);
133
134xfs_dfsbno_t
135get_bmapi(xfs_mount_t *mp,
136 xfs_dinode_t *dip,
137 xfs_ino_t ino_num,
138 xfs_dfiloff_t bno,
dfc130f3 139 int whichfork );
2bd0ea18
NS
140
141#endif /* _XR_DINODE_H */