• Darrick J. Wong's avatar
    xfs: check directory bestfree information in the verifier · e4f45eff
    Darrick J. Wong authored
    Create a variant of xfs_dir2_data_freefind that is suitable for use in a
    verifier.  Because _freefind is called by the verifier, we simply
    duplicate the _freefind function, convert the ASSERTs to return
    __this_address, and modify the verifier to call our new function.  Once
    we've made it impossible for directory blocks with bad bestfree data to
    make it into the filesystem we can remove the DEBUG code from the
    regular _freefind function.
    
    Underlying argument: corruption of on-disk metadata should return
    -EFSCORRUPTED instead of blowing ASSERTs.
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
    e4f45eff
xfs_dir2_data.c 32.9 KB