summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_vnode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-12-03 12:20:39 +0100
committerNiv Sardi <xaiki@sgi.com>2008-12-04 15:39:24 +1100
commit25e41b3d521f52771354a718042a753a3e77df0a (patch)
tree947d169a36fad5355abb9bc512a1a488bc13439c /fs/xfs/linux-2.6/xfs_vnode.c
parent583fa586f0e4a8222dd091ce971b85c1364f3d92 (diff)
downloadop-kernel-dev-25e41b3d521f52771354a718042a753a3e77df0a.zip
op-kernel-dev-25e41b3d521f52771354a718042a753a3e77df0a.tar.gz
move vn_iowait / vn_iowake into xfs_aops.c
The whole machinery to wait on I/O completion is related to the I/O path and should be there instead of in xfs_vnode.c. Also give the functions more descriptive names. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Niv Sardi <xaiki@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c
index a8cf97a..f6d1411 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.c
+++ b/fs/xfs/linux-2.6/xfs_vnode.c
@@ -32,40 +32,6 @@
#include "xfs_mount.h"
-/*
- * Dedicated vnode inactive/reclaim sync wait queues.
- * Prime number of hash buckets since address is used as the key.
- */
-#define NVSYNC 37
-#define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC])
-static wait_queue_head_t vsync[NVSYNC];
-
-void __init
-vn_init(void)
-{
- int i;
-
- for (i = 0; i < NVSYNC; i++)
- init_waitqueue_head(&vsync[i]);
-}
-
-void
-vn_iowait(
- xfs_inode_t *ip)
-{
- wait_queue_head_t *wq = vptosync(ip);
-
- wait_event(*wq, (atomic_read(&ip->i_iocount) == 0));
-}
-
-void
-vn_iowake(
- xfs_inode_t *ip)
-{
- if (atomic_dec_and_test(&ip->i_iocount))
- wake_up(vptosync(ip));
-}
-
#ifdef XFS_INODE_TRACE
#define KTRACE_ENTER(ip, vk, s, line, ra) \
OpenPOWER on IntegriCloud