Whamcloud - gitweb
debugfs.8, e2fsck.8: clarify man pages these programs can operate on files
[tools/e2fsprogs.git] / e2fsck / problem.c
index 4245244..ff91abd 100644 (file)
@@ -99,6 +99,9 @@ static const char *preen_msg[] = {
        "",                     /* 20 */
 };
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+
 static struct e2fsck_problem problem_table[] = {
 
        /* Pre-Pass 1 errors */
@@ -126,7 +129,7 @@ static struct e2fsck_problem problem_table[] = {
          "    e2fsck -b 8193 <@v>\n"
          " or\n"
          "    e2fsck -b 32768 <@v>\n\n"),
-         PROMPT_NONE, PR_FATAL },
+         PROMPT_NONE, 0 },
 
        /* Filesystem size is wrong */
        { PR_0_FS_SIZE_WRONG,
@@ -386,14 +389,14 @@ static struct e2fsck_problem problem_table[] = {
        /* Last mount time is in the future (fudged) */
        { PR_0_FUTURE_SB_LAST_MOUNT_FUDGED,
          N_("@S last mount time is in the future.\n\t(by less than a day, "
-            "probably due to the hardware clock being incorrectly set)  "),
-         PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+            "probably due to the hardware clock being incorrectly set)\n"),
+         PROMPT_NONE, PR_PREEN_OK | PR_NO_OK },
 
        /* Last write time is in the future (fudged) */
        { PR_0_FUTURE_SB_LAST_WRITE_FUDGED,
          N_("@S last write time is in the future.\n\t(by less than a day, "
-            "probably due to the hardware clock being incorrectly set).  "),
-         PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+            "probably due to the hardware clock being incorrectly set)\n"),
+         PROMPT_NONE, PR_PREEN_OK | PR_NO_OK },
 
        /* Block group checksum (latch question) is invalid. */
        { PR_0_GDT_CSUM_LATCH,
@@ -454,6 +457,26 @@ static struct e2fsck_problem problem_table[] = {
          N_("@S 64bit filesystems needs extents to access the whole disk.  "),
          PROMPT_FIX, PR_PREEN_OK | PR_NO_OK},
 
+       /* The first_meta_bg is too big */
+       { PR_0_FIRST_META_BG_TOO_BIG,
+         N_("First_meta_bg is too big.  (%N, max value %g).  "),
+         PROMPT_CLEAR, 0 },
+
+       /* External journal has corrupt superblock */
+       { PR_0_EXT_JOURNAL_SUPER_CSUM_INVALID,
+         N_("External @j @S checksum does not match @S.  "),
+         PROMPT_FIX, PR_PREEN_OK },
+
+       /* metadata_csum_seed means nothing without metadata_csum */
+       { PR_0_CSUM_SEED_WITHOUT_META_CSUM,
+         N_("@S metadata_csum_seed is not necessary without metadata_csum."),
+         PROMPT_FIX, PR_PREEN_OK | PR_NO_OK},
+
+       /* Error initializing quota context */
+       { PR_0_QUOTA_INIT_CTX,
+         N_("Error initializing quota context in support library: %m\n"),
+         PROMPT_NULL, PR_FATAL },
+
        /* Pass 1 errors */
 
        /* Pass 1: Checking inodes, blocks, and sizes */
@@ -701,11 +724,6 @@ static struct e2fsck_problem problem_table[] = {
             "or append-only flag set.  "),
          PROMPT_CLEAR, PR_PREEN_OK | PR_PREEN_NO | PR_NO_OK },
 
