• Darrick J. Wong's avatar
    xfs: bmap scrubber should do rmap xref with bmap for sparse files · 5e777b62
    Darrick J. Wong authored
    When we're scanning an extent mapping inode fork, ensure that every rmap
    record for this ifork has a corresponding bmbt record too.  This
    (mostly) provides the ability to cross-reference rmap records with bmap
    data.  The rmap scrubber cannot do the xref on its own because that
    requires taking an ilock with the agf lock held, which violates our
    locking order rules (inode, then agf).
    
    Note that we only do this for forks that are in btree format due to the
    increased complexity; or forks that should have data but suspiciously
    have zero extents because the inode could have just had its iforks
    zapped by the inode repair code and now we need to reclaim the old
    extents.
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
    5e777b62
bmap.c 19.6 KB