[Ocfs2-tools-devel] How to deal with file metadata corruption?

Goldwyn Rodrigues rgoldwyn at gmail.com
Thu May 12 15:47:03 PDT 2011


Hi,

I have a case of a corrupted file whose metadata is corrupted. The file
is large and the corrupted part of extent block looks like this:

        SubAlloc Bit: 576   SubAlloc Slot: 0
        Blknum: 513089   Next Leaf: 0
        Tree Depth: 1   Count: 252   Next Free Rec: 159
        ## Offset        Clusters       Block#

<snipped>

        142 36821655      252            512689
        143 36821907      674            512692
        144 36822581      364            512694
        145 36822945      4294966509     512697
        146 36822158      4294967295     512699
        147 36822157      1617           512702
        148 36823774      4294966096     512724
        149 36822574      4294967148     512770
        150 36822426      0              145678608
        151 36822426      149            145678613
        152 36822575      4294966876     512841
        153 36822155      0              512843
        154 36822155      289            512847
        155 36822444      290            512849
        156 36822734      4294967185     512851
        157 36822623      73266          512853
        158 36895889      852847         512856

Clearly, number of clusters can't be 0 and even 4294967185 seems to be
a pretty high number for a file which is so fragmented.

Is ocfs2-tools dealing with such an corruption? If not, what would be the
best path to deal with it? The parent record contains the number of
clusters the leaves contain and it can be validated that way.
However, do you discard the extra blocks?

The problem is: Trying to delete this file invokes a BUG_ON() which
checks the sanity extent records.

Regards,

-- 
Goldwyn



More information about the Ocfs2-tools-devel mailing list