From: Christoph Hellwig <hch@infradead.org>
To: Simon Kirby <sim@hostway.ca>
Cc: xfs@oss.sgi.com
Subject: Re: Oops in xfs_dir2_block_lookup_int from storage corruption [2.6.33]
Date: Wed, 7 Apr 2010 08:36:38 -0400 [thread overview]
Message-ID: <20100407123638.GA21797@infradead.org> (raw)
In-Reply-To: <20100404081657.GA24143@hostway.ca>
On Sun, Apr 04, 2010 at 01:16:57AM -0700, Simon Kirby wrote:
> /*
> * Loop doing a binary search for our hash value.
> * Find our entry, ENOENT if it's not there.
> */
> for (low = 0, high = be32_to_cpu(btp->count) - 1; ; ) {
> ASSERT(low <= high);
> mid = (low + high) >> 1;
> ======> if ((hash = be32_to_cpu(blp[mid].hashval)) == args->hashval)
> break;
>
> blp is 8 bytes which matches the multiplication of the array index in the
> instruction. So, this means that blp[mid] pointed to 0xffff8800f674bf00,
> and mid was 0x0000000015c6535e. That sounds kind of high...?
Yes. Looks like btp->count was corrupted. It counts the number of
xfs_dir2_leaf_entry in the directory block, which is 16 bytes larger.
So with 4k directory blocks that you're using we could only pack 256
entries in one block, and that's already disconting the head and tail
headers we have in the block format.
I'll add some more error checking to the directory code when I get
time for it.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2010-04-07 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-04 8:16 Oops in xfs_dir2_block_lookup_int from storage corruption [2.6.33] Simon Kirby
2010-04-07 12:36 ` Christoph Hellwig [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=20100407123638.GA21797@infradead.org \
--to=hch@infradead.org \
--cc=sim@hostway.ca \
--cc=xfs@oss.sgi.com \
/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