• Brian Foster's avatar
    xfs: buffer lru reference count error injection tag · 7561d27e
    Brian Foster authored
    XFS uses a fixed reference count for certain types of buffers in the
    internal LRU cache. These reference counts dictate how aggressively
    certain buffers are reclaimed vs. others. While the reference counts
    implements priority across different buffer types, all buffers
    (other than uncached buffers) are typically cached for at least one
    reclaim cycle.
    
    We've had at least one bug recently that has been hidden by a
    released buffer sitting around in the LRU. Users hitting the problem
    were able to reproduce under enough memory pressure to cause
    aggressive reclaim in a particular window of time.
    
    To support future xfstests cases, add an error injection tag to
    hardcode the buffer reference count to zero. When enabled, this
    bypasses caching of associated buffers and facilitates test cases
    that depend on this behavior.
    Signed-off-by: 's avatarBrian Foster <bfoster@redhat.com>
    Reviewed-by: 's avatarDarrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: 's avatarDarrick J. Wong <darrick.wong@oracle.com>
    7561d27e