~ubuntu-branches/debian/stretch/jfsutils/stretch

« back to all changes in this revision

Viewing changes to fsck/xfsckint.h

  • Committer: Bazaar Package Importer
  • Author(s): Christopher L Cheney
  • Date: 2002-02-10 01:00:00 UTC
  • Revision ID: james.westby@ubuntu.com-20020210010000-v63g4150dcpnehzq
Tags: upstream-1.0.14
ImportĀ upstreamĀ versionĀ 1.0.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright (c) International Business Machines  Corp., 2000
 
3
 *
 
4
 *   This program is free software;  you can redistribute it and/or modify
 
5
 *   it under the terms of the GNU General Public License as published by
 
6
 *   the Free Software Foundation; either version 2 of the License, or
 
7
 *   (at your option) any later version.
 
8
 *
 
9
 *   This program is distributed in the hope that it will be useful,
 
10
 *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
 
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
 
12
 *   the 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 to the Free Software
 
16
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
17
 *
 
18
 *   MODULE_NAME:               xfsckint.h
 
19
 *
 
20
 *      prototypes for functions NOT INTENDED FOR CONSUMPTION
 
21
 *                               OUTSIDE THE FSCK UTILITY
 
22
 *
 
23
 *   COMPONENT_NAME:    jfs utilities
 
24
 *
 
25
 */
 
26
 
 
27
#ifndef H_XFSCKINT
 
28
#define H_XFSCKINT
 
29
 
 
30
#ifndef _JFS_FSCKDIRE
 
31
#include "xfsck.h"
 
32
#endif
 
33
 
 
34
#include "xchkdsk.h"
 
35
#include "fsckmsgc.h"
 
36
#include "fsckpfs.h"
 
37
#include "fsckwsp.h"
 
38
 
 
39
/*
 
40
  ---------------------- functions defined in fsckbmap ---------------------
 
41
*/
 
42
 
 
43
retcode_t rebuild_blkall_map ( void );
 
44
 
 
45
retcode_t verify_blkall_map ( void );
 
46
 
 
47
/*
 
48
  ---------------------- functions defined in fsckconn ---------------------
 
49
*/
 
50
 
 
51
int32_t adjust_parents ( fsck_inode_recptr, inoidx_t );
 
52
 
 
53
int32_t check_connectedness ( void );
 
54
 
 
55
int32_t check_dir_integrity ( void );
 
56
 
 
57
int32_t check_link_counts ( void );
 
58
 
 
59
/*
 
60
  ---------------------- functions defined in fsckdire ---------------------
 
61
*/
 
62
 
 
63
int32_t fsck_dtDelete( dinode_t *, component_t *, uint32_t * );
 
64
 
 
65
int32_t fsck_dtInsert( dinode_t *, component_t *, uint32_t * );
 
66
 
 
67
/*
 
68
  ---------------------- functions defined in fsckdtre ---------------------
 
69
*/
 
70
 
 
71
retcode_t direntry_add ( dinode_t *, uint32_t, UniChar * );
 
72
 
 
73
retcode_t direntry_get_inonum ( uint32_t,  int,  UniChar *,  int,
 
74
                                UniChar *, uint32_t *);
 
75
 
 
76
retcode_t direntry_get_objnam ( uint32_t, uint32_t, int *, UniChar *);
 
77
 
 
78
retcode_t direntry_remove ( dinode_t *,  uint32_t );
 
79
 
 
80
retcode_t dTree_processing ( dinode_t *, inoidx_t,fsck_inode_recptr,
 
81
                             fsck_msg_info_ptr, int );
 
82
 
 
83
retcode_t dTree_search( dinode_t *, UniChar *,  reg_idx_t, UniChar *,
 
84
                        reg_idx_t,   dtslot_t **,  int8_t *,   fsck_inode_recptr );
 
