diff options
author | Dave Chinner <david@fromorbit.com> | 2010-02-05 20:37:26 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2010-02-05 20:37:26 -0500 |
commit | 777df5afdb26c71634edd60582be620ff94e87a0 (patch) | |
tree | 26ed86f1ec114250230e4e090be18980c94ce73f /fs/xfs/xfs_inode.h | |
parent | d5db0f97fbbeff11c88dec1aaf1536a975afbaeb (diff) |
xfs: Make inode reclaim states explicit
A.K.A.: don't rely on xfs_iflush() return value in reclaim
We have gradually been moving checks out of the reclaim code because
they are duplicated in xfs_iflush(). We've had a history of problems
in this area, and many of them stem from the overloading of the
return values from xfs_iflush() and interaction with inode flush
locking to determine if the inode is safe to reclaim.
With the desire to move to delayed write flushing of inodes and
non-blocking inode tree reclaim walks, the overloading of the
return value of xfs_iflush makes it very difficult to determine
the correct thing to do next.
This patch explicitly re-adds the checks to the inode reclaim code,
removing the reliance on the return value of xfs_iflush() to
determine what to do next. It also means that we can clearly
document all the inode states that reclaim must handle and hence
we can easily see that we handled all the necessary cases.
This also removes the need for the xfs_inode_clean() check in
xfs_iflush() as all callers now check this first (safely).
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index ec1f28c4fc4f..8b618ea4d692 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -483,6 +483,7 @@ int xfs_iunlink(struct xfs_trans *, xfs_inode_t *); | |||
483 | void xfs_iext_realloc(xfs_inode_t *, int, int); | 483 | void xfs_iext_realloc(xfs_inode_t *, int, int); |
484 | void xfs_ipin(xfs_inode_t *); | 484 | void xfs_ipin(xfs_inode_t *); |
485 | void xfs_iunpin(xfs_inode_t *); | 485 | void xfs_iunpin(xfs_inode_t *); |
486 | void xfs_iunpin_wait(xfs_inode_t *); | ||
486 | int xfs_iflush(xfs_inode_t *, uint); | 487 | int xfs_iflush(xfs_inode_t *, uint); |
487 | void xfs_ichgtime(xfs_inode_t *, int); | 488 | void xfs_ichgtime(xfs_inode_t *, int); |
488 | void xfs_lock_inodes(xfs_inode_t **, int, uint); | 489 | void xfs_lock_inodes(xfs_inode_t **, int, uint); |