]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - repair/dinode.h
libxfs: refactor manage_zones()
[thirdparty/xfsprogs-dev.git] / repair / dinode.h
CommitLineData
959ef981 1// SPDX-License-Identifier: GPL-2.0
2bd0ea18 2/*
da23017d
NS
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
2bd0ea18
NS
5 */
6#ifndef _XR_DINODE_H
7#define _XR_DINODE_H
8
9struct blkmap;
1164bde5 10struct prefetch_args;
2bd0ea18
NS
11
12int
13verify_agbno(xfs_mount_t *mp,
14 xfs_agnumber_t agno,
15 xfs_agblock_t agbno);
16
17int
18verify_dfsbno(xfs_mount_t *mp,
5a35bf2c 19 xfs_fsblock_t fsbno);
2bd0ea18
NS
20
21void
22convert_extent(
5e656dbb 23 xfs_bmbt_rec_t *rp,
5a35bf2c
DC
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 */
2bd0ea18
NS
27 int *fp); /* extent flag */
28
dfc130f3 29int
2bd0ea18 30process_bmbt_reclist(xfs_mount_t *mp,
5e656dbb 31 xfs_bmbt_rec_t *rp,
e1f43b4c 32 int *numrecs,
2bd0ea18
NS
33 int type,
34 xfs_ino_t ino,
5a35bf2c 35 xfs_rfsblock_t *tot,
2bd0ea18 36 struct blkmap **blkmapp,
14f8b681
DW
37 uint64_t *first_key,
38 uint64_t *last_key,
2bd0ea18
NS
39 int whichfork);
40
41int
42scan_bmbt_reclist(
43 xfs_mount_t *mp,
5e656dbb 44 xfs_bmbt_rec_t *rp,
e1f43b4c 45 int *numrecs,
2bd0ea18
NS
46 int type,
47 xfs_ino_t ino,
5a35bf2c 48 xfs_rfsblock_t *tot,
2bd0ea18
NS
49 int whichfork);
50
2bd0ea18
NS
51void
52update_rootino(xfs_mount_t *mp);
53
54int
55process_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,
2bd0ea18
NS
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
68int
69verify_dinode(xfs_mount_t *mp,
70 xfs_dinode_t *dino,
71 xfs_agnumber_t agno,
72 xfs_agino_t ino);
73
74int
75verify_uncertain_dinode(xfs_mount_t *mp,
76 xfs_dinode_t *dino,
77 xfs_agnumber_t agno,
78 xfs_agino_t ino);
79
80int
81verify_inum(xfs_mount_t *mp,
82 xfs_ino_t ino);
83
84int
85verify_aginum(xfs_mount_t *mp,
86 xfs_agnumber_t agno,
87 xfs_agino_t agino);
88
89int
90process_uncertain_aginodes(xfs_mount_t *mp,
91 xfs_agnumber_t agno);
92void
1164bde5
DC
93process_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);
2bd0ea18
NS
99
100void
101check_uncertain_aginodes(xfs_mount_t *mp,
102 xfs_agnumber_t agno);
103
15028317
DW
104struct xfs_buf *
105get_agino_buf(
106 struct xfs_mount *mp,
107 xfs_agnumber_t agno,
108 xfs_agino_t agino,
109 struct xfs_dinode **dipp);
2bd0ea18 110
beed0dc8
DC
111void dinode_bmbt_translation_init(void);
112char * get_forkname(int whichfork);
113
2bd0ea18 114#endif /* _XR_DINODE_H */