-       /* Compression flag set on an inode when filesystem doesn't support it */
-       { PR_1_COMPR_SET,
-         N_("@i %i has @cion flag set on @f without @cion support.  "),
-         PROMPT_CLEAR, 0 },
-
        /* Non-zero size for device, fifo or socket inode */
        { PR_1_SET_NONZSIZE,
          N_("Special (@v/socket/fifo) @i %i has non-zero size.  "),
@@ -774,7 +792,7 @@ static struct e2fsck_problem problem_table[] = {
 
        /* Error allocating EA region allocation structure */
        { PR_1_EA_ALLOC_REGION_ABORT,
-         N_("@A @a @b %b.  "),
+         N_("@A @a region allocation structure.  "),
          PROMPT_NONE, PR_FATAL},
 
        /* Error EA allocation collision */
@@ -988,7 +1006,7 @@ static struct e2fsck_problem problem_table[] = {
         */
        { PR_1_EXTENT_ONLY_CSUM_INVALID,
          N_("@i %i extent block passes checks, but checksum does not match "
-            "extent\n\t(logical @b %c, @n physical @b %b, len %N)\n"),
+            "extent\n\t(logical @b %c, physical @b %b, len %N)\n"),
          PROMPT_FIX, 0 },
 
        /*
@@ -1076,6 +1094,46 @@ static struct e2fsck_problem problem_table[] = {
          N_("@i %i has inline data and @x flags set but i_block contains junk.\n"),
          PROMPT_CLEAR_INODE, 0 },
 
+       /* Bad block list says the bad block list inode is bad */
+       { PR_1_BADBLOCKS_IN_BADBLOCKS,
+         N_("Bad block list says the bad block list @i is bad.  "),
+         PROMPT_CLEAR_INODE, 0 },
+
+       /* Error allocating extent region allocation structure */
+       { PR_1_EXTENT_ALLOC_REGION_ABORT,
+         N_("@A @x region allocation structure.  "),
+         PROMPT_NONE, PR_FATAL},
+
+       /* Inode has a duplicate extent mapping */
+       { PR_1_EXTENT_COLLISION,
+         N_("@i %i has a duplicate @x mapping\n\t(logical @b %c, @n physical @b %b, len %N)\n"),
+         PROMPT_CLEAR, 0 },
+
+       /* Error allocating memory for encrypted directory list */
+       { PR_1_ALLOCATE_ENCRYPTED_DIRLIST,
+         N_("@A memory for encrypted @d list\n"),
+         PROMPT_NONE, PR_FATAL },
+
+       /* Inode extent tree could be more shallow */
+       { PR_1_EXTENT_BAD_MAX_DEPTH,
+         N_("@i %i @x tree could be more shallow (%b; could be <= %c)\n"),
+         PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK },
+
+       /* Inode extent tree could be more shallow */
+       { PR_1_NO_BIGALLOC_BLOCKMAP_FILES,
+         N_("@i %i on bigalloc @f cannot be @b mapped.  "),
+         PROMPT_FIX, 0 },
+
+       /* Inode has corrupt extent header */
+       { PR_1_MISSING_EXTENT_HEADER,
+         N_("@i %i has corrupt @x header.  "),
+         PROMPT_CLEAR_INODE, 0 },
+
+       /* Timestamp(s) on inode beyond 2310-04-04 are likely pre-1970. */
+       { PR_1_EA_TIME_OUT_OF_RANGE,
+         N_("Timestamp(s) on @i %i beyond 2310-04-04 are likely pre-1970.\n"),
+         PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+
        /* Pass 1b errors */
 
        /* Pass 1B: Rescan for duplicate/bad blocks */
@@ -1173,6 +1231,48 @@ static struct e2fsck_problem problem_table[] = {
        { PR_1D_CLONE_ERROR,
          N_("Couldn't clone file: %m\n"), PROMPT_NONE, 0 },
 
+       /* Pass 1E Extent tree optimization     */
+
+       /* Pass 1E: Optimizing extent trees */
+       { PR_1E_PASS_HEADER,
+         N_("Pass 1E: Optimizing @x trees\n"),
+         PROMPT_NONE, PR_PREEN_NOMSG },
+
+       /* Failed to optimize extent tree */
+       { PR_1E_OPTIMIZE_EXT_ERR,
+         N_("Failed to optimize @x tree %p (%i): %m\n"),
+         PROMPT_NONE, 0 },
+
+       /* Optimizing extent trees */
+       { PR_1E_OPTIMIZE_EXT_HEADER,
+         N_("Optimizing @x trees: "),
+         PROMPT_NONE, PR_MSG_ONLY },
+
+       /* Rebuilding extent tree %d */
+       { PR_1E_OPTIMIZE_EXT,
+         " %i",
+         PROMPT_NONE, PR_LATCH_OPTIMIZE_EXT | PR_PREEN_NOHDR},
+
+       /* Rebuilding extent tree end */
+       { PR_1E_OPTIMIZE_EXT_END,
+         "\n",
+         PROMPT_NONE, PR_PREEN_NOHDR },
+
+       /* Internal error: extent tree depth too large */
+       { PR_1E_MAX_EXTENT_TREE_DEPTH,
+         N_("Internal error: max extent tree depth too large (%b; expected=%c).\n"),
+         PROMPT_NONE, PR_FATAL },
+
+       /* Inode extent tree could be shorter */
+       { PR_1E_CAN_COLLAPSE_EXTENT_TREE,
+         N_("@i %i @x tree (at level %b) could be shorter.  "),
+         PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK },
+
+       /* Inode extent tree could be narrower */
+       { PR_1E_CAN_NARROW_EXTENT_TREE,
+         N_("@i %i @x tree (at level %b) could be narrower.  "),
+         PROMPT_FIX, PR_NO_OK | PR_PREEN_NO | PR_PREEN_OK },
+
        /* Pass 2 errors */
 
        /* Pass 2: Checking directory structure */
@@ -1520,9 +1620,24 @@ static struct e2fsck_problem problem_table[] = {
 
        /* leaf node passes checks but fails checksum */
        { PR_2_LEAF_NODE_ONLY_CSUM_INVALID,
-         N_("@d @i %i, %B, offset %N: @d passes checks but fails checksum.\n"),
+         N_("@d @i %i, %B: @d passes checks but fails checksum.\n"),
          PROMPT_FIX, PR_PREEN_OK },
 
+       /* inline directory inode size must be a multiple of 4 */
+       { PR_2_BAD_INLINE_DIR_SIZE,
+         N_("Inline @d @i %i size (%N) must be a multiple of 4.\n"),
+         PROMPT_FIX, 0 },
+
+       /* fixing size of inline directory inode failed */
+       { PR_2_FIX_INLINE_DIR_FAILED,
+         N_("Fixing size of inline @d @i %i failed.\n"),
+         PROMPT_TRUNCATE, 0 },
+
+       /* Encrypted directory entry is too short */
+       { PR_2_BAD_ENCRYPTED_NAME,
+         N_("Encrypted @E is too short.\n"),
+         PROMPT_CLEAR, 0 },
+
        /* Pass 3 errors */
 
        /* Pass 3: Checking directory connectivity */
@@ -1660,6 +1775,11 @@ static struct e2fsck_problem problem_table[] = {
          N_("Insufficient space to recover lost files!\nMove data off the @f and re-run e2fsck.\n\n"),
          PROMPT_NONE, 0 },
 
+       /* Lost+found is encrypted */
+       { PR_3_LPF_ENCRYPTED,
+         N_("/@l is encrypted\n"),
+         PROMPT_CLEAR, 0 },
+
        /* Pass 3A Directory Optimization       */
 
        /* Pass 3A: Optimizing directories */
@@ -1876,6 +1996,26 @@ static struct e2fsck_problem problem_table[] = {
          N_("Update quota info for quota type %N"),
          PROMPT_NULL, PR_PREEN_OK },
 
+       /* Error setting block group checksum info */
+       { PR_6_SET_BG_CHECKSUM,
+         N_("Error setting @b @g checksum info: %m\n"),
+         PROMPT_NULL, PR_FATAL },
+
+       /* Error writing file system info */
+       { PR_6_FLUSH_FILESYSTEM,
+         N_("Error writing file system info: %m\n"),
+         PROMPT_NULL, PR_FATAL },
+
+       /* Error flushing writes to storage device */
+       { PR_6_IO_FLUSH,
+         N_("Error flushing writes to storage device: %m\n"),
+         PROMPT_NULL, PR_FATAL },
+
+       /* Error writing quota information */
+       { PR_6_WRITE_QUOTAS,
+         N_("Error writing quota info for quota type %N: %m\n"),
+         PROMPT_NULL, 0 },
+
        { 0 }
 };
 
@@ -1896,8 +2036,10 @@ static struct latch_descr pr_latch_info[] = {
        { PR_LATCH_TOOBIG, PR_1_INODE_TOOBIG, 0 },
        { PR_LATCH_OPTIMIZE_DIR, PR_3A_OPTIMIZE_DIR_HEADER, PR_3A_OPTIMIZE_DIR_END },
        { PR_LATCH_BG_CHECKSUM, PR_0_GDT_CSUM_LATCH, 0 },
+       { PR_LATCH_OPTIMIZE_EXT, PR_1E_OPTIMIZE_EXT_HEADER, PR_1E_OPTIMIZE_EXT_END },
        { -1, 0, 0 },
 };
+#pragma GCC diagnostic pop
 
 static struct e2fsck_problem *find_problem(problem_t code)
 {