All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Forrest Liu <forrestl@synology.com>
Cc: Ashish Sangwan <ashishsangwan2@gmail.com>,
	"Theodore Ts'o" <tytso@mit.edu>,
	ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: fix extent tree corruption that incurred by hole punch
Date: Fri, 07 Dec 2012 16:17:10 -0600	[thread overview]
Message-ID: <50C26AE6.9080902@redhat.com> (raw)
In-Reply-To: <CAJSVwFOkH3MzdJTVm9M1fFycNqWr4oy+zUNaDUy0LPnXk=YZMg@mail.gmail.com>

On 12/7/12 6:26 AM, Forrest Liu wrote:
> 2012/12/7 Ashish Sangwan <ashishsangwan2@gmail.com>:
>> On Thu, Dec 6, 2012 at 9:18 PM, Eric Sandeen <sandeen@redhat.com> wrote:
>>> On 12/6/12 9:45 AM, Eric Sandeen wrote:
>>>> On 12/4/12 6:11 AM, Forrest Liu wrote:
>>>>> Extent indexes didn't update correctly in ext4_ext_rm_idx, when depth
>>>>> of extent tree is greater than 1.
>>>>
>>>> This is interesting; we had 2 reports of similar corruption on the
>>>> list, I wonder if the application in question was doing hole punching.
>>>> I didn't expect that they were, so TBH I was pretty much ignoring
>>>> the hole-punch cases for parent index updates.  Hm.  I'll have
>>>> to look into that.
>>>> Could you turn your testcase into an xfstest regression test?
> 
> Hi Eric,
>    I will check how to do that.
>>>
>>> Also, please note that I sent an e2fsck patch to try to fix this
>>> problem after the fact; it'd be great if in your testing, you could
>>> also confirm that e2fsck w/ my patch fixes it correctly.
>>>
>> I checked you patch.
>> This was the extent tree situation after removing 1st extent index:
>> debugfs:  ex abc
>> Level Entries       Logical        Physical Length Flags
>>  0/ 2   1/  1     0 -  8399  32857            8400
>>  1/ 2   1/  4  2048 -  4081   4138            2034
>>  2/ 2   1/339  2048 -  2053  69632 -  69637      6
>>  2/ 2   2/339  2054 -  2059  69656 -  69661      6
>>
>> E2fsck's output with your patch=>
>> Linux#> /dtv/usb/sdb1/e2fsck /dev/sda1 -f
>> e2fsck 1.42.6.1 (06-DEC-2012)
>> Pass 1: Checking inodes, blocks, and sizes
>> Interior extent node level 0 of inode 31:
>> Logical start 0 does not match logical start 2048 at next level.  Fix<y>? yes
>> Inode 31, i_blocks is 50856, should be 16280.  Fix<y>? yes
> 
> I got similar result, pb->num_blocks is incorrect if
> ext2fs_extent_fix_parents called.

Maybe I should ask what it looks like without my patch?  I didn't
think my patch would change anything at all about block count
or use.

-Eric


  reply	other threads:[~2012-12-07 22:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 12:11 [PATCH] ext4: fix extent tree corruption that incurred by hole punch Forrest Liu
2012-12-04 12:29 ` forrest
2012-12-05  6:13   ` Forrest Liu
2012-12-05  7:53     ` Ashish Sangwan
2012-12-05  8:09       ` Ashish Sangwan
2012-12-06 11:35         ` Forrest Liu
2012-12-06 13:16           ` Ashish Sangwan
2012-12-06 14:36             ` Forrest Liu
2012-12-07  5:11               ` Ashish Sangwan
2012-12-07 12:13                 ` Forrest Liu
2012-12-10  6:22                   ` Ashish Sangwan
2012-12-08 17:31   ` Eric Sandeen
2012-12-08 18:56     ` Forrest Liu
2012-12-06 15:45 ` Eric Sandeen
2012-12-06 15:48   ` Eric Sandeen
2012-12-07  5:53     ` Ashish Sangwan
2012-12-07 12:26       ` Forrest Liu
2012-12-07 22:17         ` Eric Sandeen [this message]
2012-12-08 19:01           ` Forrest Liu
2012-12-07 22:29         ` Theodore Ts'o
2012-12-08 19:29           ` Forrest Liu
  -- strict thread matches above, loose matches on Subject: below --
2012-12-04 11:32 Forrest Liu

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=50C26AE6.9080902@redhat.com \
    --to=sandeen@redhat.com \
    --cc=ashishsangwan2@gmail.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.