From: Eric Sandeen <sandeen@sandeen.net>
To: Rui Gomes <rgomes@rvx.is>
Cc: omar <omar@rvx.is>, xfs <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs_repair: junk last entry in sf dir if name starts beyond dir size
Date: Wed, 11 Mar 2015 11:46:50 -0400 [thread overview]
Message-ID: <5500636A.3020309@sandeen.net> (raw)
In-Reply-To: <1908077521.428877.1426086242030.JavaMail.zimbra@rvx.is>
On 3/11/15 11:04 AM, Rui Gomes wrote:
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000000044dbcd in __xfs_dir3_data_check (dp=dp@entry=0x0, bp=bp@entry=0x1538e810) at xfs_dir2_data.c:148
> 148 for (i = 0; i < be32_to_cpu(btp->count); i++) {
> (gdb) bt
> #0 0x000000000044dbcd in __xfs_dir3_data_check (dp=dp@entry=0x0, bp=bp@entry=0x1538e810) at xfs_dir2_data.c:148
> #1 0x000000000044b9ea in xfs_dir3_block_verify (bp=bp@entry=0x1538e810) at xfs_dir2_block.c:62
Can you do a little digging around in gdb to sort out more
about why it segfaulted?
We got a xfs_dir2_data_hdr_t from the passed-in bp w/ valid magic:
hdr = bp->b_addr;
and from that got btp:
switch (hdr->magic) {
case cpu_to_be32(XFS_DIR2_BLOCK_MAGIC):
btp = xfs_dir2_block_tail_p(mp, hdr);
and this just finds an offset from hdr:
((char *)hdr + mp->m_dirblksize)) - 1;
but then apparently blew up when we tried to use btp:
for (i = 0; i < be32_to_cpu(btp->count); i++) {
I don't see offhand how the hdr is ok, with good magic, but an
offset from the hdr (btp) is causing a segfault. Can you dig around
a bit more in gdb?
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-03-11 15:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 20:13 [PATCH] xfs_repair: junk last entry in sf dir if name starts beyond dir size Eric Sandeen
2015-03-10 1:17 ` Brian Foster
2015-03-10 13:27 ` Eric Sandeen
2015-03-10 15:43 ` Eric Sandeen
2015-03-10 17:27 ` Rui Gomes
2015-03-10 17:37 ` Eric Sandeen
2015-03-11 14:26 ` Rui Gomes
2015-03-11 14:44 ` Eric Sandeen
2015-03-11 15:04 ` Rui Gomes
2015-03-11 15:46 ` Eric Sandeen [this message]
2015-03-11 16:01 ` Rui Gomes
2015-04-09 10:42 ` Rui Gomes
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=5500636A.3020309@sandeen.net \
--to=sandeen@sandeen.net \
--cc=omar@rvx.is \
--cc=rgomes@rvx.is \
--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 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.