~ubuntu-branches/ubuntu/utopic/xfsprogs/utopic-proposed

« back to all changes in this revision

Viewing changes to repair/dinode.h

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2002-04-13 09:45:06 UTC
  • Revision ID: james.westby@ubuntu.com-20020413094506-t8dhemv41gkeg4kx
Tags: 2.0.3-1
New upstream bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
 
3
 * 
 
4
 * This program is free software; you can redistribute it and/or modify it
 
5
 * under the terms of version 2 of the GNU General Public License as
 
6
 * published by the Free Software Foundation.
 
7
 * 
 
8
 * This program is distributed in the hope that it would be useful, but
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
11
 * 
 
12
 * Further, this software is distributed without any warranty that it is
 
13
 * free of the rightful claim of any third person regarding infringement
 
14
 * or the like.  Any license provided herein, whether implied or
 
15
 * otherwise, applies only to this software file.  Patent licenses, if
 
16
 * any, provided herein do not apply to combinations of this program with
 
17
 * other software, or any other product whatsoever.
 
18
 * 
 
19
 * You should have received a copy of the GNU General Public License along
 
20
 * with this program; if not, write the Free Software Foundation, Inc., 59
 
21
 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
 
22
 * 
 
23
 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
 
24
 * Mountain View, CA  94043, or:
 
25
 * 
 
26
 * http://www.sgi.com 
 
27
 * 
 
28
 * For further information regarding this notice, see: 
 
29
 * 
 
30
 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
 
31
 */
 
32
#ifndef _XR_DINODE_H
 
33
#define _XR_DINODE_H
 
34
 
 
35
struct blkmap;
 
36
 
 
37
int
 
38
verify_agbno(xfs_mount_t        *mp,
 
39
                xfs_agnumber_t  agno,
 
40
                xfs_agblock_t   agbno);
 
41
 
 
42
int
 
43
verify_dfsbno(xfs_mount_t       *mp,
 
44
                xfs_dfsbno_t    fsbno);
 
45
 
 
46
void
 
47
convert_extent(
 
48
        xfs_bmbt_rec_32_t       *rp,
 
49
        xfs_dfiloff_t           *op,    /* starting offset (blockno in file) */
 
50
        xfs_dfsbno_t            *sp,    /* starting block (fs blockno) */
 
51
        xfs_dfilblks_t          *cp,    /* blockcount */
 
52
        int                     *fp);   /* extent flag */
 
53
 
 
54
int     
 
55
process_bmbt_reclist(xfs_mount_t        *mp,
 
56
                xfs_bmbt_rec_32_t       *rp,
 
57
                int                     numrecs,
 
58
                int                     type,
 
59
                xfs_ino_t               ino,
 
60
                xfs_drfsbno_t           *tot,
 
61
                struct blkmap           **blkmapp,
 
62
                __uint64_t              *first_key,
 
63
                __uint64_t              *last_key,
 
64
                int                     whichfork);
 
65
 
 
66
int
 
67
scan_bmbt_reclist(
 
68
        xfs_mount_t             *mp,
 
69
        xfs_bmbt_rec_32_t       *rp,
 
70
        int                     numrecs,
 
71
        int                     type,
 
72
        xfs_ino_t               ino,
 
73
        xfs_drfsbno_t           *tot,
 
74
        int                     whichfork);
 
75
 
 
76
int
 
77
verify_inode_chunk(xfs_mount_t          *mp,
 
78
                        xfs_ino_t       ino,
 
79
                        xfs_ino_t       *start_ino);
 
80
 
 
81
int     verify_aginode_chunk(xfs_mount_t        *mp,
 
82
                                xfs_agnumber_t  agno,
 
83
                                xfs_agino_t     agino,
 
84
                                xfs_agino_t     *agino_start);
 
85
 
 
86
int
 
87
clear_dinode(xfs_mount_t *mp, xfs_dinode_t *dino, xfs_ino_t ino_num);
 
88
 
 
89
void
 
90
update_rootino(xfs_mount_t *mp);
 
91
 
 
92
int
 
93
process_dinode(xfs_mount_t *mp,
 
94
                xfs_dinode_t *dino,
 
95
                xfs_agnumber_t agno,
 
96
                xfs_agino_t ino,
 
97
                int was_free,
 
98
                int *dirty,
 
99
                int *tossit,
 
100
                int *used,
 
101
                int check_dirs,
 
102
                int check_dups,
 
103
                int extra_attr_check,
 
104
                int *isa_dir,
 
105
                xfs_ino_t *parent);
 
106
 
 
107
int
 
108
verify_dinode(xfs_mount_t *mp,
 
109
                xfs_dinode_t *dino,
 
110
                xfs_agnumber_t agno,
 
111
                xfs_agino_t ino);
 
112
 
 
113
int
 
114
verify_uncertain_dinode(xfs_mount_t *mp,
 
115
                xfs_dinode_t *dino,
 
116
                xfs_agnumber_t agno,
 
117
                xfs_agino_t ino);
 
118
 
 
119
int
 
120
verify_inum(xfs_mount_t         *mp,
 
121
                xfs_ino_t       ino);
 
122
 
 
123
int
 
124
verify_aginum(xfs_mount_t       *mp,
 
125
                xfs_agnumber_t  agno,
 
126
                xfs_agino_t     agino);
 
127
 
 
128
int
 
129
process_uncertain_aginodes(xfs_mount_t          *mp,
 
130
                                xfs_agnumber_t  agno);
 
131
void
 
132
process_aginodes(xfs_mount_t    *mp,
 
133
                xfs_agnumber_t  agno,
 
134
                int             check_dirs,
 
135
                int             check_dups,
 
136
                int             extra_attr_check);
 
137
 
 
138
void
 
139
check_uncertain_aginodes(xfs_mount_t    *mp,
 
140
                        xfs_agnumber_t  agno);
 
141
 
 
142
xfs_buf_t *
 
143
get_agino_buf(xfs_mount_t       *mp,
 
144
                xfs_agnumber_t  agno,
 
145
                xfs_agino_t     agino,
 
146
                xfs_dinode_t    **dipp);
 
147
 
 
148
xfs_dfsbno_t
 
149
get_bmapi(xfs_mount_t           *mp,
 
150
                xfs_dinode_t    *dip,
 
151
                xfs_ino_t       ino_num,
 
152
                xfs_dfiloff_t   bno,
 
153
                int             whichfork );
 
154
 
 
155
#endif /* _XR_DINODE_H */