Whamcloud - gitweb
Merge branch 'maint' into next
authorTheodore Ts'o <tytso@mit.edu>
Mon, 24 Dec 2012 15:50:20 +0000 (10:50 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 24 Dec 2012 15:50:20 +0000 (10:50 -0500)
Conflicts:
e2fsck/problem.c
e2fsck/problem.h

1  2 
configure.in
debugfs/debugfs.c
e2fsck/pass1.c
e2fsck/problem.c
e2fsck/problem.h
lib/ext2fs/Makefile.in
lib/ext2fs/ext2fs.h
lib/ext2fs/extent.c

diff --cc configure.in
Simple merge
Simple merge
diff --cc e2fsck/pass1.c
@@@ -1899,19 -1796,8 +1899,19 @@@ static void scan_extent_node(e2fsck_t c
                         ext2fs_blocks_count(ctx->fs->super))
                        problem = PR_1_EXTENT_ENDS_BEYOND;
  
 +              /* Corrupt but passes checks?  Ask to fix checksum. */
 +              if (failed_csum) {
 +                      pctx->blk = extent.e_pblk;
 +                      pctx->blk2 = extent.e_lblk;
 +                      pctx->num = extent.e_len;
 +                      problem = 0;
 +                      if (fix_problem(ctx, PR_1_EXTENT_ONLY_CSUM_INVALID,
 +                                      pctx))
 +                              ext2fs_extent_replace(ehandle, 0, &extent);
 +              }
 +
                if (problem) {
              report_problem:
+ report_problem:
                        pctx->blk = extent.e_pblk;
                        pctx->blk2 = extent.e_lblk;
                        pctx->num = extent.e_len;
@@@ -960,46 -946,14 +960,54 @@@ static struct e2fsck_problem problem_ta
          N_("@i %i has zero length extent\n\t(@n logical @b %c, physical @b %b)\n"),
          PROMPT_CLEAR, 0 },
  
 +      /* inode checksum does not match inode */
 +      { PR_1_INODE_CSUM_INVALID,
 +        N_("@i %i checksum does not match @i.  "),
 +        PROMPT_CLEAR, PR_PREEN_OK },
 +
 +      /* inode passes checks, but checksum does not match inode */
 +      { PR_1_INODE_ONLY_CSUM_INVALID,
 +        N_("@i %i passes checks, but checksum does not match @i.  "),
 +        PROMPT_FIX, PR_PREEN_OK },
 +
 +      /* Inode extent block checksum does not match extent */
 +      { PR_1_EXTENT_CSUM_INVALID,
 +        N_("@i %i extent block checksum does not match extent\n\t(logical @b "
 +           "%c, @n physical @b %b, len %N)\n"),
 +        PROMPT_CLEAR, 0 },
 +
 +      /*
 +       * Inode extent block passes checks, but checksum does not match
 +       * extent
 +       */
 +      { 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"),
 +        PROMPT_FIX, 0 },
 +
 +      /* Extended attribute block checksum for inode does not match. */
 +      { PR_1_EA_BLOCK_CSUM_INVALID,
 +        N_("Extended attribute @a @b %b checksum for @i %i does not "
 +           "match.  "),
 +        PROMPT_CLEAR, 0 },
 +
 +      /*
 +       * Extended attribute block passes checks, but checksum for inode does
 +       * not match.
 +       */
 +      { PR_1_EA_BLOCK_ONLY_CSUM_INVALID,
 +        N_("Extended attribute @a @b %b passes checks, but checksum for "
 +           "@i %i does not match.  "),
 +        PROMPT_FIX, 0 },
 +
+       /*
+        * Interior extent node logical offset doesn't match first node below it
+        */
+       { PR_1_EXTENT_INDEX_START_INVALID,
+         N_("Interior @x node level %N of @i %i:\n"
+            "Logical start %b does not match logical start %c at next level.  "),
+         PROMPT_FIX, 0 },
        /* Pass 1b errors */
  
        /* Pass 1B: Rescan for duplicate/bad blocks */
@@@ -568,24 -558,8 +568,26 @@@ struct problem_context 
  /* Extent has zero length */
  #define PR_1_EXTENT_LENGTH_ZERO               0x010066
  
 +/* inode checksum does not match inode */
 +#define PR_1_INODE_CSUM_INVALID                0x010067
 +
 +/* inode passes checks, but checksum does not match inode */
 +#define PR_1_INODE_ONLY_CSUM_INVALID   0x010068
 +
 +/* extent block checksum does not match extent block */
 +#define PR_1_EXTENT_CSUM_INVALID       0x010069
 +
 +/* extent block passes checks, but checksum does not match extent block */
 +#define PR_1_EXTENT_ONLY_CSUM_INVALID  0x01006A
 +
 +/* ea block checksum invalid */
 +#define PR_1_EA_BLOCK_CSUM_INVALID     0x01006B
 +
 +/* ea block passes checks, but checksum invalid */
 +#define PR_1_EA_BLOCK_ONLY_CSUM_INVALID        0x01006C
 +
+ /* Index start doesn't match start of next extent down */
+ #define PR_1_EXTENT_INDEX_START_INVALID       0x01006D
  
  /*
   * Pass 1b errors
Simple merge
Simple merge
Simple merge