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