diff options
author | Dave Chinner <david@fromorbit.com> | 2010-03-12 09:42:10 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-26 07:41:15 -0700 |
commit | 9e1e9675fb29c0e94a7c87146138aa2135feba2f (patch) | |
tree | d423b5407f240433b70e5ef8dc0db1a6dc6d7e21 /fs/xfs/xfs_fs.h | |
parent | 22a482c6215ed335d2de07aa113d3cd317015cf7 (diff) |
xfs: reclaim all inodes by background tree walks
commit 57817c68229984818fea9e614d6f95249c3fb098 upstream
We cannot do direct inode reclaim without taking the flush lock to
ensure that we do not reclaim an inode under IO. We check the inode
is clean before doing direct reclaim, but this is not good enough
because the inode flush code marks the inode clean once it has
copied the in-core dirty state to the backing buffer.
It is the flush lock that determines whether the inode is still
under IO, even though it is marked clean, and the inode is still
required at IO completion so we can't reclaim it even though it is
clean in core. Hence the requirement that we need to take the flush
lock even on clean inodes because this guarantees that the inode
writeback IO has completed and it is safe to reclaim the inode.
With delayed write inode flushing, we could end up waiting a long
time on the flush lock even for a clean inode. The background
reclaim already handles this efficiently, so avoid all the problems
by killing the direct reclaim path altogether.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/xfs/xfs_fs.h')
0 files changed, 0 insertions, 0 deletions