85
 
 
86
retcode_t find_first_dir_leaf ( dinode_t *,  dtpage_t **, fsblkidx_t *,
 
87
                                int8_t *, int8_t * );
 
88
 
 
89
void init_dir_tree( dtroot_t * );
 
90
 
 
91
retcode_t process_valid_dir_data ( dinode_t *,inoidx_t, fsck_inode_recptr,
 
92
                                fsck_msg_info_ptr, int );
 
93
 
 
94
retcode_t reconnect_fs_inodes( void );
 
95
 
 
96
/*
 
97
  ---------------------- functions defined in fsckimap ---------------------
 
98
*/
 
99
 
 
100
retcode_t AIS_redundancy_check( void );
 
101
 
 
102
retcode_t AIS_replication( void );
 
103
 
 
104
retcode_t rebuild_agg_iamap ( void );
 
105
 
 
106
retcode_t rebuild_fs_iamaps ( void );
 
107
 
 
108
retcode_t record_dupchk_inode_extents ( void );
 
109
 
 
110
retcode_t verify_agg_iamap ( void );
 
111
 
 
112
retcode_t verify_fs_iamaps ( void );
 
113
 
 
114
/*
 
115
  ---------------------- functions defined in fsckino ---------------------
 
116
*/
 
117
 
 
118
#define inode_type_recognized(iptr)\
 
119
              ( ISDIR(iptr->di_mode) || \
 
120
                ISREG(iptr->di_mode) || \
 
121
                ISLNK(iptr->di_mode) || \
 
122
                ISBLK(iptr->di_mode) || \
 
123
                ISCHR(iptr->di_mode) || \
 
124
                ISFIFO(iptr->di_mode)|| \
 
125
                ISSOCK(iptr->di_mode)       )             
 
126
 
 
127
retcode_t backout_ACL ( dinode_t  *, fsck_inode_recptr );
 
128
 
 
129
retcode_t backout_EA ( dinode_t  *, fsck_inode_recptr );
 
130
 
 
131
retcode_t calculate_dasd_used ( void );
 
132
 
 
133
retcode_t clear_ACL_field ( fsck_inode_recptr, dinode_t * );
 
134
 
 
135
retcode_t clear_EA_field ( fsck_inode_recptr, dinode_t * );
 
136
 
 
137
retcode_t display_path( inoidx_t, int, uint32_t, char  *,
 
138
                        fsck_inode_recptr );
 
139
 
 
140
retcode_t display_paths ( inoidx_t, fsck_inode_recptr, fsck_msg_info_ptr );
 
141
 
 
142
retcode_t first_ref_check_inode ( dinode_t *, inoidx_t, fsck_inode_recptr,
 
143
                                  fsck_msg_info_ptr );
 
144
 
 
145
retcode_t get_path ( inoidx_t, uint32_t,  char **, fsck_inode_recptr );
 
146
 
 
147
retcode_t in_inode_data_check( fsck_inode_recptr, fsck_msg_info_ptr );
 
148
 
 
149
retcode_t inode_is_in_use ( dinode_t *, uint32_t );
 
150
 
 
151
retcode_t parent_count( fsck_inode_recptr );
 
152
 
 
153
retcode_t record_valid_inode ( dinode_t *, inoidx_t, fsck_inode_recptr,
 
154
                               fsck_msg_info_ptr );
 
155
 
 
156
retcode_t release_inode ( inoidx_t, fsck_inode_recptr, dinode_t * );
 
157
 
 
158
retcode_t unrecord_valid_inode ( dinode_t *, inoidx_t, fsck_inode_recptr,
 
159
                                 fsck_msg_info_ptr );
 
160
 
 
161
retcode_t validate_ACL ( dinode_t  *, inoidx_t, fsck_inode_recptr,
 
162
                        fsck_msg_info_ptr );
 
163
 
 
164
retcode_t validate_dasd_used ( void );
 
