]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - repair/dinode.h
libxfs: refactor manage_zones()
[thirdparty/xfsprogs-dev.git] / repair / dinode.h
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6 #ifndef _XR_DINODE_H
7 #define _XR_DINODE_H
8
9 struct blkmap;
10 struct prefetch_args;
11
12 int
13 verify_agbno(xfs_mount_t *mp,
14 xfs_agnumber_t agno,
15 xfs_agblock_t agbno);
16
17 int
18 verify_dfsbno(xfs_mount_t *mp,
19 xfs_fsblock_t fsbno);
20
21 void
22 convert_extent(
23 xfs_bmbt_rec_t *rp,
24 xfs_fileoff_t *op, /* starting offset (blockno in file) */
25 xfs_fsblock_t *sp, /* starting block (fs blockno) */
26 xfs_filblks_t *cp, /* blockcount */
27 int *fp); /* extent flag */
28
29 int
30 process_bmbt_reclist(xfs_mount_t *mp,
31 xfs_bmbt_rec_t *rp,
32 int *numrecs,
33 int type,
34 xfs_ino_t ino,
35 xfs_rfsblock_t *tot,
36 struct blkmap **blkmapp,
37 uint64_t *first_key,
38 uint64_t *last_key,
39 int whichfork);
40
41 int
42 scan_bmbt_reclist(
43 xfs_mount_t *mp,
44 xfs_bmbt_rec_t *rp,
45 int *numrecs,
46 int type,
47 xfs_ino_t ino,
48 xfs_rfsblock_t *tot,
49 int whichfork);
50
51 void
52 update_rootino(xfs_mount_t *mp);
53
54 int
55 process_dinode(xfs_mount_t *mp,
56 xfs_dinode_t *dino,
57 xfs_agnumber_t agno,
58 xfs_agino_t ino,
59 int was_free,
60 int *dirty,
61 int *used,
62 int check_dirs,
63 int check_dups,
64 int extra_attr_check,
65 int *isa_dir,
66 xfs_ino_t *parent);
67
68 int
69 verify_dinode(xfs_mount_t *mp,
70 xfs_dinode_t *dino,
71 xfs_agnumber_t agno,
72 xfs_agino_t ino);
73
74 int
75 verify_uncertain_dinode(xfs_mount_t *mp,
76 xfs_dinode_t *dino,
77 xfs_agnumber_t agno,
78 xfs_agino_t ino);
79
80 int
81 verify_inum(xfs_mount_t *mp,
82 xfs_ino_t ino);
83
84 int
85 verify_aginum(xfs_mount_t *mp,
86 xfs_agnumber_t agno,
87 xfs_agino_t agino);
88
89 int
90 process_uncertain_aginodes(xfs_mount_t *mp,
91 xfs_agnumber_t agno);
92 void
93 process_aginodes(xfs_mount_t *mp,
94 struct prefetch_args *pf_args,
95 xfs_agnumber_t agno,
96 int check_dirs,
97 int check_dups,
98 int extra_attr_check);
99
100 void
101 check_uncertain_aginodes(xfs_mount_t *mp,
102 xfs_agnumber_t agno);
103
104 struct xfs_buf *
105 get_agino_buf(
106 struct xfs_mount *mp,
107 xfs_agnumber_t agno,
108 xfs_agino_t agino,
109 struct xfs_dinode **dipp);
110
111 void dinode_bmbt_translation_init(void);
112 char * get_forkname(int whichfork);
113
114 #endif /* _XR_DINODE_H */