linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Theodore Tso <tytso@mit.edu>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] libext2fs: reset handle after inserting new extent
Date: Tue, 07 Jul 2009 09:22:18 -0500	[thread overview]
Message-ID: <4A535A1A.8000205@redhat.com> (raw)
In-Reply-To: <20090707133507.GL31532@mit.edu>

Theodore Tso wrote:
> On Mon, Jul 06, 2009 at 05:15:07PM -0500, Eric Sandeen wrote:
>> Commit 53422e8a5644e22ea3f6e0efba82a765b72e4308 moved
>> the new extent insertion in ext2fs_extent_set_bmap prior
>> to the modification of the original extent, but the
>> insert function left the handle pointing a the new
>> extent; this left us modifying the -new- extent not
>> the original one, and winding up with a corrupt extent
>> tree something like:
>>
>> BLOCKS:
>> (0-1):588791-588792, (0):588791
>>
>> We need to move back to the previous extent prior
>> to modification, if we inserted a new one.
> 
> Hmm, I just thought of something awful; what if the insert resulted in
> a node split?  Instead of using ext2fs_extent_get(EXT2_EXTENT_PREV),
> we may need to use ext2fs_extent_goto() to seek to the correct logical
> block instead.
> 
> 						- Ted

Hm....

so PREV doesn't go to the node for the previous logical block, but to
what, the node to the left at this level?  Guess I need to read more
carefully...

-Eric

  reply	other threads:[~2009-07-07 14:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-06 22:15 [PATCH] libext2fs: reset handle after inserting new extent Eric Sandeen
2009-07-07 13:35 ` Theodore Tso
2009-07-07 14:22   ` Eric Sandeen [this message]
2009-07-07 19:30 ` [PATCH V2] " Eric Sandeen

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=4A535A1A.8000205@redhat.com \
    --to=sandeen@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).