From: Alex Tomas <alex@clusterfs.com>
To: Andreas Dilger <adilger@clusterfs.com>
Cc: Alex Tomas <alex@clusterfs.com>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] more sanity check in extents
Date: Thu, 18 Jan 2007 01:31:37 +0300 [thread overview]
Message-ID: <m3zm8hl1yu.fsf@bzzz.home.net> (raw)
In-Reply-To: <20070117222331.GL5236@schatzie.adilger.int> (Andreas Dilger's message of "Wed\, 17 Jan 2007 15\:23\:31 -0700")
>>>>> Andreas Dilger (AD) writes:
AD> On Jan 12, 2007 03:18 +0300, Alex Tomas wrote:
>> + /* after split, a leaf can get zero entries
>> + * thus there is nothing to check */
>> + if (le16_to_cpu(path->p_hdr->eh_entries) == 0)
>> + return 0;
>> +
>> + if (depth == 0)
>> + first = le32_to_cpu(EXT_FIRST_EXTENT(path->p_hdr)->ee_block);
>> + else
>> + first = le32_to_cpu(EXT_FIRST_INDEX(path->p_hdr)->ei_block);
>> + path--;
>> + key = le32_to_cpu(path->p_idx->ei_block);
>> +
>> + if (likely(first == key))
>> + return 0;
AD> What happens if, say, a leaf is split and then the first part of the split
AD> is removed? This could only happen with punch() on a running filesystem,
AD> but in e2fsck a corrupt extent will be removed from the leaf without
AD> updating the parent index's range.
hmm. e2fsck must update. there are other places in extents where
first extent in a block is supposed to match key in index.
ldiskfs_ext_next_allocated_block(), for example.
thanks, Alex
prev parent reply other threads:[~2007-01-17 22:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-12 0:18 [PATCH] more sanity check in extents Alex Tomas
2007-01-17 22:23 ` Andreas Dilger
2007-01-17 22:31 ` Alex Tomas [this message]
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=m3zm8hl1yu.fsf@bzzz.home.net \
--to=alex@clusterfs.com \
--cc=adilger@clusterfs.com \
--cc=linux-ext4@vger.kernel.org \
/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).