• Darrick J. Wong's avatar
    xfs: repair link count of nondirectories after rebuilding parent pointers · 3f50ddbf
    Darrick J. Wong authored
    Since the parent pointer scrubber does not exhaustively search the
    filesystem for missing parent pointers, it doesn't have a good way to
    determine that there are pointers missing from an otherwise uncorrupt
    xattr structure.  Instead, for nondirectories it employs a heuristic of
    comparing the file link count to the number of parent pointers found.
    
    However, we don't want this heuristic flagging a false corruption after
    a repair has actually scanned the entire filesystem to rebuild the
    parent pointers.  Therefore, reset the file link count in this one case
    because we actually know the correct link count.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    3f50ddbf
parent_repair.c 40.4 KB