]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: reset dirty buffer priority on lookup
authorDave Chinner <dchinner@redhat.com>
Thu, 11 Feb 2016 06:09:10 +0000 (17:09 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 11 Feb 2016 06:09:10 +0000 (17:09 +1100)
commit1b9fecf78f8fe43da3781d4776ac4fa9627d4cce
tree1d917fa78d0f526c45fb9718a4b7edf7c7d9dacc
parentaef29e174d67b0b68b5834b93dbdcf4373e8f921
libxfs: reset dirty buffer priority on lookup

When a buffer on the dirty MRU is looked up and found, we remove the
buffer from the MRU. However, we've already set the priority of the
buffer to "dirty" so when we are done with it it will go back on the
dirty buffer MRU regardless of whether it needs to or not.

Hence when we move a buffer to a the dirty MRU, record the old
priority and restore it when we remove the buffer from the MRU on
lookup. This will prevent us from putting fixed, now writeable
buffers back on the dirty MRU and allow the cache routine to write,
shake and reclaim the buffers once they are clean.

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