165
 
 
166
retcode_t validate_data ( dinode_t  *, inoidx_t, fsck_inode_recptr,
 
167
                          fsck_msg_info_ptr );
 
168
 
 
169
retcode_t validate_dir_data ( dinode_t  *, inoidx_t, fsck_inode_recptr,
 
170
                              fsck_msg_info_ptr );
 
171
 
 
172
retcode_t validate_EA ( dinode_t  *, inoidx_t, fsck_inode_recptr,
 
173
                        fsck_msg_info_ptr );
 
174
 
 
175
retcode_t validate_record_fileset_inode ( uint32_t, inoidx_t, dinode_t *,
 
176
                                          fsck_msg_info_ptr );
 
177
 
 
178
/*
 
179
  ---------------------- functions defined in fsckmeta ---------------------
 
180
*/
 
181
 
 
182
retcode_t agg_clean_or_dirty ( void );
 
183
 
 
184
retcode_t fatal_dup_check ( void );
 
185
 
 
186
retcode_t first_ref_check_agg_metadata ( void );
 
187
 
 
188
retcode_t first_ref_check_fixed_metadata ( void );
 
189
 
 
190
retcode_t first_ref_check_fs_metadata ( void );
 
191
 
 
192
retcode_t first_ref_check_inode_extents ( void );
 
193
 
 
194
retcode_t record_fixed_metadata (void );
 
195
 
 
196
retcode_t replicate_superblock ( void );
 
197
 
 
198
retcode_t validate_fs_metadata ( void );
 
199
 
 
200
retcode_t validate_repair_superblock ( void );
 
201
 
 
202
retcode_t validate_select_agg_inode_table ( void );
 
203
 
 
204
/*
 
205
  ---------------------- functions defined in fsckmsgs ---------------------
 
206
*/
 
207
 
 
208
void fsck_send_msg( int, int, int );
 
209
 
 
210
/*
 
211
  ---------------------- functions defined in fsckpfs ---------------------
 
212
*/
 
213
 
 
214
retcode_t ait_node_get ( fsblkidx_t, xtpage_t  * );
 
215
 
 
216
retcode_t ait_node_put ( fsblkidx_t, xtpage_t  * );
 
217
 
 
218
retcode_t ait_special_read_ext1 ( int );
 
219
 
 
220
retcode_t blkmap_find_bit( fsblkidx_t, mappgidx_t *, reg_idx_t *, fsck_bitmask_ptr );
 
221
 
 
222
retcode_t blkmap_flush( void );
 
223
 
 
224
retcode_t blkmap_get_ctl_page ( blk_cntrlptr );
 
225
 
 
226
retcode_t blkmap_get_page( mappgidx_t, blk_pageptr *);
 
227
 
 
228
retcode_t blkmap_put_ctl_page ( blk_cntrlptr );
 
229
 
 
230
retcode_t blkmap_put_page( mappgidx_t );
 
231
 
 
232
retcode_t blktbl_ctl_page_put ( dbmap_t * );
 
233
 
 
234
retcode_t blktbl_dmap_get( fsblkidx_t, dmap_t ** );
 
235
 
 
236
retcode_t blktbl_dmap_put( dmap_t * );
 
237
 
 
238
retcode_t blktbl_dmaps_flush( void );
 
239
 
 
240
retcode_t blktbl_Ln_page_get( int8_t, fsblkidx_t, dmapctl_t ** );
 
241
 
 
242
retcode_t blktbl_Ln_page_put( dmapctl_t * );
 
243
 
 
244
retcode_t blktbl_Ln_pages_flush( void );
 
245
 
 
246
retcode_t close_volume( void );
 
247
 
 
248
retcode_t default_volume( void );
 
249
 
 
250
retcode_t dnode_get ( fsblkidx_t, reg_idx_t, dtpage_t ** );
 
251
 
 
252
retcode_t ea_get ( fsblkidx_t, reg_idx_t, char *, reg_idx_t *,
 
253
                   reg_idx_t *, agg_byteidx_t * );
 
