diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 08:41:41 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 13:07:53 -0400 |
commit | 816724e65c72a90a44fbad0ef0b59b186c85fa90 (patch) | |
tree | 421fa29aedff988e392f92780637553e275d37a0 /fs/xfs/linux-2.6/xfs_vnode.c | |
parent | 70ac4385a13f78bc478f26d317511893741b05bd (diff) | |
parent | d384ea691fe4ea8c2dd5b9b8d9042eb181776f18 (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts:
fs/nfs/inode.c
fs/super.c
Fix conflicts between patch 'NFS: Split fs/nfs/inode.c' and patch
'VFS: Permit filesystem to override root dentry on mount'
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.c | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c index d27c25b27ccd..6628d96b6fd6 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.c +++ b/fs/xfs/linux-2.6/xfs_vnode.c | |||
@@ -39,7 +39,7 @@ vn_init(void) | |||
39 | 39 | ||
40 | void | 40 | void |
41 | vn_iowait( | 41 | vn_iowait( |
42 | struct vnode *vp) | 42 | bhv_vnode_t *vp) |
43 | { | 43 | { |
44 | wait_queue_head_t *wq = vptosync(vp); | 44 | wait_queue_head_t *wq = vptosync(vp); |
45 | 45 | ||
@@ -48,17 +48,33 @@ vn_iowait( | |||
48 | 48 | ||
49 | void | 49 | void |
50 | vn_iowake( | 50 | vn_iowake( |
51 | struct vnode *vp) | 51 | bhv_vnode_t *vp) |
52 | { | 52 | { |
53 | if (atomic_dec_and_test(&vp->v_iocount)) | 53 | if (atomic_dec_and_test(&vp->v_iocount)) |
54 | wake_up(vptosync(vp)); | 54 | wake_up(vptosync(vp)); |
55 | } | 55 | } |
56 | 56 | ||
57 | struct vnode * | 57 | /* |
58 | * Volume managers supporting multiple paths can send back ENODEV when the | ||
59 | * final path disappears. In this case continuing to fill the page cache | ||
60 | * with dirty data which cannot be written out is evil, so prevent that. | ||
61 | */ | ||
62 | void | ||
63 | vn_ioerror( | ||
64 | bhv_vnode_t *vp, | ||
65 | int error, | ||
66 | char *f, | ||
67 | int l) | ||
68 | { | ||
69 | if (unlikely(error == -ENODEV)) | ||
70 | bhv_vfs_force_shutdown(vp->v_vfsp, SHUTDOWN_DEVICE_REQ, f, l); | ||
71 | } | ||
72 | |||
73 | bhv_vnode_t * | ||
58 | vn_initialize( | 74 | vn_initialize( |
59 | struct inode *inode) | 75 | struct inode *inode) |
60 | { | 76 | { |
61 | struct vnode *vp = vn_from_inode(inode); | 77 | bhv_vnode_t *vp = vn_from_inode(inode); |
62 | 78 | ||
63 | XFS_STATS_INC(vn_active); | 79 | XFS_STATS_INC(vn_active); |
64 | XFS_STATS_INC(vn_alloc); | 80 | XFS_STATS_INC(vn_alloc); |
@@ -94,8 +110,8 @@ vn_initialize( | |||
94 | */ | 110 | */ |
95 | void | 111 | void |
96 | vn_revalidate_core( | 112 | vn_revalidate_core( |
97 | struct vnode *vp, | 113 | bhv_vnode_t *vp, |
98 | vattr_t *vap) | 114 | bhv_vattr_t *vap) |
99 | { | 115 | { |
100 | struct inode *inode = vn_to_inode(vp); | 116 | struct inode *inode = vn_to_inode(vp); |
101 | 117 | ||
@@ -130,14 +146,14 @@ vn_revalidate_core( | |||
130 | */ | 146 | */ |
131 | int | 147 | int |
132 | __vn_revalidate( | 148 | __vn_revalidate( |
133 | struct vnode *vp, | 149 | bhv_vnode_t *vp, |
134 | struct vattr *vattr) | 150 | bhv_vattr_t *vattr) |
135 | { | 151 | { |
136 | int error; | 152 | int error; |
137 | 153 | ||
138 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); | 154 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); |
139 | vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; | 155 | vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; |
140 | VOP_GETATTR(vp, vattr, 0, NULL, error); | 156 | error = bhv_vop_getattr(vp, vattr, 0, NULL); |
141 | if (likely(!error)) { | 157 | if (likely(!error)) { |
142 | vn_revalidate_core(vp, vattr); | 158 | vn_revalidate_core(vp, vattr); |
143 | VUNMODIFY(vp); | 159 | VUNMODIFY(vp); |
@@ -147,9 +163,9 @@ __vn_revalidate( | |||
147 | 163 | ||
148 | int | 164 | int |
149 | vn_revalidate( | 165 | vn_revalidate( |
150 | struct vnode *vp) | 166 | bhv_vnode_t *vp) |
151 | { | 167 | { |
152 | vattr_t vattr; | 168 | bhv_vattr_t vattr; |
153 | 169 | ||
154 | return __vn_revalidate(vp, &vattr); | 170 | return __vn_revalidate(vp, &vattr); |
155 | } | 171 | } |
@@ -157,9 +173,9 @@ vn_revalidate( | |||
157 | /* | 173 | /* |
158 | * Add a reference to a referenced vnode. | 174 | * Add a reference to a referenced vnode. |
159 | */ | 175 | */ |
160 | struct vnode * | 176 | bhv_vnode_t * |
161 | vn_hold( | 177 | vn_hold( |
162 | struct vnode *vp) | 178 | bhv_vnode_t *vp) |
163 | { | 179 | { |
164 | struct inode *inode; | 180 | struct inode *inode; |
165 | 181 | ||
@@ -192,31 +208,31 @@ vn_hold( | |||
192 | * Vnode tracing code. | 208 | * Vnode tracing code. |
193 | */ | 209 | */ |
194 | void | 210 | void |
195 | vn_trace_entry(vnode_t *vp, const char *func, inst_t *ra) | 211 | vn_trace_entry(bhv_vnode_t *vp, const char *func, inst_t *ra) |
196 | { | 212 | { |
197 | KTRACE_ENTER(vp, VNODE_KTRACE_ENTRY, func, 0, ra); | 213 | KTRACE_ENTER(vp, VNODE_KTRACE_ENTRY, func, 0, ra); |
198 | } | 214 | } |
199 | 215 | ||
200 | void | 216 | void |
201 | vn_trace_exit(vnode_t *vp, const char *func, inst_t *ra) | 217 | vn_trace_exit(bhv_vnode_t *vp, const char *func, inst_t *ra) |
202 | { | 218 | { |
203 | KTRACE_ENTER(vp, VNODE_KTRACE_EXIT, func, 0, ra); | 219 | KTRACE_ENTER(vp, VNODE_KTRACE_EXIT, func, 0, ra); |
204 | } | 220 | } |
205 | 221 | ||
206 | void | 222 | void |
207 | vn_trace_hold(vnode_t *vp, char *file, int line, inst_t *ra) | 223 | vn_trace_hold(bhv_vnode_t *vp, char *file, int line, inst_t *ra) |
208 | { | 224 | { |
209 | KTRACE_ENTER(vp, VNODE_KTRACE_HOLD, file, line, ra); | 225 | KTRACE_ENTER(vp, VNODE_KTRACE_HOLD, file, line, ra); |
210 | } | 226 | } |
211 | 227 | ||
212 | void | 228 | void |
213 | vn_trace_ref(vnode_t *vp, char *file, int line, inst_t *ra) | 229 | vn_trace_ref(bhv_vnode_t *vp, char *file, int line, inst_t *ra) |
214 | { | 230 | { |
215 | KTRACE_ENTER(vp, VNODE_KTRACE_REF, file, line, ra); | 231 | KTRACE_ENTER(vp, VNODE_KTRACE_REF, file, line, ra); |
216 | } | 232 | } |
217 | 233 | ||
218 | void | 234 | void |
219 | vn_trace_rele(vnode_t *vp, char *file, int line, inst_t *ra) | 235 | vn_trace_rele(bhv_vnode_t *vp, char *file, int line, inst_t *ra) |
220 | { | 236 | { |
221 | KTRACE_ENTER(vp, VNODE_KTRACE_RELE, file, line, ra); | 237 | KTRACE_ENTER(vp, VNODE_KTRACE_RELE, file, line, ra); |
222 | } | 238 | } |