Whamcloud - gitweb
ChangeLog, e2fsck.h, journal.c, problem.c, problem.h, super.c:
[tools/e2fsprogs.git] / e2fsck / problem.h
1 /*
2  * problem.h --- e2fsck problem error codes
3  *
4  * Copyright 1996 by Theodore Ts'o
5  *
6  * %Begin-Header%
7  * This file may be redistributed under the terms of the GNU Public
8  * License.
9  * %End-Header%
10  */
11
12 typedef __u32 problem_t;
13
14 struct problem_context {
15         errcode_t       errcode;
16         ext2_ino_t ino, ino2, dir;
17         struct ext2_inode *inode;
18         struct ext2_dir_entry *dirent;
19         blk_t   blk, blk2;
20         e2_blkcnt_t     blkcount;
21         int             group;
22         __u64   num;
23         const char *str;
24 };
25
26 /*
27  * We define a set of "latch groups"; these are problems which are
28  * handled as a set.  The user answers once for a particular latch
29  * group.
30  */
31 #define PR_LATCH_MASK   0x0070  /* Latch mask */
32 #define PR_LATCH_BLOCK  0x0010  /* Latch for illegal blocks (pass 1) */
33 #define PR_LATCH_BBLOCK 0x0020  /* Latch for bad block inode blocks (pass 1) */
34 #define PR_LATCH_IBITMAP 0x0030 /* Latch for pass 5 inode bitmap proc. */
35 #define PR_LATCH_BBITMAP 0x0040 /* Latch for pass 5 inode bitmap proc. */
36 #define PR_LATCH_RELOC  0x0050  /* Latch for superblock relocate hint */
37 #define PR_LATCH_DBLOCK 0x0060  /* Latch for pass 1b dup block headers */
38
39 #define PR_LATCH(x)     ((((x) & PR_LATCH_MASK) >> 4) - 1)
40
41 /*
42  * Latch group descriptor flags
43  */
44 #define PRL_YES         0x0001  /* Answer yes */
45 #define PRL_NO          0x0002  /* Answer no */
46 #define PRL_LATCHED     0x0004  /* The latch group is latched */
47 #define PRL_SUPPRESS    0x0008  /* Suppress all latch group questions */
48
49 #define PRL_VARIABLE    0x000f  /* All the flags that need to be reset */
50
51 /*
52  * Pre-Pass 1 errors
53  */
54
55 /* Block bitmap not in group */
56 #define PR_0_BB_NOT_GROUP       0x000001
57
58 /* Inode bitmap not in group */
59 #define PR_0_IB_NOT_GROUP       0x000002
60
61 /* Inode table not in group */
62 #define PR_0_ITABLE_NOT_GROUP   0x000003
63
64 /* Superblock corrupt */
65 #define PR_0_SB_CORRUPT         0x000004
66
67 /* Filesystem size is wrong */
68 #define PR_0_FS_SIZE_WRONG      0x000005
69
70 /* Fragments not supported */
71 #define PR_0_NO_FRAGMENTS       0x000006
72
73 /* Bad blocks_per_group */
74 #define PR_0_BLOCKS_PER_GROUP   0x000007
75
76 /* Bad first_data_block */
77 #define PR_0_FIRST_DATA_BLOCK   0x000008
78
79 /* Adding UUID to filesystem */
80 #define PR_0_ADD_UUID           0x000009
81
82 /* Relocate hint */     
83 #define PR_0_RELOCATE_HINT      0x00000A
84
85 /* Miscellaneous superblock corruption */
86 #define PR_0_MISC_CORRUPT_SUPER 0x00000B
87         
88 /* Error determing physical device size of filesystem */
89 #define PR_0_GETSIZE_ERROR      0x00000C
90
91 /* Inode count in the superblock incorrect */
92 #define PR_0_INODE_COUNT_WRONG  0x00000D
93
94 /* The Hurd does not support the filetype feature */
95 #define PR_0_HURD_CLEAR_FILETYPE 0x00000E
96
97 /* Journal inode is invalid */
98 #define PR_0_JOURNAL_BAD_INODE  0x00000F
99
100 /* Superblock has a journal device (which we can't handle yet) */
101 #define PR_0_JOURNAL_UNSUPP_DEV 0x000010
102
103 /* Superblock has a bad journal device */
104 #define PR_0_JOURNAL_BAD_DEV    0x000011
105
106 /* Superblock has a journal UUID (which we can't handle yet) */
107 #define PR_0_JOURNAL_UNSUPP_UUID 0x000012
108
109 /* Superblock has a bad journal UUID */
110 #define PR_0_JOURNAL_BAD_UUID   0x000013
111
112 /* Journal has an unknown superblock type */
113 #define PR_0_JOURNAL_UNSUPP_SUPER 0x000014
114
115 /* Journal superblock is corrupt */
116 #define PR_0_JOURNAL_BAD_SUPER  0x000015
117
118 /* Journal superblock is corrupt */
119 #define PR_0_JOURNAL_HAS_JOURNAL 0x000016
120
121 /* Superblock has recovery flag set but no journal */
122 #define PR_0_JOURNAL_RECOVER_SET 0x000017
123
124 /* Warning message about leaving data in the journal */
125 #define PR_0_JOURNAL_RESET_JOURNAL 0x000018
126
127 /* Superblock recovery flag clear - journal needs to be reset */
128 #define PR_0_JOURNAL_RESET_PROMPT 0x000019
129
130 /* Filesystem revision is 0, but feature flags are set */
131 #define PR_0_FS_REV_LEVEL       0x00001A
132
133 /* Clearing orphan inode */
134 #define PR_0_ORPHAN_CLEAR_INODE                 0x000020
135         
136 /* Illegal block found in orphaned inode */
137 #define PR_0_ORPHAN_ILLEGAL_BLOCK_NUM           0x000021
138
139 /* Already cleared block found in orphaned inode */
140 #define PR_0_ORPHAN_ALREADY_CLEARED_BLOCK       0x000022
141         
142 /* Illegal orphan inode in superblock */
143 #define PR_0_ORPHAN_ILLEGAL_HEAD_INODE          0x000023
144
145 /* Illegal inode in orphaned inode list */
146 #define PR_0_ORPHAN_ILLEGAL_INODE               0x000024
147
148 /* Journal has unsupported read-only feature - abort */
149 #define PR_0_JOURNAL_UNSUPP_ROCOMPAT            0x000025
150
151 /* Journal has unsupported incompatible feature - abort */
152 #define PR_0_JOURNAL_UNSUPP_INCOMPAT            0x000026
153
154 /* Journal has unsupported feature - reset */
155 #define PR_0_JOURNAL_RESET_COMPAT               0x000027
156
157 /*
158  * Pass 1 errors
159  */
160
161 /* Pass 1: Checking inodes, blocks, and sizes */
162 #define PR_1_PASS_HEADER                0x010000
163
164 /* Root directory is not an inode */
165 #define PR_1_ROOT_NO_DIR                0x010001
166
167 /* Root directory has dtime set */
168 #define PR_1_ROOT_DTIME                 0x010002
169
170 /* Reserved inode has bad mode */
171 #define PR_1_RESERVED_BAD_MODE          0x010003
172
173 /* Deleted inode has zero dtime */
174 #define PR_1_ZERO_DTIME                 0x010004
175
176 /* Inode in use, but dtime set */
177 #define PR_1_SET_DTIME                  0x010005
178
179 /* Zero-length directory */
180 #define PR_1_ZERO_LENGTH_DIR            0x010006
181
182 /* Block bitmap conflicts with some other fs block */
183 #define PR_1_BB_CONFLICT                0x010007
184
185 /* Inode bitmap conflicts with some other fs block */
186 #define PR_1_IB_CONFLICT                0x010008
187
188 /* Inode table conflicts with some other fs block */
189 #define PR_1_ITABLE_CONFLICT            0x010009
190
191 /* Block bitmap is on a bad block */
192 #define PR_1_BB_BAD_BLOCK               0x01000A
193
194 /* Inode bitmap is on a bad block */
195 #define PR_1_IB_BAD_BLOCK               0x01000B
196
197 /* Inode has incorrect i_size */
198 #define PR_1_BAD_I_SIZE                 0x01000C
199
200 /* Inode has incorrect i_blocks */
201 #define PR_1_BAD_I_BLOCKS               0x01000D
202
203 /* Illegal block number in inode */
204 #define PR_1_ILLEGAL_BLOCK_NUM          0x01000E
205
206 /* Block number overlaps fs metadata */
207 #define PR_1_BLOCK_OVERLAPS_METADATA    0x01000F
208
209 /* Inode has illegal blocks (latch question) */
210 #define PR_1_INODE_BLOCK_LATCH          0x010010
211
212 /* Too many bad blocks in inode */
213 #define PR_1_TOO_MANY_BAD_BLOCKS        0x010011
214         
215 /* Illegal block number in bad block inode */
216 #define PR_1_BB_ILLEGAL_BLOCK_NUM       0x010012
217
218 /* Bad block inode has illegal blocks (latch question) */
219 #define PR_1_INODE_BBLOCK_LATCH         0x010013
220
221 /* Duplicate or bad blocks in use! */
222 #define PR_1_DUP_BLOCKS_PREENSTOP       0x010014
223         
224 /* Bad block used as bad block indirect block */          
225 #define PR_1_BBINODE_BAD_METABLOCK      0x010015
226
227 /* Inconsistency can't be fixed prompt */
228 #define PR_1_BBINODE_BAD_METABLOCK_PROMPT 0x010016
229         
230 /* Bad primary block */
231 #define PR_1_BAD_PRIMARY_BLOCK          0x010017
232                   
233 /* Bad primary block prompt */
234 #define PR_1_BAD_PRIMARY_BLOCK_PROMPT   0x010018
235
236 /* Bad primary superblock */
237 #define PR_1_BAD_PRIMARY_SUPERBLOCK     0x010019
238
239 /* Bad primary block group descriptors */
240 #define PR_1_BAD_PRIMARY_GROUP_DESCRIPTOR 0x01001A
241
242 /* Bad superblock in group */
243 #define PR_1_BAD_SUPERBLOCK             0x01001B
244
245 /* Bad block group descriptors in group */
246 #define PR_1_BAD_GROUP_DESCRIPTORS      0x01001C
247
248 /* Block claimed for no reason */         
249 #define PR_1_PROGERR_CLAIMED_BLOCK      0x01001D
250
251 /* Error allocating blocks for relocating metadata */
252 #define PR_1_RELOC_BLOCK_ALLOCATE       0x01001E
253                 
254 /* Error allocating block buffer during relocation process */
255 #define PR_1_RELOC_MEMORY_ALLOCATE      0x01001F
256                 
257 /* Relocating metadata group information from X to Y */ 
258 #define PR_1_RELOC_FROM_TO              0x010020
259                 
260 /* Relocating metatdata group information to X */
261 #define PR_1_RELOC_TO                   0x010021
262                 
263 /* Block read error during relocation process */
264 #define PR_1_RELOC_READ_ERR             0x010022
265                 
266 /* Block write error during relocation process */
267 #define PR_1_RELOC_WRITE_ERR            0x010023
268
269 /* Error allocating inode bitmap */
270 #define PR_1_ALLOCATE_IBITMAP_ERROR     0x010024
271
272 /* Error allocating block bitmap */
273 #define PR_1_ALLOCATE_BBITMAP_ERROR     0x010025
274
275 /* Error allocating icount structure */
276 #define PR_1_ALLOCATE_ICOUNT            0x010026
277         
278 /* Error allocating dbcount */
279 #define PR_1_ALLOCATE_DBCOUNT           0x010027
280
281 /* Error while scanning inodes */
282 #define PR_1_ISCAN_ERROR                0x010028
283
284 /* Error while iterating over blocks */
285 #define PR_1_BLOCK_ITERATE              0x010029
286
287 /* Error while storing inode count information */         
288 #define PR_1_ICOUNT_STORE               0x01002A
289
290 /* Error while storing directory block information */     
291 #define PR_1_ADD_DBLOCK                 0x01002B
292
293 /* Error while reading inode (for clearing) */
294 #define PR_1_READ_INODE                 0x01002C
295
296 /* Suppress messages prompt */
297 #define PR_1_SUPPRESS_MESSAGES          0x01002D
298
299 /* Filesystem contains large files, but has no such flag in sb */
300 #define PR_1_FEATURE_LARGE_FILES        0x01002E
301
302 /* Imagic flag set on an inode when filesystem doesn't support it */
303 #define PR_1_SET_IMAGIC                 0x01002F
304
305 /* Immutable flag set on a device or socket inode */
306 #define PR_1_SET_IMMUTABLE              0x010030
307
308 /* Compression flag set on a non-compressed filesystem */
309 #define PR_1_COMPR_SET                  0x010031
310
311 /* Non-zero size on on device, fifo or socket inode */
312 #define PR_1_SET_NONZSIZE               0x010032
313
314 /* Filesystem revision is 0, but feature flags are set */
315 #define PR_1_FS_REV_LEVEL               0x010033
316
317 /* Journal inode not in use, needs clearing */
318 #define PR_1_JOURNAL_INODE_NOT_CLEAR    0x010034
319
320 /* Journal inode has wrong mode */
321 #define PR_1_JOURNAL_BAD_MODE           0x010035
322         
323 /*
324  * Pass 1b errors
325  */
326
327 /* Pass 1B: Rescan for duplicate/bad blocks */
328 #define PR_1B_PASS_HEADER       0x011000
329
330 /* Duplicate/bad block(s) header */
331 #define PR_1B_DUP_BLOCK_HEADER  0x011001
332
333 /* Duplicate/bad block(s) in inode */
334 #define PR_1B_DUP_BLOCK         0x011002
335
336 /* Duplicate/bad block(s) end */
337 #define PR_1B_DUP_BLOCK_END     0x011003
338         
339 /* Error while scanning inodes */
340 #define PR_1B_ISCAN_ERROR       0x011004
341
342 /* Error allocating inode bitmap */
343 #define PR_1B_ALLOCATE_IBITMAP_ERROR 0x011005
344
345 /* Error while iterating over blocks */
346 #define PR_1B_BLOCK_ITERATE     0x0110006
347
348         
349 /* Pass 1C: Scan directories for inodes with dup blocks. */
350 #define PR_1C_PASS_HEADER       0x012000
351
352
353 /* Pass 1D: Reconciling duplicate blocks */
354 #define PR_1D_PASS_HEADER       0x013000
355
356 /* File has duplicate blocks */
357 #define PR_1D_DUP_FILE          0x013001
358
359 /* List of files sharing duplicate blocks */    
360 #define PR_1D_DUP_FILE_LIST     0x013002
361
362 /* File sharing blocks with filesystem metadata  */     
363 #define PR_1D_SHARE_METADATA    0x013003
364
365 /* Report of how many duplicate/bad inodes */   
366 #define PR_1D_NUM_DUP_INODES    0x013004
367
368 /* Duplicated blocks already reassigned or cloned. */
369 #define PR_1D_DUP_BLOCKS_DEALT  0x013005
370
371 /* Clone duplicate/bad blocks? */
372 #define PR_1D_CLONE_QUESTION    0x013006
373
374 /* Delete file? */
375 #define PR_1D_DELETE_QUESTION   0x013007
376
377 /* Couldn't clone file (error) */
378 #define PR_1D_CLONE_ERROR       0x013008
379                 
380 /*
381  * Pass 2 errors
382  */
383
384 /* Pass 2: Checking directory structure */
385 #define PR_2_PASS_HEADER        0x020000
386
387 /* Bad inode number for '.' */
388 #define PR_2_BAD_INODE_DOT      0x020001
389
390 /* Directory entry has bad inode number */
391 #define PR_2_BAD_INO            0x020002
392
393 /* Directory entry has deleted or unused inode */
394 #define PR_2_UNUSED_INODE       0x020003
395
396 /* Directry entry is link to '.' */
397 #define PR_2_LINK_DOT           0x020004
398
399 /* Directory entry points to inode now located in a bad block */
400 #define PR_2_BB_INODE           0x020005
401
402 /* Directory entry contains a link to a directory */
403 #define PR_2_LINK_DIR           0x020006
404
405 /* Directory entry contains a link to the root directry */
406 #define PR_2_LINK_ROOT          0x020007
407
408 /* Directory entry has illegal characters in its name */
409 #define PR_2_BAD_NAME           0x020008
410
411 /* Missing '.' in directory inode */      
412 #define PR_2_MISSING_DOT        0x020009
413
414 /* Missing '..' in directory inode */     
415 #define PR_2_MISSING_DOT_DOT    0x02000A
416
417 /* First entry in directory inode doesn't contain '.' */
418 #define PR_2_1ST_NOT_DOT        0x02000B
419
420 /* Second entry in directory inode doesn't contain '..' */
421 #define PR_2_2ND_NOT_DOT_DOT    0x02000C
422
423 /* i_faddr should be zero */
424 #define PR_2_FADDR_ZERO         0x02000D
425
426 /* i_file_acl should be zero */
427 #define PR_2_FILE_ACL_ZERO      0x02000E
428
429 /* i_dir_acl should be zero */
430 #define PR_2_DIR_ACL_ZERO       0x02000F
431
432 /* i_frag should be zero */
433 #define PR_2_FRAG_ZERO          0x020010
434
435 /* i_fsize should be zero */
436 #define PR_2_FSIZE_ZERO         0x020011
437                   
438 /* inode has bad mode */
439 #define PR_2_BAD_MODE           0x020012
440
441 /* directory corrupted */
442 #define PR_2_DIR_CORRUPTED      0x020013
443                   
444 /* filename too long */
445 #define PR_2_FILENAME_LONG      0x020014
446                   
447 /* Directory inode has a missing block (hole) */
448 #define PR_2_DIRECTORY_HOLE     0x020015
449
450 /* '.' is not NULL terminated */
451 #define PR_2_DOT_NULL_TERM      0x020016
452
453 /* '..' is not NULL terminated */
454 #define PR_2_DOT_DOT_NULL_TERM  0x020017
455
456 /* Illegal character device in inode */
457 #define PR_2_BAD_CHAR_DEV       0x020018
458
459 /* Illegal block device in inode */
460 #define PR_2_BAD_BLOCK_DEV      0x020019
461
462 /* Duplicate '.' entry */
463 #define PR_2_DUP_DOT            0x02001A
464
465 /* Duplicate '..' entry */
466 #define PR_2_DUP_DOT_DOT        0x02001B
467         
468 /* Internal error: couldn't find dir_info */
469 #define PR_2_NO_DIRINFO         0x02001C
470
471 /* Final rec_len is wrong */
472 #define PR_2_FINAL_RECLEN       0x02001D
473
474 /* Error allocating icount structure */
475 #define PR_2_ALLOCATE_ICOUNT    0x02001E
476
477 /* Error iterating over directory blocks */
478 #define PR_2_DBLIST_ITERATE     0x02001F
479
480 /* Error reading directory block */
481 #define PR_2_READ_DIRBLOCK      0x020020
482
483 /* Error writing directory block */
484 #define PR_2_WRITE_DIRBLOCK     0x020021
485
486 /* Error allocating new directory block */
487 #define PR_2_ALLOC_DIRBOCK      0x020022
488
489 /* Error deallocating inode */
490 #define PR_2_DEALLOC_INODE      0x020023
491
492 /* Directory entry for '.' is big.  Split? */
493 #define PR_2_SPLIT_DOT          0x020024
494
495 /* Illegal FIFO */
496 #define PR_2_BAD_FIFO           0x020025
497
498 /* Illegal socket */
499 #define PR_2_BAD_SOCKET         0x020026
500
501 /* Directory filetype not set */
502 #define PR_2_SET_FILETYPE       0x020027
503
504 /* Directory filetype incorrect */
505 #define PR_2_BAD_FILETYPE       0x020028
506
507 /* Directory filetype set when it shouldn't be */
508 #define PR_2_CLEAR_FILETYPE     0x020029
509
510 /* Directory filename can't be zero-length  */
511 #define PR_2_NULL_NAME          0x020030
512
513 /*
514  * Pass 3 errors
515  */
516
517 /* Pass 3: Checking directory connectivity */
518 #define PR_3_PASS_HEADER                0x030000
519
520 /* Root inode not allocated */
521 #define PR_3_NO_ROOT_INODE              0x030001
522
523 /* No room in lost+found */
524 #define PR_3_EXPAND_LF_DIR              0x030002
525
526 /* Unconnected directory inode */
527 #define PR_3_UNCONNECTED_DIR            0x030003
528
529 /* /lost+found not found */
530 #define PR_3_NO_LF_DIR                  0x030004
531
532 /* .. entry is incorrect */
533 #define PR_3_BAD_DOT_DOT                0x030005
534
535 /* Bad or non-existent /lost+found.  Cannot reconnect */
536 #define PR_3_NO_LPF                     0x030006
537
538 /* Could not expand /lost+found */
539 #define PR_3_CANT_EXPAND_LPF            0x030007
540
541 /* Could not reconnect inode */
542 #define PR_3_CANT_RECONNECT             0x030008
543
544 /* Error while trying to find /lost+found */
545 #define PR_3_ERR_FIND_LPF               0x030009
546
547 /* Error in ext2fs_new_block while creating /lost+found */
548 #define PR_3_ERR_LPF_NEW_BLOCK          0x03000A
549
550 /* Error in ext2fs_new_inode while creating /lost+found */
551 #define PR_3_ERR_LPF_NEW_INODE          0x03000B
552
553 /* Error in ext2fs_new_dir_block while creating /lost+found */    
554 #define PR_3_ERR_LPF_NEW_DIR_BLOCK      0x03000C
555                   
556 /* Error while writing directory block for /lost+found */
557 #define PR_3_ERR_LPF_WRITE_BLOCK        0x03000D
558
559 /* Error while adjusting inode count */
560 #define PR_3_ADJUST_INODE               0x03000E
561
562 /* Couldn't fix parent directory -- error */
563 #define PR_3_FIX_PARENT_ERR             0x03000F
564
565 /* Couldn't fix parent directory -- couldn't find it */   
566 #define PR_3_FIX_PARENT_NOFIND          0x030010
567         
568 /* Error allocating inode bitmap */
569 #define PR_3_ALLOCATE_IBITMAP_ERROR     0x030011
570                   
571 /* Error creating root directory */
572 #define PR_3_CREATE_ROOT_ERROR          0x030012
573
574 /* Error creating lost and found directory */
575 #define PR_3_CREATE_LPF_ERROR           0x030013
576
577 /* Root inode is not directory; aborting */
578 #define PR_3_ROOT_NOT_DIR_ABORT         0x030014
579
580 /* Cannot proceed without a root inode. */
581 #define PR_3_NO_ROOT_INODE_ABORT        0x030015
582
583 /* Internal error: couldn't find dir_info */
584 #define PR_3_NO_DIRINFO                 0x030016
585
586 /* Lost+found is not a directory */
587 #define PR_3_LPF_NOTDIR                 0x030017
588
589 /*
590  * Pass 4 errors
591  */
592
593 /* Pass 4: Checking reference counts */
594 #define PR_4_PASS_HEADER        0x040000
595
596 /* Unattached zero-length inode */
597 #define PR_4_ZERO_LEN_INODE     0x040001
598
599 /* Unattached inode */
600 #define PR_4_UNATTACHED_INODE   0x040002
601
602 /* Inode ref count wrong */
603 #define PR_4_BAD_REF_COUNT      0x040003
604
605 /* Inconsistent inode count information cached */
606 #define PR_4_INCONSISTENT_COUNT 0x040004
607
608 /*
609  * Pass 5 errors
610  */
611
612 /* Pass 5: Checking group summary information */
613 #define PR_5_PASS_HEADER                0x050000
614         
615 /* Padding at end of inode bitmap is not set. */
616 #define PR_5_INODE_BMAP_PADDING         0x050001
617
618 /* Padding at end of block bitmap is not set. */
619 #define PR_5_BLOCK_BMAP_PADDING         0x050002
620
621 /* Block bitmap differences header */
622 #define PR_5_BLOCK_BITMAP_HEADER        0x050003
623
624 /* Block not used, but marked in bitmap */
625 #define PR_5_UNUSED_BLOCK               0x050004
626           
627 /* Block used, but not marked used in bitmap */
628 #define PR_5_BLOCK_USED                 0x050005
629
630 /* Block bitmap differences end */        
631 #define PR_5_BLOCK_BITMAP_END           0x050006
632
633 /* Inode bitmap differences header */
634 #define PR_5_INODE_BITMAP_HEADER        0x050007
635
636 /* Inode not used, but marked in bitmap */
637 #define PR_5_UNUSED_INODE               0x050008
638           
639 /* Inode used, but not marked used in bitmap */
640 #define PR_5_INODE_USED                 0x050009
641
642 /* Inode bitmap differences end */        
643 #define PR_5_INODE_BITMAP_END           0x05000A
644
645 /* Free inodes count for group wrong */
646 #define PR_5_FREE_INODE_COUNT_GROUP     0x05000B
647
648 /* Directories count for group wrong */
649 #define PR_5_FREE_DIR_COUNT_GROUP       0x05000C
650
651 /* Free inodes count wrong */
652 #define PR_5_FREE_INODE_COUNT   0x05000D
653
654 /* Free blocks count for group wrong */
655 #define PR_5_FREE_BLOCK_COUNT_GROUP     0x05000E
656
657 /* Free blocks count wrong */
658 #define PR_5_FREE_BLOCK_COUNT           0x05000F
659
660 /* Programming error: bitmap endpoints don't match */
661 #define PR_5_BMAP_ENDPOINTS             0x050010
662
663 /* Internal error: fudging end of bitmap */
664 #define PR_5_FUDGE_BITMAP_ERROR         0x050011
665
666 /* Error copying in replacement inode bitmap */
667 #define PR_5_COPY_IBITMAP_ERROR         0x050012
668
669 /* Error copying in replacement block bitmap */
670 #define PR_5_COPY_BBITMAP_ERROR         0x050013
671
672 /*
673  * Function declarations
674  */
675 int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx);
676 int end_problem_latch(e2fsck_t ctx, int mask);
677 int set_latch_flags(int mask, int setflags, int clearflags);
678 int get_latch_flags(int mask, int *value);
679 void clear_problem_context(struct problem_context *ctx);
680
681 /* message.c */
682 void print_e2fsck_message(e2fsck_t ctx, const char *msg,
683                           struct problem_context *pctx, int first);
684