|
20 | 20 | #ifndef __BTRFS_CHECK_MODE_LOWMEM_H__
|
21 | 21 | #define __BTRFS_CHECK_MODE_LOWMEM_H__
|
22 | 22 |
|
23 |
| -#define ROOT_DIR_ERROR (1<<1) /* bad ROOT_DIR */ |
24 |
| -#define DIR_ITEM_MISSING (1<<2) /* DIR_ITEM not found */ |
25 |
| -#define DIR_ITEM_MISMATCH (1<<3) /* DIR_ITEM found but not match */ |
26 |
| -#define INODE_REF_MISSING (1<<4) /* INODE_REF/INODE_EXTREF not found */ |
27 |
| -#define INODE_ITEM_MISSING (1<<5) /* INODE_ITEM not found */ |
28 |
| -#define INODE_ITEM_MISMATCH (1<<6) /* INODE_ITEM found but not match */ |
29 |
| -#define FILE_EXTENT_ERROR (1<<7) /* bad FILE_EXTENT */ |
30 |
| -#define ODD_CSUM_ITEM (1<<8) /* CSUM_ITEM error */ |
31 |
| -#define CSUM_ITEM_MISSING (1<<9) /* CSUM_ITEM not found */ |
32 |
| -#define LINK_COUNT_ERROR (1<<10) /* INODE_ITEM nlink count error */ |
33 |
| -#define NBYTES_ERROR (1<<11) /* INODE_ITEM nbytes count error */ |
34 |
| -#define ISIZE_ERROR (1<<12) /* INODE_ITEM size count error */ |
35 |
| -#define ORPHAN_ITEM (1<<13) /* INODE_ITEM no reference */ |
36 |
| -#define NO_INODE_ITEM (1<<14) /* no inode_item */ |
37 |
| -#define LAST_ITEM (1<<15) /* Complete this tree traversal */ |
38 |
| -#define ROOT_REF_MISSING (1<<16) /* ROOT_REF not found */ |
39 |
| -#define ROOT_REF_MISMATCH (1<<17) /* ROOT_REF found but not match */ |
40 |
| -#define DIR_INDEX_MISSING (1<<18) /* INODE_INDEX not found */ |
41 |
| -#define DIR_INDEX_MISMATCH (1<<19) /* INODE_INDEX found but not match */ |
42 |
| -#define DIR_COUNT_AGAIN (1<<20) /* DIR isize should be recalculated */ |
43 |
| -#define BG_ACCOUNTING_ERROR (1<<21) /* Block group accounting error */ |
44 |
| -#define FATAL_ERROR (1<<22) /* Fatal bit for errno */ |
45 |
| -#define INODE_FLAGS_ERROR (1<<23) /* Invalid inode flags */ |
46 |
| -#define DIR_ITEM_HASH_MISMATCH (1<<24) /* Dir item hash mismatch */ |
47 |
| -#define INODE_MODE_ERROR (1<<25) /* Bad inode mode */ |
48 |
| -#define INVALID_GENERATION (1<<26) /* Generation is too new */ |
49 |
| -#define SUPER_BYTES_USED_ERROR (1<<27) /* Super bytes_used is invalid */ |
| 23 | +#define ROOT_DIR_ERROR (1U << 1) /* bad ROOT_DIR */ |
| 24 | +#define DIR_ITEM_MISSING (1U << 2) /* DIR_ITEM not found */ |
| 25 | +#define DIR_ITEM_MISMATCH (1U << 3) /* DIR_ITEM found but not match */ |
| 26 | +#define INODE_REF_MISSING (1U << 4) /* INODE_REF/INODE_EXTREF not found */ |
| 27 | +#define INODE_ITEM_MISSING (1U << 5) /* INODE_ITEM not found */ |
| 28 | +#define INODE_ITEM_MISMATCH (1U << 6) /* INODE_ITEM found but not match */ |
| 29 | +#define FILE_EXTENT_ERROR (1U << 7) /* bad FILE_EXTENT */ |
| 30 | +#define ODD_CSUM_ITEM (1U << 8) /* CSUM_ITEM error */ |
| 31 | +#define CSUM_ITEM_MISSING (1U << 9) /* CSUM_ITEM not found */ |
| 32 | +#define LINK_COUNT_ERROR (1U << 10) /* INODE_ITEM nlink count error */ |
| 33 | +#define NBYTES_ERROR (1U << 11) /* INODE_ITEM nbytes count error */ |
| 34 | +#define ISIZE_ERROR (1U << 12) /* INODE_ITEM size count error */ |
| 35 | +#define ORPHAN_ITEM (1U << 13) /* INODE_ITEM no reference */ |
| 36 | +#define NO_INODE_ITEM (1U << 14) /* no inode_item */ |
| 37 | +#define LAST_ITEM (1U << 15) /* Complete this tree traversal */ |
| 38 | +#define ROOT_REF_MISSING (1U << 16) /* ROOT_REF not found */ |
| 39 | +#define ROOT_REF_MISMATCH (1U << 17) /* ROOT_REF found but not match */ |
| 40 | +#define DIR_INDEX_MISSING (1U << 18) /* INODE_INDEX not found */ |
| 41 | +#define DIR_INDEX_MISMATCH (1U << 19) /* INODE_INDEX found but not match */ |
| 42 | +#define DIR_COUNT_AGAIN (1U << 20) /* DIR isize should be recalculated */ |
| 43 | +#define BG_ACCOUNTING_ERROR (1U << 21) /* Block group accounting error */ |
| 44 | +#define FATAL_ERROR (1U << 22) /* Fatal bit for errno */ |
| 45 | +#define INODE_FLAGS_ERROR (1U << 23) /* Invalid inode flags */ |
| 46 | +#define DIR_ITEM_HASH_MISMATCH (1U << 24) /* Dir item hash mismatch */ |
| 47 | +#define INODE_MODE_ERROR (1U << 25) /* Bad inode mode */ |
| 48 | +#define INVALID_GENERATION (1U << 26) /* Generation is too new */ |
| 49 | +#define SUPER_BYTES_USED_ERROR (1U << 27) /* Super bytes_used is invalid */ |
50 | 50 |
|
51 | 51 | /*
|
52 | 52 | * Error bit for low memory mode check.
|
53 | 53 | *
|
54 | 54 | * Currently no caller cares about it yet. Just internal use for error
|
55 | 55 | * classification.
|
56 | 56 | */
|
57 |
| -#define BACKREF_MISSING (1 << 0) /* Backref missing in extent tree */ |
58 |
| -#define BACKREF_MISMATCH (1 << 1) /* Backref exists but does not match */ |
59 |
| -#define BYTES_UNALIGNED (1 << 2) /* Some bytes are not aligned */ |
60 |
| -#define REFERENCER_MISSING (1 << 3) /* Referencer not found */ |
61 |
| -#define REFERENCER_MISMATCH (1 << 4) /* Referencer found but does not match */ |
62 |
| -#define CROSSING_STRIPE_BOUNDARY (1 << 4) /* For kernel scrub workaround */ |
63 |
| -#define ITEM_SIZE_MISMATCH (1 << 5) /* Bad item size */ |
64 |
| -#define UNKNOWN_TYPE (1 << 6) /* Unknown type */ |
65 |
| -#define ACCOUNTING_MISMATCH (1 << 7) /* Used space accounting error */ |
66 |
| -#define CHUNK_TYPE_MISMATCH (1 << 8) |
67 |
| -#define BACKREF_OUT_OF_ORDER (1 << 9) |
| 57 | +#define BACKREF_MISSING (1U << 0) /* Backref missing in extent tree */ |
| 58 | +#define BACKREF_MISMATCH (1U << 1) /* Backref exists but does not match */ |
| 59 | +#define BYTES_UNALIGNED (1U << 2) /* Some bytes are not aligned */ |
| 60 | +#define REFERENCER_MISSING (1U << 3) /* Referencer not found */ |
| 61 | +#define REFERENCER_MISMATCH (1U << 4) /* Referencer found but does not match */ |
| 62 | +#define CROSSING_STRIPE_BOUNDARY (1U << 4) /* For kernel scrub workaround */ |
| 63 | +#define ITEM_SIZE_MISMATCH (1U << 5) /* Bad item size */ |
| 64 | +#define UNKNOWN_TYPE (1U << 6) /* Unknown type */ |
| 65 | +#define ACCOUNTING_MISMATCH (1U << 7) /* Used space accounting error */ |
| 66 | +#define CHUNK_TYPE_MISMATCH (1U << 8) /* Extent type and chunk type don't match */ |
| 67 | +#define BACKREF_OUT_OF_ORDER (1U << 9) /* Inline backrefs out of order */ |
68 | 68 |
|
69 | 69 | int check_fs_roots_lowmem(void);
|
70 | 70 | int check_chunks_and_extents_lowmem(void);
|
|
0 commit comments