254
 
 
255
retcode_t  fscklog_put_buffer ( void );
 
256
 
 
257
retcode_t iag_get ( int, int, int, iagno_t,  iag_t ** );
 
258
 
 
259
retcode_t iag_get_first ( int, int,  int,  iag_t ** );
 
260
 
 
261
retcode_t iag_get_next ( iag_t ** );
 
262
 
 
263
retcode_t iag_put ( iag_t * );
 
264
 
 
265
retcode_t iags_flush ( void );
 
266
 
 
267
retcode_t inodes_flush ( void );
 
268
 
 
269
retcode_t inode_get ( int, int, inoidx_t, dinode_t ** );
 
270
 
 
271
retcode_t inode_get_first_fs ( int, inoidx_t *,dinode_t ** );
 
272
 
 
273
retcode_t inode_get_next ( inoidx_t *, dinode_t ** );
 
274
 
 
275
retcode_t inode_put ( dinode_t * );
 
276
 
 
277
retcode_t inotbl_get_ctl_page ( int, dinomap_t ** );
 
278
 
 
279
retcode_t inotbl_put_ctl_page ( int, dinomap_t * );
 
280
 
 
281
retcode_t mapctl_get ( fsblkidx_t, void  ** );
 
282
 
 
283
retcode_t mapctl_put ( void * );
 
284
 
 
285
retcode_t mapctl_flush ( void );
 
286
 
 
287
retcode_t node_get ( fsblkidx_t, xtpage_t ** );
 
288
 
 
289
retcode_t open_volume ( char * );
 
290
 
 
291
retcode_t readwrite_device( agg_byteidx_t, reg_idx_t, reg_idx_t *,
 
292
                            void *, int);
 
293
 
 
294
retcode_t recon_dnode_assign ( fsblkidx_t, dtpage_t ** );
 
295
 
 
296
retcode_t recon_dnode_get( fsblkidx_t, dtpage_t ** );
 
297
 
 
298
retcode_t recon_dnode_put( dtpage_t * );
 
299
 
 
300
retcode_t recon_dnode_release( dtpage_t * );
 
301
 
 
302
/*
 
303
  ---------------------- functions defined in fsckruns ---------------------
 
304
*/
 
305
 
 
306
void fsck_hbeat_start ( void );
 
307
 
 
308
void fsck_hbeat_stop ( void );
 
309
 
 
310
/*
 
311
  ---------------------- functions defined in fsckwsp ---------------------
 
312
*/
 
313
 
 
314
int alloc_vlarge_buffer( void );
 
315
 
 
316
int alloc_wrksp( uint32_t, int, int, void ** ); /* called from both fsck modules
 
317
                                                 * and from logredo modules
 
318
                                                 */
 
319
 
 
320
retcode_t blkall_decrement_owners ( fsblkidx_t );
 
321
 
 
322
retcode_t blkall_increment_owners ( fsblkidx_t );
 
323
 
 
324
retcode_t blkall_ref_check ( fsblkidx_t, int * );
 
325
 
 
326
retcode_t dire_buffer_alloc( dtpage_t ** );
 
327
 
 
328
retcode_t dire_buffer_release( dtpage_t * );
 
329
 
 
330
retcode_t directory_buffers_alloc( void );
 
331
 
 
332
retcode_t directory_buffers_release( void );
 
333
 
 
334
retcode_t dtreeQ_dequeue( dtreeQ_elem_ptr * );
 
335
 
 
336
retcode_t dtreeQ_enqueue( dtreeQ_elem_ptr );
 
337
 
 
338
retcode_t dtreeQ_get_elem ( dtreeQ_elem_ptr * );
 
339
 
 
340
retcode_t dtreeQ_rel_elem ( dtreeQ_elem_ptr );
 
341
 
 
342
retcode_t establish_agg_workspace ( void );
 
