• Darrick J. Wong's avatar
    xfs: fix logdev fsmap query result filtering · a949a1c2
    Darrick J. Wong authored
    The external log device fsmap backend doesn't have an rmapbt to query,
    so it's wasteful to spend time initializing the rmap_irec objects.
    Worse yet, the log could (someday) be longer than 2^32 fsblocks, so
    using the rmap irec structure will result in integer overflows.
    
    Fix this mess by computing the start address that we want from keys[0]
    directly, and use the daddr-based record filtering algorithm that we
    also use for rtbitmap queries.
    
    Fixes: e89c0413
    
     ("xfs: implement the GETFSMAP ioctl")
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
    a949a1c2
xfs_fsmap.c 26.3 KB