提交 163d3686 编写于 作者: D Donald Douwsma 提交者: Lachlan McIlroy

[XFS] Remove the xfs_refcache

Remove the xfs_refcache, it was only needed while we were still
building for 2.4 kernels.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30472a
Signed-off-by: NDonald Douwsma <donaldd@sgi.com>
Signed-off-by: NChristoph Hellwig <hch@infradead.org>
Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
上级 461aa8a2
...@@ -99,7 +99,6 @@ ...@@ -99,7 +99,6 @@
/* /*
* Feature macros (disable/enable) * Feature macros (disable/enable)
*/ */
#undef HAVE_REFCACHE /* reference cache not needed for NFS in 2.6 */
#define HAVE_SPLICE /* a splice(2) exists in 2.6, but not in 2.4 */ #define HAVE_SPLICE /* a splice(2) exists in 2.6, but not in 2.4 */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#define HAVE_PERCPU_SB /* per cpu superblock counters are a 2.6 feature */ #define HAVE_PERCPU_SB /* per cpu superblock counters are a 2.6 feature */
......
...@@ -240,10 +240,6 @@ typedef struct xfs_inode { ...@@ -240,10 +240,6 @@ typedef struct xfs_inode {
atomic_t i_pincount; /* inode pin count */ atomic_t i_pincount; /* inode pin count */
wait_queue_head_t i_ipin_wait; /* inode pinning wait queue */ wait_queue_head_t i_ipin_wait; /* inode pinning wait queue */
spinlock_t i_flags_lock; /* inode i_flags lock */ spinlock_t i_flags_lock; /* inode i_flags lock */
#ifdef HAVE_REFCACHE
struct xfs_inode **i_refcache; /* ptr to entry in ref cache */
struct xfs_inode *i_release; /* inode to unref */
#endif
/* Miscellaneous state. */ /* Miscellaneous state. */
unsigned short i_flags; /* see defined flags below */ unsigned short i_flags; /* see defined flags below */
unsigned char i_update_core; /* timestamps/size is dirty */ unsigned char i_update_core; /* timestamps/size is dirty */
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include "xfs_bmap.h" #include "xfs_bmap.h"
#include "xfs_error.h" #include "xfs_error.h"
#include "xfs_quota.h" #include "xfs_quota.h"
#include "xfs_refcache.h"
#include "xfs_utils.h" #include "xfs_utils.h"
#include "xfs_trans_space.h" #include "xfs_trans_space.h"
#include "xfs_vnodeops.h" #include "xfs_vnodeops.h"
...@@ -580,10 +579,8 @@ xfs_rename( ...@@ -580,10 +579,8 @@ xfs_rename(
* the vnode references. * the vnode references.
*/ */
error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
if (target_ip != NULL) { if (target_ip != NULL)
xfs_refcache_purge_ip(target_ip);
IRELE(target_ip); IRELE(target_ip);
}
/* /*
* Let interposed file systems know about removed links. * Let interposed file systems know about removed links.
*/ */
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include "xfs_error.h" #include "xfs_error.h"
#include "xfs_bmap.h" #include "xfs_bmap.h"
#include "xfs_rw.h" #include "xfs_rw.h"
#include "xfs_refcache.h"
#include "xfs_buf_item.h" #include "xfs_buf_item.h"
#include "xfs_log_priv.h" #include "xfs_log_priv.h"
#include "xfs_dir2_trace.h" #include "xfs_dir2_trace.h"
...@@ -157,7 +156,6 @@ xfs_cleanup(void) ...@@ -157,7 +156,6 @@ xfs_cleanup(void)
xfs_cleanup_procfs(); xfs_cleanup_procfs();
xfs_sysctl_unregister(); xfs_sysctl_unregister();
xfs_refcache_destroy();
xfs_filestream_uninit(); xfs_filestream_uninit();
xfs_mru_cache_uninit(); xfs_mru_cache_uninit();
xfs_acl_zone_destroy(xfs_acl_zone); xfs_acl_zone_destroy(xfs_acl_zone);
...@@ -584,11 +582,6 @@ xfs_unmount( ...@@ -584,11 +582,6 @@ xfs_unmount(
0 : DM_FLAGS_UNWANTED; 0 : DM_FLAGS_UNWANTED;
} }
#endif #endif
/*
* First blow any referenced inode from this file system
* out of the reference cache, and delete the timer.
*/
xfs_refcache_purge_mp(mp);
/* /*
* Blow away any referenced inode in the filestreams cache. * Blow away any referenced inode in the filestreams cache.
...@@ -652,7 +645,6 @@ xfs_quiesce_fs( ...@@ -652,7 +645,6 @@ xfs_quiesce_fs(
{ {
int count = 0, pincount; int count = 0, pincount;
xfs_refcache_purge_mp(mp);
xfs_flush_buftarg(mp->m_ddev_targp, 0); xfs_flush_buftarg(mp->m_ddev_targp, 0);
xfs_finish_reclaim_all(mp, 0); xfs_finish_reclaim_all(mp, 0);
...@@ -1322,18 +1314,6 @@ xfs_syncsub( ...@@ -1322,18 +1314,6 @@ xfs_syncsub(
} }
} }
/*
* If this is the periodic sync, then kick some entries out of
* the reference cache. This ensures that idle entries are
* eventually kicked out of the cache.
*/
if (flags & SYNC_REFCACHE) {
if (flags & SYNC_WAIT)
xfs_refcache_purge_mp(mp);
else
xfs_refcache_purge_some(mp);
}
/* /*
* If asked, update the disk superblock with incore counter values if we * If asked, update the disk superblock with incore counter values if we
* are using non-persistent counters so that they don't get too far out * are using non-persistent counters so that they don't get too far out
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
#include "xfs_quota.h" #include "xfs_quota.h"
#include "xfs_utils.h" #include "xfs_utils.h"
#include "xfs_rtalloc.h" #include "xfs_rtalloc.h"
#include "xfs_refcache.h"
#include "xfs_trans_space.h" #include "xfs_trans_space.h"
#include "xfs_log_priv.h" #include "xfs_log_priv.h"
#include "xfs_filestream.h" #include "xfs_filestream.h"
...@@ -1520,12 +1519,6 @@ xfs_release( ...@@ -1520,12 +1519,6 @@ xfs_release(
xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE); xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE);
} }
#ifdef HAVE_REFCACHE
/* If we are in the NFS reference cache then don't do this now */
if (ip->i_refcache)
return 0;
#endif
if (ip->i_d.di_nlink != 0) { if (ip->i_d.di_nlink != 0) {
if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) && if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) &&
((ip->i_size > 0) || (VN_CACHED(vp) > 0 || ((ip->i_size > 0) || (VN_CACHED(vp) > 0 ||
...@@ -2448,14 +2441,6 @@ xfs_remove( ...@@ -2448,14 +2441,6 @@ xfs_remove(
goto std_return; goto std_return;
} }
/*
* Before we drop our extra reference to the inode, purge it
* from the refcache if it is there. By waiting until afterwards
* to do the IRELE, we ensure that we won't go inactive in the
* xfs_refcache_purge_ip routine (although that would be OK).
*/
xfs_refcache_purge_ip(ip);
/* /*
* If we are using filestreams, kill the stream association. * If we are using filestreams, kill the stream association.
* If the file is still open it may get a new one but that * If the file is still open it may get a new one but that
...@@ -2495,14 +2480,6 @@ xfs_remove( ...@@ -2495,14 +2480,6 @@ xfs_remove(
cancel_flags |= XFS_TRANS_ABORT; cancel_flags |= XFS_TRANS_ABORT;
xfs_trans_cancel(tp, cancel_flags); xfs_trans_cancel(tp, cancel_flags);
/*
* Before we drop our extra reference to the inode, purge it
* from the refcache if it is there. By waiting until afterwards
* to do the IRELE, we ensure that we won't go inactive in the
* xfs_refcache_purge_ip routine (although that would be OK).
*/
xfs_refcache_purge_ip(ip);
IRELE(ip); IRELE(ip);
goto std_return; goto std_return;
...@@ -3460,16 +3437,7 @@ xfs_rwunlock( ...@@ -3460,16 +3437,7 @@ xfs_rwunlock(
{ {
if (S_ISDIR(ip->i_d.di_mode)) if (S_ISDIR(ip->i_d.di_mode))
return; return;
if (locktype == VRWLOCK_WRITE) { if (locktype != VRWLOCK_WRITE) {
/*
* In the write case, we may have added a new entry to
* the reference cache. This might store a pointer to
* an inode to be released in this inode. If it is there,
* clear the pointer and release the inode after unlocking
* this one.
*/
xfs_refcache_iunlock(ip, XFS_IOLOCK_EXCL);
} else {
ASSERT((locktype == VRWLOCK_READ) || ASSERT((locktype == VRWLOCK_READ) ||
(locktype == VRWLOCK_WRITE_DIRECT)); (locktype == VRWLOCK_WRITE_DIRECT));
xfs_iunlock(ip, XFS_IOLOCK_SHARED); xfs_iunlock(ip, XFS_IOLOCK_SHARED);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册