All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Monteiro de Carvalho <felipemonteiro.carvalho@gmail.com>
To: xfs@oss.sgi.com
Subject: xfs_bmbt_rec_64 leading to wrong blocks
Date: Wed, 6 Aug 2014 12:12:12 +0200	[thread overview]
Message-ID: <CACyNnZM8D4ZdOAvbXNoiRUAGh1uZF8=9Gy34qS2XH7QUVjiGsQ@mail.gmail.com> (raw)

Hello,

I am writing a software which reads xfs partitions and it is working
well so far, but, at in a particular folder with 10k files, only 7k
files appear, the other ones don't.

I read an inode which has di_core.di_format = XFS_DINODE_FMT_BTREE

No problem here, the btree is trivial, it has only 1 element inside
it, which leads to a list of 82 extends.

Extends 0..52 aprox. are all great, and work fine.

Extent 53 (and other ones after that) point to very wierd memory areas
which don't match the pattern that I saw previously =(

Here is the hex data of the extents, the selected extent in nr 53:

http://magnifier.sourceforge.net/temp/xfs/extent_with_xfs_bmbt_rec_64.png

And here is debug information showing which values I extracted from this table:

i=0 FLocalExtent.StartOff=0 FLocalExtent.StartBlock=66748
FLocalExtent.BlockCount=1 lStartBlock=65212
i=1 FLocalExtent.StartOff=1 FLocalExtent.StartBlock=66758
FLocalExtent.BlockCount=2 lStartBlock=65222
i=2 FLocalExtent.StartOff=3 FLocalExtent.StartBlock=66772
FLocalExtent.BlockCount=1 lStartBlock=65236
....

i=51 FLocalExtent.StartOff=77 FLocalExtent.StartBlock=67468
FLocalExtent.BlockCount=1 lStartBlock=65932
i=52 FLocalExtent.StartOff=78 FLocalExtent.StartBlock=67479
FLocalExtent.BlockCount=1 lStartBlock=65943
i=53 FLocalExtent.StartOff=8388608 FLocalExtent.StartBlock=66749
FLocalExtent.BlockCount=1 lStartBlock=65213
i=54 FLocalExtent.StartOff=8388609 FLocalExtent.StartBlock=66783
FLocalExtent.BlockCount=2 lStartBlock=65247
...

Note how StartOff is suddenly so big! But I manually checked the bits
comparing to xfs_bmbt_rec_64 and the value written is that one. But
what sense does it make for StartOff to jump like that?

And why are the blocks pointing to a non-XD2D block?

Here is the block to which one of the valid extents point to:

http://magnifier.sourceforge.net/temp/xfs/correct_block_xd2d.png

And here is a block to which one of the extents that I cannot
interpretate point to:

http://magnifier.sourceforge.net/temp/xfs/wierd_block_xd2d.png
and another one:
http://magnifier.sourceforge.net/temp/xfs/wierd_xfs_dir2_data_entry.png

Any ideas???

I already worked so much on this, but I cannot figure out =(

thanks,
-- 
Felipe Monteiro de Carvalho

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2014-08-06 10:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 10:12 Felipe Monteiro de Carvalho [this message]
2014-08-06 11:34 ` xfs_bmbt_rec_64 leading to wrong blocks Brian Foster
2014-08-06 12:31   ` Felipe Monteiro de Carvalho
2014-08-06 14:23     ` Brian Foster
2014-08-07 11:51       ` Felipe Monteiro de Carvalho
2014-08-07 12:56         ` Brian Foster

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='CACyNnZM8D4ZdOAvbXNoiRUAGh1uZF8=9Gy34qS2XH7QUVjiGsQ@mail.gmail.com' \
    --to=felipemonteiro.carvalho@gmail.com \
    --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.