diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-08-29 11:46:28 +1000 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-10-16 11:38:56 +1000 |
commit | b677c210cec0d6755335ffc01691982c417dd39e (patch) | |
tree | 9a61fdd81e48aac948346a096bed9c72e5f34114 /fs/xfs/linux-2.6/xfs_vnode.c | |
parent | 09262b4339de5417a10803fbfac277eebb38ca5a (diff) |
[XFS] move v_iocount from bhv_vnode to xfs_inode
struct bhv_vnode is on it's way out, so move the I/O count to the XFS
inode.
SGI-PV: 969608
SGI-Modid: xfs-linux-melb:xfs-kern:29497a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c index e6c559aee44..bde8d2e7f55 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.c +++ b/fs/xfs/linux-2.6/xfs_vnode.c @@ -20,6 +20,17 @@ #include "xfs_bmap_btree.h" #include "xfs_inode.h" +/* + * And this gunk is needed for xfs_mount.h" + */ +#include "xfs_log.h" +#include "xfs_trans.h" +#include "xfs_sb.h" +#include "xfs_dmapi.h" +#include "xfs_inum.h" +#include "xfs_ag.h" +#include "xfs_mount.h" + uint64_t vn_generation; /* vnode generation number */ DEFINE_SPINLOCK(vnumber_lock); @@ -42,19 +53,19 @@ vn_init(void) void vn_iowait( - bhv_vnode_t *vp) + xfs_inode_t *ip) { - wait_queue_head_t *wq = vptosync(vp); + wait_queue_head_t *wq = vptosync(ip); - wait_event(*wq, (atomic_read(&vp->v_iocount) == 0)); + wait_event(*wq, (atomic_read(&ip->i_iocount) == 0)); } void vn_iowake( - bhv_vnode_t *vp) + xfs_inode_t *ip) { - if (atomic_dec_and_test(&vp->v_iocount)) - wake_up(vptosync(vp)); + if (atomic_dec_and_test(&ip->i_iocount)) + wake_up(vptosync(ip)); } /* @@ -64,12 +75,12 @@ vn_iowake( */ void vn_ioerror( - bhv_vnode_t *vp, + xfs_inode_t *ip, int error, char *f, int l) { - bhv_vfs_t *vfsp = vfs_from_sb(vp->v_inode.i_sb); + bhv_vfs_t *vfsp = XFS_MTOVFS(ip->i_mount); if (unlikely(error == -ENODEV)) bhv_vfs_force_shutdown(vfsp, SHUTDOWN_DEVICE_REQ, f, l); @@ -92,8 +103,6 @@ vn_initialize( ASSERT(VN_CACHED(vp) == 0); - atomic_set(&vp->v_iocount, 0); - #ifdef XFS_VNODE_TRACE vp->v_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP); #endif /* XFS_VNODE_TRACE */ |