diff options
author | Donald Douwsma <donaldd@sgi.com> | 2008-03-05 21:43:20 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-04-17 21:36:55 -0400 |
commit | 163d3686bb09d88e2120bffe780a3f2d7cc4c948 (patch) | |
tree | 8503962ad2c4641f0796b5bb864996994c1ca137 /fs/xfs | |
parent | 461aa8a22595e3bd3e6f4dc2894d7c4315ea2bb9 (diff) |
[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: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_linux.h | 1 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.h | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_rename.c | 5 | ||||
-rw-r--r-- | fs/xfs/xfs_vfsops.c | 20 | ||||
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 34 |
5 files changed, 2 insertions, 62 deletions
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index 3ca39c4e5d2a..e5143323e71f 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h | |||
@@ -99,7 +99,6 @@ | |||
99 | /* | 99 | /* |
100 | * Feature macros (disable/enable) | 100 | * Feature macros (disable/enable) |
101 | */ | 101 | */ |
102 | #undef HAVE_REFCACHE /* reference cache not needed for NFS in 2.6 */ | ||
103 | #define HAVE_SPLICE /* a splice(2) exists in 2.6, but not in 2.4 */ | 102 | #define HAVE_SPLICE /* a splice(2) exists in 2.6, but not in 2.4 */ |
104 | #ifdef CONFIG_SMP | 103 | #ifdef CONFIG_SMP |
105 | #define HAVE_PERCPU_SB /* per cpu superblock counters are a 2.6 feature */ | 104 | #define HAVE_PERCPU_SB /* per cpu superblock counters are a 2.6 feature */ |
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index bfcd72cbaeea..eaa01895ff93 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -240,10 +240,6 @@ typedef struct xfs_inode { | |||
240 | atomic_t i_pincount; /* inode pin count */ | 240 | atomic_t i_pincount; /* inode pin count */ |
241 | wait_queue_head_t i_ipin_wait; /* inode pinning wait queue */ | 241 | wait_queue_head_t i_ipin_wait; /* inode pinning wait queue */ |
242 | spinlock_t i_flags_lock; /* inode i_flags lock */ | 242 | spinlock_t i_flags_lock; /* inode i_flags lock */ |
243 | #ifdef HAVE_REFCACHE | ||
244 | struct xfs_inode **i_refcache; /* ptr to entry in ref cache */ | ||
245 | struct xfs_inode *i_release; /* inode to unref */ | ||
246 | #endif | ||
247 | /* Miscellaneous state. */ | 243 | /* Miscellaneous state. */ |
248 | unsigned short i_flags; /* see defined flags below */ | 244 | unsigned short i_flags; /* see defined flags below */ |
249 | unsigned char i_update_core; /* timestamps/size is dirty */ | 245 | unsigned char i_update_core; /* timestamps/size is dirty */ |
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index 7eb157a59f9e..1c6d40ed6816 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include "xfs_bmap.h" | 36 | #include "xfs_bmap.h" |
37 | #include "xfs_error.h" | 37 | #include "xfs_error.h" |
38 | #include "xfs_quota.h" | 38 | #include "xfs_quota.h" |
39 | #include "xfs_refcache.h" | ||
40 | #include "xfs_utils.h" | 39 | #include "xfs_utils.h" |
41 | #include "xfs_trans_space.h" | 40 | #include "xfs_trans_space.h" |
42 | #include "xfs_vnodeops.h" | 41 | #include "xfs_vnodeops.h" |
@@ -580,10 +579,8 @@ xfs_rename( | |||
580 | * the vnode references. | 579 | * the vnode references. |
581 | */ | 580 | */ |
582 | error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); | 581 | error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); |
583 | if (target_ip != NULL) { | 582 | if (target_ip != NULL) |
584 | xfs_refcache_purge_ip(target_ip); | ||
585 | IRELE(target_ip); | 583 | IRELE(target_ip); |
586 | } | ||
587 | /* | 584 | /* |
588 | * Let interposed file systems know about removed links. | 585 | * Let interposed file systems know about removed links. |
589 | */ | 586 | */ |
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 7094caff13cf..79bdfb3d6081 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include "xfs_error.h" | 43 | #include "xfs_error.h" |
44 | #include "xfs_bmap.h" | 44 | #include "xfs_bmap.h" |
45 | #include "xfs_rw.h" | 45 | #include "xfs_rw.h" |
46 | #include "xfs_refcache.h" | ||
47 | #include "xfs_buf_item.h" | 46 | #include "xfs_buf_item.h" |
48 | #include "xfs_log_priv.h" | 47 | #include "xfs_log_priv.h" |
49 | #include "xfs_dir2_trace.h" | 48 | #include "xfs_dir2_trace.h" |
@@ -157,7 +156,6 @@ xfs_cleanup(void) | |||
157 | 156 | ||
158 | xfs_cleanup_procfs(); | 157 | xfs_cleanup_procfs(); |
159 | xfs_sysctl_unregister(); | 158 | xfs_sysctl_unregister(); |
160 | xfs_refcache_destroy(); | ||
161 | xfs_filestream_uninit(); | 159 | xfs_filestream_uninit(); |
162 | xfs_mru_cache_uninit(); | 160 | xfs_mru_cache_uninit(); |
163 | xfs_acl_zone_destroy(xfs_acl_zone); | 161 | xfs_acl_zone_destroy(xfs_acl_zone); |
@@ -584,11 +582,6 @@ xfs_unmount( | |||
584 | 0 : DM_FLAGS_UNWANTED; | 582 | 0 : DM_FLAGS_UNWANTED; |
585 | } | 583 | } |
586 | #endif | 584 | #endif |
587 | /* | ||
588 | * First blow any referenced inode from this file system | ||
589 | * out of the reference cache, and delete the timer. | ||
590 | */ | ||
591 | xfs_refcache_purge_mp(mp); | ||
592 | 585 | ||
593 | /* | 586 | /* |
594 | * Blow away any referenced inode in the filestreams cache. | 587 | * Blow away any referenced inode in the filestreams cache. |
@@ -652,7 +645,6 @@ xfs_quiesce_fs( | |||
652 | { | 645 | { |
653 | int count = 0, pincount; | 646 | int count = 0, pincount; |
654 | 647 | ||
655 | xfs_refcache_purge_mp(mp); | ||
656 | xfs_flush_buftarg(mp->m_ddev_targp, 0); | 648 | xfs_flush_buftarg(mp->m_ddev_targp, 0); |
657 | xfs_finish_reclaim_all(mp, 0); | 649 | xfs_finish_reclaim_all(mp, 0); |
658 | 650 | ||
@@ -1323,18 +1315,6 @@ xfs_syncsub( | |||
1323 | } | 1315 | } |
1324 | 1316 | ||
1325 | /* | 1317 | /* |
1326 | * If this is the periodic sync, then kick some entries out of | ||
1327 | * the reference cache. This ensures that idle entries are | ||
1328 | * eventually kicked out of the cache. | ||
1329 | */ | ||
1330 | if (flags & SYNC_REFCACHE) { | ||
1331 | if (flags & SYNC_WAIT) | ||
1332 | xfs_refcache_purge_mp(mp); | ||
1333 | else | ||
1334 | xfs_refcache_purge_some(mp); | ||
1335 | } | ||
1336 | |||
1337 | /* | ||
1338 | * If asked, update the disk superblock with incore counter values if we | 1318 | * If asked, update the disk superblock with incore counter values if we |
1339 | * are using non-persistent counters so that they don't get too far out | 1319 | * are using non-persistent counters so that they don't get too far out |
1340 | * of sync if we crash or get a forced shutdown. We don't want to force | 1320 | * of sync if we crash or get a forced shutdown. We don't want to force |
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index ce82a2d0acbe..35ac59dabf8b 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include "xfs_quota.h" | 48 | #include "xfs_quota.h" |
49 | #include "xfs_utils.h" | 49 | #include "xfs_utils.h" |
50 | #include "xfs_rtalloc.h" | 50 | #include "xfs_rtalloc.h" |
51 | #include "xfs_refcache.h" | ||
52 | #include "xfs_trans_space.h" | 51 | #include "xfs_trans_space.h" |
53 | #include "xfs_log_priv.h" | 52 | #include "xfs_log_priv.h" |
54 | #include "xfs_filestream.h" | 53 | #include "xfs_filestream.h" |
@@ -1520,12 +1519,6 @@ xfs_release( | |||
1520 | xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE); | 1519 | xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE); |
1521 | } | 1520 | } |
1522 | 1521 | ||
1523 | #ifdef HAVE_REFCACHE | ||
1524 | /* If we are in the NFS reference cache then don't do this now */ | ||
1525 | if (ip->i_refcache) | ||
1526 | return 0; | ||
1527 | #endif | ||
1528 | |||
1529 | if (ip->i_d.di_nlink != 0) { | 1522 | if (ip->i_d.di_nlink != 0) { |
1530 | if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) && | 1523 | if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) && |
1531 | ((ip->i_size > 0) || (VN_CACHED(vp) > 0 || | 1524 | ((ip->i_size > 0) || (VN_CACHED(vp) > 0 || |
@@ -2449,14 +2442,6 @@ xfs_remove( | |||
2449 | } | 2442 | } |
2450 | 2443 | ||
2451 | /* | 2444 | /* |
2452 | * Before we drop our extra reference to the inode, purge it | ||
2453 | * from the refcache if it is there. By waiting until afterwards | ||
2454 | * to do the IRELE, we ensure that we won't go inactive in the | ||
2455 | * xfs_refcache_purge_ip routine (although that would be OK). | ||
2456 | */ | ||
2457 | xfs_refcache_purge_ip(ip); | ||
2458 | |||
2459 | /* | ||
2460 | * If we are using filestreams, kill the stream association. | 2445 | * If we are using filestreams, kill the stream association. |
2461 | * If the file is still open it may get a new one but that | 2446 | * If the file is still open it may get a new one but that |
2462 | * will get killed on last close in xfs_close() so we don't | 2447 | * will get killed on last close in xfs_close() so we don't |
@@ -2495,14 +2480,6 @@ xfs_remove( | |||
2495 | cancel_flags |= XFS_TRANS_ABORT; | 2480 | cancel_flags |= XFS_TRANS_ABORT; |
2496 | xfs_trans_cancel(tp, cancel_flags); | 2481 | xfs_trans_cancel(tp, cancel_flags); |
2497 | 2482 | ||
2498 | /* | ||
2499 | * Before we drop our extra reference to the inode, purge it | ||
2500 | * from the refcache if it is there. By waiting until afterwards | ||
2501 | * to do the IRELE, we ensure that we won't go inactive in the | ||
2502 | * xfs_refcache_purge_ip routine (although that would be OK). | ||
2503 | */ | ||
2504 | xfs_refcache_purge_ip(ip); | ||
2505 | |||
2506 | IRELE(ip); | 2483 | IRELE(ip); |
2507 | 2484 | ||
2508 | goto std_return; | 2485 | goto std_return; |
@@ -3460,16 +3437,7 @@ xfs_rwunlock( | |||
3460 | { | 3437 | { |
3461 | if (S_ISDIR(ip->i_d.di_mode)) | 3438 | if (S_ISDIR(ip->i_d.di_mode)) |
3462 | return; | 3439 | return; |
3463 | if (locktype == VRWLOCK_WRITE) { | 3440 | if (locktype != VRWLOCK_WRITE) { |
3464 | /* | ||
3465 | * In the write case, we may have added a new entry to | ||
3466 | * the reference cache. This might store a pointer to | ||
3467 | * an inode to be released in this inode. If it is there, | ||
3468 | * clear the pointer and release the inode after unlocking | ||
3469 | * this one. | ||
3470 | */ | ||
3471 | xfs_refcache_iunlock(ip, XFS_IOLOCK_EXCL); | ||
3472 | } else { | ||
3473 | ASSERT((locktype == VRWLOCK_READ) || | 3441 | ASSERT((locktype == VRWLOCK_READ) || |
3474 | (locktype == VRWLOCK_WRITE_DIRECT)); | 3442 | (locktype == VRWLOCK_WRITE_DIRECT)); |
3475 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | 3443 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |