d4e3d33 fsck.gfs2: Handle duplicate reference to dinode blocks

Authored and Committed by rpeterso 12 years ago
    fsck.gfs2: Handle duplicate reference to dinode blocks
    
    The fsck.gfs2 tool was not properly handling cases where dinode
    blocks were referenced by other dinodes as another type.  For example,
    if some dinode wrongly thought that another dinode was one of its
    metadata blocks or data blocks.  This patch fixes that situation by
    introducing a new "ref_is_inode" duplicate reference type.  The only
    thing that should ever reference a dinode is a directory, and that's
    a special case.  Any other reference is wrong and should be removed.
    This patch takes care of those situations.
    
    The patch also moves the code that marks dinodes as their
    proper type to a new function in util.c called set_ip_blockmap.
    That allows duplicate processing to set the proper type in the
    blockmap in cases where the invalid reference was found first
    (before the dinode itself was encountered).  It also removes the
    redundant "reftype_str" array of descriptions in favor of a central
    one already in util.c called "reftypes".
    
    rhbz#675723
    
        
file modified
+7 -4
file modified
+5 -45
file modified
+35 -22
file modified
+70 -1
file modified
+2 -1