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