[Top] [All Lists]

Ghost items in the end of a dir listing

To: xfs@xxxxxxxxxxx
Subject: Ghost items in the end of a dir listing
From: Felipe Monteiro de Carvalho <felipemonteiro.carvalho@xxxxxxxxx>
Date: Wed, 27 Aug 2014 12:20:14 +0200
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=xDTguc5Vn/gZWeYndlx2HiYqk4EEBWuuFaWlQyrIyL4=; b=VIDrbTdm5ZyBPtRJ3YYdKY0hIRxeqWbS9i+FNzzYHUSmGUzhnRfToJiCx7bVDaK77K nt1JZAy7i1FoIzkK2sQGl4OHO2/dkXz19xMwiepJe0h2EB1RCFNW1RJnqCb3taRB4FqL ppLPRn7aJ6npdcj3oAzYG23ezFTybwSy3mnz018CmdZ/G5Gaw/K5SmV4RqsMAyoz4c3m 48ggDi7SVLbp78fo8Mv1dJvbmVYvq1E8vcZGOXjkhQo20cRpJ5ZRDANPNVTZMdZtqzcd yut094KRzn6+JTnb8pLOJuZOX8xDLIxETE63vkuW6usmKDBDc8Dg0ZFQUZN7fKerw/6R CenA==

I am writing a program that reads XFS partitions and I am having
trouble with some dir listings. In some directories in the block that
starts with XD2B there is first the list of all directory items, which
I read without problems, and then there is a free item, for example:

    freetag -> XFS_DIR2_DATA_FREE_TAG */
    length -> 9A0
    tag -> zero

But after this free item there is still room in the block, so my
program will try to read the next item. I cannot stop the reading
because it is possible to have valid items, then a free item and then
more valid items.

The next item start might be something like:

00 00 00 2E 00 00 00 02 16

So it is not a free item, as it doesn't start with FF = XFS_DIR2_DATA_FREE_TAG
But it isn't valid either, as its name is a bunch of trash =(

So my questions are:
1> What are those ghost items in the end of the block?
2> Which criteria should be utilized to differentiate them from valid
items? I tried some guesses but nothing really works so far...

Here are screenshots of the actual data involved, here showing the


And here showing the area in the end of the block with wierd items:


thanks for any tips =)
Felipe Monteiro de Carvalho

<Prev in Thread] Current Thread [Next in Thread>
  • Ghost items in the end of a dir listing, Felipe Monteiro de Carvalho <=