• Dave Chinner's avatar
    xfs: remove SYNC_TRYLOCK from inode reclaim · 50718b8d
    Dave Chinner authored
    All background reclaim is SYNC_TRYLOCK already, and even blocking
    reclaim (SYNC_WAIT) can use trylock mechanisms as
    xfs_reclaim_inodes_ag() will keep cycling until there are no more
    reclaimable inodes. Hence we can kill SYNC_TRYLOCK from inode
    reclaim and make everything unconditionally non-blocking.
    
    We remove all the optimistic "avoid blocking on locks" checks done
    in xfs_reclaim_inode_grab() as nothing blocks on locks anymore.
    Further, checking XFS_IFLOCK optimistically can result in detecting
    inodes in the process of being cleaned (i.e. between being removed
    from the AIL and having the flush lock dropped), so for
    xfs_reclaim_inodes() to reliably reclaim all inodes we need to drop
    these checks anyway.
    Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
    Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    50718b8d
xfs_icache.c 44.8 KB