343
 
 
344
retcode_t establish_ea_iobuf ( void );
 
345
 
 
346
retcode_t establish_fs_workspace ( void );
 
347
 
 
348
retcode_t establish_io_buffers ( void );
 
349
 
 
350
retcode_t establish_wsp_block_map_ctl ( void );
 
351
 
 
352
retcode_t extent_record ( fsblkidx_t, fsblkidx_t );
 
353
 
 
354
retcode_t extent_unrecord ( fsblkidx_t, fsblkidx_t );
 
355
 
 
356
retcode_t fsck_alloc_fsblks ( int32_t, fsblkidx_t * );
 
357
 
 
358
retcode_t fsck_dealloc_fsblks ( int32_t, fsblkidx_t );
 
359
 
 
360
retcode_t fscklog_end ( void );
 
361
 
 
362
retcode_t fscklog_init ( void );
 
363
 
 
364
retcode_t fscklog_start ( void );
 
365
 
 
366
retcode_t get_inode_extension ( fsck_inode_extptr * );
 
367
 
 
368
retcode_t get_inorecptr ( int, int, inoidx_t, fsck_inode_recptr * );
 
369
 
 
370
retcode_t get_inorecptr_first ( int, inoidx_t *, fsck_inode_recptr * );
 
371
 
 
372
retcode_t get_inorecptr_next ( int, inoidx_t *, fsck_inode_recptr * );
 
373
 
 
374
retcode_t init_agg_record ( void );
 
375
 
 
376
retcode_t process_extent( fsck_inode_recptr, uint32_t, fsblkidx_t, int8_t,
 
377
                          int8_t, fsck_msg_info_ptr, uint32_t *, int8_t *, int );
 
378
 
 
379
retcode_t release_inode_extension ( fsck_inode_extptr );
 
380
 
 
381
retcode_t release_logredo_allocs( void );
 
382
 
 
383
retcode_t temp_inode_buf_alloc( char ** );
 
384
 
 
385
retcode_t temp_inode_buf_release( char * );
 
386
 
 
387
retcode_t temp_node_buf_alloc( char ** );
 
388
 
 
389
retcode_t temp_node_buf_release( char * );
 
390
 
 
391
retcode_t treeQ_dequeue( treeQ_elem_ptr * );
 
392
 
 
393
retcode_t treeQ_enqueue( treeQ_elem_ptr );
 
394
 
 
395
retcode_t treeQ_get_elem ( treeQ_elem_ptr * );
 
396
 
 
397
retcode_t treeQ_rel_elem ( treeQ_elem_ptr );
 
398
 
 
399
retcode_t treeStack_pop ( fsck_inode_recptr * );
 
400
 
 
401
retcode_t treeStack_push ( fsck_inode_recptr );
 
402
 
 
403
retcode_t workspace_release ( void );
 
404
 
 
405
/*
 
406
  ---------------------- functions defined in fsckxtre ---------------------
 
407
*/
 
408
 
 
409
retcode_t find_first_leaf ( dinode_t *, xtpage_t **,  fsblkidx_t *,
 
410
                            int8_t *, int8_t * );
 
411
 
 
412
retcode_t init_xtree_root( dinode_t * );
 
413
 
 
414
retcode_t process_valid_data ( dinode_t *, inoidx_t, fsck_inode_recptr,
 
415
                               fsck_msg_info_ptr, int );
 
416
 
 
417
retcode_t xTree_processing( dinode_t *, inoidx_t, fsck_inode_recptr,
 
418
                            fsck_msg_info_ptr, int );
 
419
 
 
420
retcode_t xTree_search( dinode_t *, fsblkidx_t, xad_t **, int8_t * );
 
421
 
 
422
/*
 
423
  ---------------------- functions defined in xchkdsk.c ---------------------
 
424
*/
 
425
 
 
426
void report_readait_error( retcode_t, retcode_t, int );
 
427
 
 
428
#endif