All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>, forrestl@synology.com
Subject: Re: [PATCH 1/3] e2fsck: fix incorrect interior node logical start values
Date: Fri, 21 Dec 2012 14:47:58 -0600	[thread overview]
Message-ID: <50D4CAFE.5010606@redhat.com> (raw)
In-Reply-To: <1356047023-28367-1-git-send-email-tytso@mit.edu>

On 12/20/12 5:43 PM, Theodore Ts'o wrote:
> From: Eric Sandeen <sandeen@redhat.com>
> 
> An index node's logical start (ei_block) should
> match the logical start of the first node (index
> or leaf) below it.  If we find a node whose start
> does not match its parent, fix all of its parents
> accordingly.
> 
> If it finds such a problem, we'll see:
> 
> Pass 1: Checking inodes, blocks, and sizes
> Interior extent node level 0 of inode 274258:
> Logical start 3666 does not match logical start 4093 at next level.  Fix<y>?

Hm, this situation might still need more work in some cases.

Looking at a "bad" extent tree reported to me:

 1/ 2  25/ 29 57524 - 59011 15538183              1488
 2/ 2   1/  2 57524 - 59011 15556788 - 15558275   1488
 2/ 2   2/  2 59012 - 65535 15558276 - 15564799   6524 Uninit <- what's this extent?

 1/ 2  26/ 29 59012 - 60671 15538184              1660
 2/ 2   1/  2 59012 - 60671    25638 -    27297   1660
 2/ 2   2/  2 60672 - 60689    27298 -    27315     18 Uninit

 1/ 2  27/ 29 60672 - 61023 15538185               352 <- bad logical start
 2/ 2   1/ 19 60690 - 60690    27316 -    27316      1 Uninit


e2fsck with my patch finds & fixes the parent issues:

Pass 1: Checking inodes, blocks, and sizes
Interior extent node level 1 of inode 8126473:
Logical start 60672 does not match logical start 60690 at next level.  Fix? yes

Interior extent node level 1 of inode 8126473:
Logical start 63157 does not match logical start 63159 at next level.  Fix? yes

and after that the extents look like:

 1/ 2  25/ 29 57524 - 59011 15538183              1488
 2/ 2   1/  2 57524 - 59011 15556788 - 15558275   1488
 2/ 2   2/  2 59012 - 65535 15558276 - 15564799   6524 Uninit <--- ???

 1/ 2  26/ 29 59012 - 60689 15538184              1678
 2/ 2   1/  2 59012 - 60671    25638 -    27297   1660
 2/ 2   2/  2 60672 - 60689    27298 -    27315     18 Uninit

 1/ 2  27/ 29 60690 - 61023 15538185               334 <-- only this got fixed
 2/ 2   1/ 19 60690 - 60690    27316 -    27316      1 Uninit

but in this case, it seems that the length of the range covered by the previous interior nodes is still incorrect.  :(

-Eric

  parent reply	other threads:[~2012-12-21 20:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-13 15:32 [PATCH] ext4: fix extent tree corruption that incurred by hole punch [V2] Forrest Liu
2012-12-13 16:04 ` Forrest Liu
2012-12-13 16:17   ` Forrest Liu
2012-12-14 17:18   ` Eric Sandeen
2012-12-17  4:25 ` Ashish Sangwan
2012-12-20  5:39 ` Theodore Ts'o
2012-12-20 15:11   ` Forrest Liu
2012-12-20 23:42     ` Theodore Ts'o
2012-12-20 23:43       ` [PATCH 1/3] e2fsck: fix incorrect interior node logical start values Theodore Ts'o
2012-12-20 23:43         ` [PATCH 2/3] libext2fs: ext2fs_extents_fix_parents() should not modify the handle location Theodore Ts'o
2012-12-20 23:43         ` [PATCH 3/3] e2fsck: make sure the extent tree is consistent after bogus node in the tree Theodore Ts'o
2012-12-21  3:19           ` Theodore Ts'o
2012-12-21 11:02             ` Forrest Liu
2012-12-21 15:34           ` Eric Sandeen
2012-12-21 20:47         ` Eric Sandeen [this message]
2012-12-24 14:57           ` [PATCH 1/3] e2fsck: fix incorrect interior node logical start values Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50D4CAFE.5010606@redhat.com \
    --to=sandeen@redhat.com \
    --cc=forrestl@synology.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.