]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: keep unflushable buffers off the cache MRUs
authorDave Chinner <dchinner@redhat.com>
Thu, 11 Feb 2016 06:09:08 +0000 (17:09 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 11 Feb 2016 06:09:08 +0000 (17:09 +1100)
commitaef29e174d67b0b68b5834b93dbdcf4373e8f921
tree04b7ae81e81262e0e3aece9e307af7d237c41764
parente8f1e8aa76c37d5195c0aab2af5f073bb5ee2ff9
libxfs: keep unflushable buffers off the cache MRUs

There's no point trying to free buffers that are dirty and return
errors on flush as we have to keep them around until the corruption
is fixed. Hence if we fail to flush an inode during a cache shake,
move the buffer to a special dirty MRU list that the cache does not
shake. This prevents memory pressure from seeing these buffers, but
allows subsequent cache lookups to still find them through the hash.
This ensures we don't waste huge amounts of CPU trying to flush and
reclaim buffers that canot be flushed or reclaimed.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
include/cache.h
libxfs/cache.c