diff options
Diffstat (limited to 'fs')
36 files changed, 496 insertions, 636 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index c0a904316854..c5ea26d73bea 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -76,7 +76,7 @@ xfs_page_trace( | |||
76 | int mask) | 76 | int mask) |
77 | { | 77 | { |
78 | xfs_inode_t *ip; | 78 | xfs_inode_t *ip; |
79 | vnode_t *vp = vn_from_inode(inode); | 79 | bhv_vnode_t *vp = vn_from_inode(inode); |
80 | loff_t isize = i_size_read(inode); | 80 | loff_t isize = i_size_read(inode); |
81 | loff_t offset = page_offset(page); | 81 | loff_t offset = page_offset(page); |
82 | int delalloc = -1, unmapped = -1, unwritten = -1; | 82 | int delalloc = -1, unmapped = -1, unwritten = -1; |
@@ -181,13 +181,12 @@ xfs_end_bio_unwritten( | |||
181 | void *data) | 181 | void *data) |
182 | { | 182 | { |
183 | xfs_ioend_t *ioend = data; | 183 | xfs_ioend_t *ioend = data; |
184 | vnode_t *vp = ioend->io_vnode; | 184 | bhv_vnode_t *vp = ioend->io_vnode; |
185 | xfs_off_t offset = ioend->io_offset; | 185 | xfs_off_t offset = ioend->io_offset; |
186 | size_t size = ioend->io_size; | 186 | size_t size = ioend->io_size; |
187 | int error; | ||
188 | 187 | ||
189 | if (likely(!ioend->io_error)) | 188 | if (likely(!ioend->io_error)) |
190 | VOP_BMAP(vp, offset, size, BMAPI_UNWRITTEN, NULL, NULL, error); | 189 | bhv_vop_bmap(vp, offset, size, BMAPI_UNWRITTEN, NULL, NULL); |
191 | xfs_destroy_ioend(ioend); | 190 | xfs_destroy_ioend(ioend); |
192 | } | 191 | } |
193 | 192 | ||
@@ -240,10 +239,10 @@ xfs_map_blocks( | |||
240 | xfs_iomap_t *mapp, | 239 | xfs_iomap_t *mapp, |
241 | int flags) | 240 | int flags) |
242 | { | 241 | { |
243 | vnode_t *vp = vn_from_inode(inode); | 242 | bhv_vnode_t *vp = vn_from_inode(inode); |
244 | int error, nmaps = 1; | 243 | int error, nmaps = 1; |
245 | 244 | ||
246 | VOP_BMAP(vp, offset, count, flags, mapp, &nmaps, error); | 245 | error = bhv_vop_bmap(vp, offset, count, flags, mapp, &nmaps); |
247 | if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE))) | 246 | if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE))) |
248 | VMODIFY(vp); | 247 | VMODIFY(vp); |
249 | return -error; | 248 | return -error; |
@@ -1162,7 +1161,7 @@ xfs_vm_writepages( | |||
1162 | struct address_space *mapping, | 1161 | struct address_space *mapping, |
1163 | struct writeback_control *wbc) | 1162 | struct writeback_control *wbc) |
1164 | { | 1163 | { |
1165 | struct vnode *vp = vn_from_inode(mapping->host); | 1164 | struct bhv_vnode *vp = vn_from_inode(mapping->host); |
1166 | 1165 | ||
1167 | if (VN_TRUNC(vp)) | 1166 | if (VN_TRUNC(vp)) |
1168 | VUNTRUNCATE(vp); | 1167 | VUNTRUNCATE(vp); |
@@ -1242,7 +1241,7 @@ __xfs_get_blocks( | |||
1242 | int direct, | 1241 | int direct, |
1243 | bmapi_flags_t flags) | 1242 | bmapi_flags_t flags) |
1244 | { | 1243 | { |
1245 | vnode_t *vp = vn_from_inode(inode); | 1244 | bhv_vnode_t *vp = vn_from_inode(inode); |
1246 | xfs_iomap_t iomap; | 1245 | xfs_iomap_t iomap; |
1247 | xfs_off_t offset; | 1246 | xfs_off_t offset; |
1248 | ssize_t size; | 1247 | ssize_t size; |
@@ -1252,8 +1251,8 @@ __xfs_get_blocks( | |||
1252 | offset = (xfs_off_t)iblock << inode->i_blkbits; | 1251 | offset = (xfs_off_t)iblock << inode->i_blkbits; |
1253 | ASSERT(bh_result->b_size >= (1 << inode->i_blkbits)); | 1252 | ASSERT(bh_result->b_size >= (1 << inode->i_blkbits)); |
1254 | size = bh_result->b_size; | 1253 | size = bh_result->b_size; |
1255 | VOP_BMAP(vp, offset, size, | 1254 | error = bhv_vop_bmap(vp, offset, size, |
1256 | create ? flags : BMAPI_READ, &iomap, &niomap, error); | 1255 | create ? flags : BMAPI_READ, &iomap, &niomap); |
1257 | if (error) | 1256 | if (error) |
1258 | return -error; | 1257 | return -error; |
1259 | if (niomap == 0) | 1258 | if (niomap == 0) |
@@ -1381,13 +1380,13 @@ xfs_vm_direct_IO( | |||
1381 | { | 1380 | { |
1382 | struct file *file = iocb->ki_filp; | 1381 | struct file *file = iocb->ki_filp; |
1383 | struct inode *inode = file->f_mapping->host; | 1382 | struct inode *inode = file->f_mapping->host; |
1384 | vnode_t *vp = vn_from_inode(inode); | 1383 | bhv_vnode_t *vp = vn_from_inode(inode); |
1385 | xfs_iomap_t iomap; | 1384 | xfs_iomap_t iomap; |
1386 | int maps = 1; | 1385 | int maps = 1; |
1387 | int error; | 1386 | int error; |
1388 | ssize_t ret; | 1387 | ssize_t ret; |
1389 | 1388 | ||
1390 | VOP_BMAP(vp, offset, 0, BMAPI_DEVICE, &iomap, &maps, error); | 1389 | error = bhv_vop_bmap(vp, offset, 0, BMAPI_DEVICE, &iomap, &maps); |
1391 | if (error) | 1390 | if (error) |
1392 | return -error; | 1391 | return -error; |
1393 | 1392 | ||
@@ -1420,14 +1419,12 @@ xfs_vm_bmap( | |||
1420 | sector_t block) | 1419 | sector_t block) |
1421 | { | 1420 | { |
1422 | struct inode *inode = (struct inode *)mapping->host; | 1421 | struct inode *inode = (struct inode *)mapping->host; |
1423 | vnode_t *vp = vn_from_inode(inode); | 1422 | bhv_vnode_t *vp = vn_from_inode(inode); |
1424 | int error; | ||
1425 | 1423 | ||
1426 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); | 1424 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); |
1427 | 1425 | bhv_vop_rwlock(vp, VRWLOCK_READ); | |
1428 | VOP_RWLOCK(vp, VRWLOCK_READ); | 1426 | bhv_vop_flush_pages(vp, (xfs_off_t)0, -1, 0, FI_REMAPF); |
1429 | VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error); | 1427 | bhv_vop_rwunlock(vp, VRWLOCK_READ); |
1430 | VOP_RWUNLOCK(vp, VRWLOCK_READ); | ||
1431 | return generic_block_bmap(mapping, block, xfs_get_blocks); | 1428 | return generic_block_bmap(mapping, block, xfs_get_blocks); |
1432 | } | 1429 | } |
1433 | 1430 | ||
diff --git a/fs/xfs/linux-2.6/xfs_aops.h b/fs/xfs/linux-2.6/xfs_aops.h index 62c1d49025fd..706d8c781b8a 100644 --- a/fs/xfs/linux-2.6/xfs_aops.h +++ b/fs/xfs/linux-2.6/xfs_aops.h | |||
@@ -32,7 +32,7 @@ typedef struct xfs_ioend { | |||
32 | unsigned int io_type; /* delalloc / unwritten */ | 32 | unsigned int io_type; /* delalloc / unwritten */ |
33 | int io_error; /* I/O error code */ | 33 | int io_error; /* I/O error code */ |
34 | atomic_t io_remaining; /* hold count */ | 34 | atomic_t io_remaining; /* hold count */ |
35 | struct vnode *io_vnode; /* file being written to */ | 35 | struct bhv_vnode *io_vnode; /* file being written to */ |
36 | struct buffer_head *io_buffer_head;/* buffer linked list head */ | 36 | struct buffer_head *io_buffer_head;/* buffer linked list head */ |
37 | struct buffer_head *io_buffer_tail;/* buffer linked list tail */ | 37 | struct buffer_head *io_buffer_tail;/* buffer linked list tail */ |
38 | size_t io_size; /* size of the extent */ | 38 | size_t io_size; /* size of the extent */ |
diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c index b5c579eeb8ef..d32a9edc43a9 100644 --- a/fs/xfs/linux-2.6/xfs_export.c +++ b/fs/xfs/linux-2.6/xfs_export.c | |||
@@ -136,7 +136,7 @@ xfs_fs_get_dentry( | |||
136 | struct super_block *sb, | 136 | struct super_block *sb, |
137 | void *data) | 137 | void *data) |
138 | { | 138 | { |
139 | vnode_t *vp; | 139 | bhv_vnode_t *vp; |
140 | struct inode *inode; | 140 | struct inode *inode; |
141 | struct dentry *result; | 141 | struct dentry *result; |
142 | bhv_vfs_t *vfsp = vfs_from_sb(sb); | 142 | bhv_vfs_t *vfsp = vfs_from_sb(sb); |
@@ -160,12 +160,12 @@ xfs_fs_get_parent( | |||
160 | struct dentry *child) | 160 | struct dentry *child) |
161 | { | 161 | { |
162 | int error; | 162 | int error; |
163 | vnode_t *vp, *cvp; | 163 | bhv_vnode_t *vp, *cvp; |
164 | struct dentry *parent; | 164 | struct dentry *parent; |
165 | 165 | ||
166 | cvp = NULL; | 166 | cvp = NULL; |
167 | vp = vn_from_inode(child->d_inode); | 167 | vp = vn_from_inode(child->d_inode); |
168 | VOP_LOOKUP(vp, &dotdot, &cvp, 0, NULL, NULL, error); | 168 | error = bhv_vop_lookup(vp, &dotdot, &cvp, 0, NULL, NULL); |
169 | if (unlikely(error)) | 169 | if (unlikely(error)) |
170 | return ERR_PTR(-error); | 170 | return ERR_PTR(-error); |
171 | 171 | ||
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 97615cc74ef5..89b1a7421357 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -58,15 +58,12 @@ __xfs_file_read( | |||
58 | { | 58 | { |
59 | struct iovec iov = {buf, count}; | 59 | struct iovec iov = {buf, count}; |
60 | struct file *file = iocb->ki_filp; | 60 | struct file *file = iocb->ki_filp; |
61 | vnode_t *vp = vn_from_inode(file->f_dentry->d_inode); | 61 | bhv_vnode_t *vp = vn_from_inode(file->f_dentry->d_inode); |
62 | ssize_t rval; | ||
63 | 62 | ||
64 | BUG_ON(iocb->ki_pos != pos); | 63 | BUG_ON(iocb->ki_pos != pos); |
65 | |||
66 | if (unlikely(file->f_flags & O_DIRECT)) | 64 | if (unlikely(file->f_flags & O_DIRECT)) |
67 | ioflags |= IO_ISDIRECT; | 65 | ioflags |= IO_ISDIRECT; |
68 | VOP_READ(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL, rval); | 66 | return bhv_vop_read(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL); |
69 | return rval; | ||
70 | } | 67 | } |
71 | 68 | ||
72 | STATIC ssize_t | 69 | STATIC ssize_t |
@@ -100,15 +97,12 @@ __xfs_file_write( | |||
100 | struct iovec iov = {(void __user *)buf, count}; | 97 | struct iovec iov = {(void __user *)buf, count}; |
101 | struct file *file = iocb->ki_filp; | 98 | struct file *file = iocb->ki_filp; |
102 | struct inode *inode = file->f_mapping->host; | 99 | struct inode *inode = file->f_mapping->host; |
103 | vnode_t *vp = vn_from_inode(inode); | 100 | bhv_vnode_t *vp = vn_from_inode(inode); |
104 | ssize_t rval; | ||
105 | 101 | ||
106 | BUG_ON(iocb->ki_pos != pos); | 102 | BUG_ON(iocb->ki_pos != pos); |
107 | if (unlikely(file->f_flags & O_DIRECT)) | 103 | if (unlikely(file->f_flags & O_DIRECT)) |
108 | ioflags |= IO_ISDIRECT; | 104 | ioflags |= IO_ISDIRECT; |
109 | 105 | return bhv_vop_write(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL); | |
110 | VOP_WRITE(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL, rval); | ||
111 | return rval; | ||
112 | } | 106 | } |
113 | 107 | ||
114 | STATIC ssize_t | 108 | STATIC ssize_t |
@@ -140,7 +134,7 @@ __xfs_file_readv( | |||
140 | loff_t *ppos) | 134 | loff_t *ppos) |
141 | { | 135 | { |
142 | struct inode *inode = file->f_mapping->host; | 136 | struct inode *inode = file->f_mapping->host; |
143 | vnode_t *vp = vn_from_inode(inode); | 137 | bhv_vnode_t *vp = vn_from_inode(inode); |
144 | struct kiocb kiocb; | 138 | struct kiocb kiocb; |
145 | ssize_t rval; | 139 | ssize_t rval; |
146 | 140 | ||
@@ -149,7 +143,8 @@ __xfs_file_readv( | |||
149 | 143 | ||
150 | if (unlikely(file->f_flags & O_DIRECT)) | 144 | if (unlikely(file->f_flags & O_DIRECT)) |
151 | ioflags |= IO_ISDIRECT; | 145 | ioflags |= IO_ISDIRECT; |
152 | VOP_READ(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos, ioflags, NULL, rval); | 146 | rval = bhv_vop_read(vp, &kiocb, iov, nr_segs, |
147 | &kiocb.ki_pos, ioflags, NULL); | ||
153 | 148 | ||
154 | *ppos = kiocb.ki_pos; | 149 | *ppos = kiocb.ki_pos; |
155 | return rval; | 150 | return rval; |
@@ -184,7 +179,7 @@ __xfs_file_writev( | |||
184 | loff_t *ppos) | 179 | loff_t *ppos) |
185 | { | 180 | { |
186 | struct inode *inode = file->f_mapping->host; | 181 | struct inode *inode = file->f_mapping->host; |
187 | vnode_t *vp = vn_from_inode(inode); | 182 | bhv_vnode_t *vp = vn_from_inode(inode); |
188 | struct kiocb kiocb; | 183 | struct kiocb kiocb; |
189 | ssize_t rval; | 184 | ssize_t rval; |
190 | 185 | ||
@@ -193,7 +188,8 @@ __xfs_file_writev( | |||
193 | if (unlikely(file->f_flags & O_DIRECT)) | 188 | if (unlikely(file->f_flags & O_DIRECT)) |
194 | ioflags |= IO_ISDIRECT; | 189 | ioflags |= IO_ISDIRECT; |
195 | 190 | ||
196 | VOP_WRITE(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos, ioflags, NULL, rval); | 191 | rval = bhv_vop_write(vp, &kiocb, iov, nr_segs, |
192 | &kiocb.ki_pos, ioflags, NULL); | ||
197 | 193 | ||
198 | *ppos = kiocb.ki_pos; | 194 | *ppos = kiocb.ki_pos; |
199 | return rval; | 195 | return rval; |
@@ -227,11 +223,8 @@ xfs_file_sendfile( | |||
227 | read_actor_t actor, | 223 | read_actor_t actor, |
228 | void *target) | 224 | void *target) |
229 | { | 225 | { |
230 | vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); | 226 | return bhv_vop_sendfile(vn_from_inode(filp->f_dentry->d_inode), |
231 | ssize_t rval; | 227 | filp, pos, 0, count, actor, target, NULL); |
232 | |||
233 | VOP_SENDFILE(vp, filp, pos, 0, count, actor, target, NULL, rval); | ||
234 | return rval; | ||
235 | } | 228 | } |
236 | 229 | ||
237 | STATIC ssize_t | 230 | STATIC ssize_t |
@@ -242,11 +235,8 @@ xfs_file_sendfile_invis( | |||
242 | read_actor_t actor, | 235 | read_actor_t actor, |
243 | void *target) | 236 | void *target) |
244 | { | 237 | { |
245 | vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); | 238 | return bhv_vop_sendfile(vn_from_inode(filp->f_dentry->d_inode), |
246 | ssize_t rval; | 239 | filp, pos, IO_INVIS, count, actor, target, NULL); |
247 | |||
248 | VOP_SENDFILE(vp, filp, pos, IO_INVIS, count, actor, target, NULL, rval); | ||
249 | return rval; | ||
250 | } | 240 | } |
251 | 241 | ||
252 | STATIC ssize_t | 242 | STATIC ssize_t |
@@ -257,11 +247,8 @@ xfs_file_splice_read( | |||
257 | size_t len, | 247 | size_t len, |
258 | unsigned int flags) | 248 | unsigned int flags) |
259 | { | 249 | { |
260 | vnode_t *vp = vn_from_inode(infilp->f_dentry->d_inode); | 250 | return bhv_vop_splice_read(vn_from_inode(infilp->f_dentry->d_inode), |
261 | ssize_t rval; | 251 | infilp, ppos, pipe, len, flags, 0, NULL); |
262 | |||
263 | VOP_SPLICE_READ(vp, infilp, ppos, pipe, len, flags, 0, NULL, rval); | ||
264 | return rval; | ||
265 | } | 252 | } |
266 | 253 | ||
267 | STATIC ssize_t | 254 | STATIC ssize_t |
@@ -272,11 +259,9 @@ xfs_file_splice_read_invis( | |||
272 | size_t len, | 259 | size_t len, |
273 | unsigned int flags) | 260 | unsigned int flags) |
274 | { | 261 | { |
275 | vnode_t *vp = vn_from_inode(infilp->f_dentry->d_inode); | 262 | return bhv_vop_splice_read(vn_from_inode(infilp->f_dentry->d_inode), |
276 | ssize_t rval; | 263 | infilp, ppos, pipe, len, flags, IO_INVIS, |
277 | 264 | NULL); | |
278 | VOP_SPLICE_READ(vp, infilp, ppos, pipe, len, flags, IO_INVIS, NULL, rval); | ||
279 | return rval; | ||
280 | } | 265 | } |
281 | 266 | ||
282 | STATIC ssize_t | 267 | STATIC ssize_t |
@@ -287,11 +272,8 @@ xfs_file_splice_write( | |||
287 | size_t len, | 272 | size_t len, |
288 | unsigned int flags) | 273 | unsigned int flags) |
289 | { | 274 | { |
290 | vnode_t *vp = vn_from_inode(outfilp->f_dentry->d_inode); | 275 | return bhv_vop_splice_write(vn_from_inode(outfilp->f_dentry->d_inode), |
291 | ssize_t rval; | 276 | pipe, outfilp, ppos, len, flags, 0, NULL); |
292 | |||
293 | VOP_SPLICE_WRITE(vp, pipe, outfilp, ppos, len, flags, 0, NULL, rval); | ||
294 | return rval; | ||
295 | } | 277 | } |
296 | 278 | ||
297 | STATIC ssize_t | 279 | STATIC ssize_t |
@@ -302,11 +284,9 @@ xfs_file_splice_write_invis( | |||
302 | size_t len, | 284 | size_t len, |
303 | unsigned int flags) | 285 | unsigned int flags) |
304 | { | 286 | { |
305 | vnode_t *vp = vn_from_inode(outfilp->f_dentry->d_inode); | 287 | return bhv_vop_splice_write(vn_from_inode(outfilp->f_dentry->d_inode), |
306 | ssize_t rval; | 288 | pipe, outfilp, ppos, len, flags, IO_INVIS, |
307 | 289 | NULL); | |
308 | VOP_SPLICE_WRITE(vp, pipe, outfilp, ppos, len, flags, IO_INVIS, NULL, rval); | ||
309 | return rval; | ||
310 | } | 290 | } |
311 | 291 | ||
312 | STATIC int | 292 | STATIC int |
@@ -314,24 +294,17 @@ xfs_file_open( | |||
314 | struct inode *inode, | 294 | struct inode *inode, |
315 | struct file *filp) | 295 | struct file *filp) |
316 | { | 296 | { |
317 | vnode_t *vp = vn_from_inode(inode); | ||
318 | int error; | ||
319 | |||
320 | if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS) | 297 | if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS) |
321 | return -EFBIG; | 298 | return -EFBIG; |
322 | VOP_OPEN(vp, NULL, error); | 299 | return -bhv_vop_open(vn_from_inode(inode), NULL); |
323 | return -error; | ||
324 | } | 300 | } |
325 | 301 | ||
326 | STATIC int | 302 | STATIC int |
327 | xfs_file_close( | 303 | xfs_file_close( |
328 | struct file *filp) | 304 | struct file *filp) |
329 | { | 305 | { |
330 | vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); | 306 | return -bhv_vop_close(vn_from_inode(filp->f_dentry->d_inode), 0, |
331 | int error; | 307 | file_count(filp) > 1 ? L_FALSE : L_TRUE, NULL); |
332 | |||
333 | VOP_CLOSE(vp, 0, file_count(filp) > 1 ? L_FALSE : L_TRUE, NULL, error); | ||
334 | return -error; | ||
335 | } | 308 | } |
336 | 309 | ||
337 | STATIC int | 310 | STATIC int |
@@ -339,12 +312,11 @@ xfs_file_release( | |||
339 | struct inode *inode, | 312 | struct inode *inode, |
340 | struct file *filp) | 313 | struct file *filp) |
341 | { | 314 | { |
342 | vnode_t *vp = vn_from_inode(inode); | 315 | bhv_vnode_t *vp = vn_from_inode(inode); |
343 | int error = 0; | ||
344 | 316 | ||
345 | if (vp) | 317 | if (vp) |
346 | VOP_RELEASE(vp, error); | 318 | return -bhv_vop_release(vp); |
347 | return -error; | 319 | return 0; |
348 | } | 320 | } |
349 | 321 | ||
350 | STATIC int | 322 | STATIC int |
@@ -353,17 +325,14 @@ xfs_file_fsync( | |||
353 | struct dentry *dentry, | 325 | struct dentry *dentry, |
354 | int datasync) | 326 | int datasync) |
355 | { | 327 | { |
356 | struct inode *inode = dentry->d_inode; | 328 | bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); |
357 | vnode_t *vp = vn_from_inode(inode); | ||
358 | int error; | ||
359 | int flags = FSYNC_WAIT; | 329 | int flags = FSYNC_WAIT; |
360 | 330 | ||
361 | if (datasync) | 331 | if (datasync) |
362 | flags |= FSYNC_DATA; | 332 | flags |= FSYNC_DATA; |
363 | if (VN_TRUNC(vp)) | 333 | if (VN_TRUNC(vp)) |
364 | VUNTRUNCATE(vp); | 334 | VUNTRUNCATE(vp); |
365 | VOP_FSYNC(vp, flags, NULL, (xfs_off_t)0, (xfs_off_t)-1, error); | 335 | return -bhv_vop_fsync(vp, flags, NULL, (xfs_off_t)0, (xfs_off_t)-1); |
366 | return -error; | ||
367 | } | 336 | } |
368 | 337 | ||
369 | #ifdef CONFIG_XFS_DMAPI | 338 | #ifdef CONFIG_XFS_DMAPI |
@@ -374,7 +343,7 @@ xfs_vm_nopage( | |||
374 | int *type) | 343 | int *type) |
375 | { | 344 | { |
376 | struct inode *inode = area->vm_file->f_dentry->d_inode; | 345 | struct inode *inode = area->vm_file->f_dentry->d_inode; |
377 | vnode_t *vp = vn_from_inode(inode); | 346 | bhv_vnode_t *vp = vn_from_inode(inode); |
378 | 347 | ||
379 | ASSERT_ALWAYS(vp->v_vfsp->vfs_flag & VFS_DMI); | 348 | ASSERT_ALWAYS(vp->v_vfsp->vfs_flag & VFS_DMI); |
380 | if (XFS_SEND_MMAP(XFS_VFSTOM(vp->v_vfsp), area, 0)) | 349 | if (XFS_SEND_MMAP(XFS_VFSTOM(vp->v_vfsp), area, 0)) |
@@ -390,7 +359,7 @@ xfs_file_readdir( | |||
390 | filldir_t filldir) | 359 | filldir_t filldir) |
391 | { | 360 | { |
392 | int error = 0; | 361 | int error = 0; |
393 | vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); | 362 | bhv_vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); |
394 | uio_t uio; | 363 | uio_t uio; |
395 | iovec_t iov; | 364 | iovec_t iov; |
396 | int eof = 0; | 365 | int eof = 0; |
@@ -425,7 +394,7 @@ xfs_file_readdir( | |||
425 | 394 | ||
426 | start_offset = uio.uio_offset; | 395 | start_offset = uio.uio_offset; |
427 | 396 | ||
428 | VOP_READDIR(vp, &uio, NULL, &eof, error); | 397 | error = bhv_vop_readdir(vp, &uio, NULL, &eof); |
429 | if ((uio.uio_offset == start_offset) || error) { | 398 | if ((uio.uio_offset == start_offset) || error) { |
430 | size = 0; | 399 | size = 0; |
431 | break; | 400 | break; |
@@ -475,18 +444,17 @@ xfs_file_mmap( | |||
475 | return 0; | 444 | return 0; |
476 | } | 445 | } |
477 | 446 | ||
478 | |||
479 | STATIC long | 447 | STATIC long |
480 | xfs_file_ioctl( | 448 | xfs_file_ioctl( |
481 | struct file *filp, | 449 | struct file *filp, |
482 | unsigned int cmd, | 450 | unsigned int cmd, |
483 | unsigned long arg) | 451 | unsigned long p) |
484 | { | 452 | { |
485 | int error; | 453 | int error; |
486 | struct inode *inode = filp->f_dentry->d_inode; | 454 | struct inode *inode = filp->f_dentry->d_inode; |
487 | vnode_t *vp = vn_from_inode(inode); | 455 | bhv_vnode_t *vp = vn_from_inode(inode); |
488 | 456 | ||
489 | VOP_IOCTL(vp, inode, filp, 0, cmd, (void __user *)arg, error); | 457 | error = bhv_vop_ioctl(vp, inode, filp, 0, cmd, (void __user *)p); |
490 | VMODIFY(vp); | 458 | VMODIFY(vp); |
491 | 459 | ||
492 | /* NOTE: some of the ioctl's return positive #'s as a | 460 | /* NOTE: some of the ioctl's return positive #'s as a |
@@ -502,13 +470,13 @@ STATIC long | |||
502 | xfs_file_ioctl_invis( | 470 | xfs_file_ioctl_invis( |
503 | struct file *filp, | 471 | struct file *filp, |
504 | unsigned int cmd, | 472 | unsigned int cmd, |
505 | unsigned long arg) | 473 | unsigned long p) |
506 | { | 474 | { |
507 | struct inode *inode = filp->f_dentry->d_inode; | ||
508 | vnode_t *vp = vn_from_inode(inode); | ||
509 | int error; | 475 | int error; |
476 | struct inode *inode = filp->f_dentry->d_inode; | ||
477 | bhv_vnode_t *vp = vn_from_inode(inode); | ||
510 | 478 | ||
511 | VOP_IOCTL(vp, inode, filp, IO_INVIS, cmd, (void __user *)arg, error); | 479 | error = bhv_vop_ioctl(vp, inode, filp, IO_INVIS, cmd, (void __user *)p); |
512 | VMODIFY(vp); | 480 | VMODIFY(vp); |
513 | 481 | ||
514 | /* NOTE: some of the ioctl's return positive #'s as a | 482 | /* NOTE: some of the ioctl's return positive #'s as a |
@@ -527,7 +495,7 @@ xfs_vm_mprotect( | |||
527 | struct vm_area_struct *vma, | 495 | struct vm_area_struct *vma, |
528 | unsigned int newflags) | 496 | unsigned int newflags) |
529 | { | 497 | { |
530 | vnode_t *vp = vn_from_inode(vma->vm_file->f_dentry->d_inode); | 498 | bhv_vnode_t *vp = vn_from_inode(vma->vm_file->f_dentry->d_inode); |
531 | int error = 0; | 499 | int error = 0; |
532 | 500 | ||
533 | if (vp->v_vfsp->vfs_flag & VFS_DMI) { | 501 | if (vp->v_vfsp->vfs_flag & VFS_DMI) { |
@@ -553,7 +521,7 @@ STATIC int | |||
553 | xfs_file_open_exec( | 521 | xfs_file_open_exec( |
554 | struct inode *inode) | 522 | struct inode *inode) |
555 | { | 523 | { |
556 | vnode_t *vp = vn_from_inode(inode); | 524 | bhv_vnode_t *vp = vn_from_inode(inode); |
557 | xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); | 525 | xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); |
558 | int error = 0; | 526 | int error = 0; |
559 | xfs_inode_t *ip; | 527 | xfs_inode_t *ip; |
diff --git a/fs/xfs/linux-2.6/xfs_fs_subr.c b/fs/xfs/linux-2.6/xfs_fs_subr.c index f0c56daf4d6d..dc0562828e76 100644 --- a/fs/xfs/linux-2.6/xfs_fs_subr.c +++ b/fs/xfs/linux-2.6/xfs_fs_subr.c | |||
@@ -28,7 +28,7 @@ fs_tosspages( | |||
28 | xfs_off_t last, | 28 | xfs_off_t last, |
29 | int fiopt) | 29 | int fiopt) |
30 | { | 30 | { |
31 | vnode_t *vp = BHV_TO_VNODE(bdp); | 31 | bhv_vnode_t *vp = BHV_TO_VNODE(bdp); |
32 | struct inode *ip = vn_to_inode(vp); | 32 | struct inode *ip = vn_to_inode(vp); |
33 | 33 | ||
34 | if (VN_CACHED(vp)) | 34 | if (VN_CACHED(vp)) |
@@ -42,7 +42,7 @@ fs_flushinval_pages( | |||
42 | xfs_off_t last, | 42 | xfs_off_t last, |
43 | int fiopt) | 43 | int fiopt) |
44 | { | 44 | { |
45 | vnode_t *vp = BHV_TO_VNODE(bdp); | 45 | bhv_vnode_t *vp = BHV_TO_VNODE(bdp); |
46 | struct inode *ip = vn_to_inode(vp); | 46 | struct inode *ip = vn_to_inode(vp); |
47 | 47 | ||
48 | if (VN_CACHED(vp)) { | 48 | if (VN_CACHED(vp)) { |
@@ -61,7 +61,7 @@ fs_flush_pages( | |||
61 | uint64_t flags, | 61 | uint64_t flags, |
62 | int fiopt) | 62 | int fiopt) |
63 | { | 63 | { |
64 | vnode_t *vp = BHV_TO_VNODE(bdp); | 64 | bhv_vnode_t *vp = BHV_TO_VNODE(bdp); |
65 | struct inode *ip = vn_to_inode(vp); | 65 | struct inode *ip = vn_to_inode(vp); |
66 | 66 | ||
67 | if (VN_DIRTY(vp)) { | 67 | if (VN_DIRTY(vp)) { |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 84478491609b..73182503c16e 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -78,7 +78,7 @@ xfs_find_handle( | |||
78 | xfs_handle_t handle; | 78 | xfs_handle_t handle; |
79 | xfs_fsop_handlereq_t hreq; | 79 | xfs_fsop_handlereq_t hreq; |
80 | struct inode *inode; | 80 | struct inode *inode; |
81 | struct vnode *vp; | 81 | bhv_vnode_t *vp; |
82 | 82 | ||
83 | if (copy_from_user(&hreq, arg, sizeof(hreq))) | 83 | if (copy_from_user(&hreq, arg, sizeof(hreq))) |
84 | return -XFS_ERROR(EFAULT); | 84 | return -XFS_ERROR(EFAULT); |
@@ -192,7 +192,7 @@ xfs_vget_fsop_handlereq( | |||
192 | xfs_mount_t *mp, | 192 | xfs_mount_t *mp, |
193 | struct inode *parinode, /* parent inode pointer */ | 193 | struct inode *parinode, /* parent inode pointer */ |
194 | xfs_fsop_handlereq_t *hreq, | 194 | xfs_fsop_handlereq_t *hreq, |
195 | vnode_t **vp, | 195 | bhv_vnode_t **vp, |
196 | struct inode **inode) | 196 | struct inode **inode) |
197 | { | 197 | { |
198 | void __user *hanp; | 198 | void __user *hanp; |
@@ -202,7 +202,7 @@ xfs_vget_fsop_handlereq( | |||
202 | xfs_handle_t handle; | 202 | xfs_handle_t handle; |
203 | xfs_inode_t *ip; | 203 | xfs_inode_t *ip; |
204 | struct inode *inodep; | 204 | struct inode *inodep; |
205 | vnode_t *vpp; | 205 | bhv_vnode_t *vpp; |
206 | xfs_ino_t ino; | 206 | xfs_ino_t ino; |
207 | __u32 igen; | 207 | __u32 igen; |
208 | int error; | 208 | int error; |
@@ -277,7 +277,7 @@ xfs_open_by_handle( | |||
277 | struct file *filp; | 277 | struct file *filp; |
278 | struct inode *inode; | 278 | struct inode *inode; |
279 | struct dentry *dentry; | 279 | struct dentry *dentry; |
280 | vnode_t *vp; | 280 | bhv_vnode_t *vp; |
281 | xfs_fsop_handlereq_t hreq; | 281 | xfs_fsop_handlereq_t hreq; |
282 | 282 | ||
283 | if (!capable(CAP_SYS_ADMIN)) | 283 | if (!capable(CAP_SYS_ADMIN)) |
@@ -362,7 +362,7 @@ xfs_readlink_by_handle( | |||
362 | struct uio auio; | 362 | struct uio auio; |
363 | struct inode *inode; | 363 | struct inode *inode; |
364 | xfs_fsop_handlereq_t hreq; | 364 | xfs_fsop_handlereq_t hreq; |
365 | vnode_t *vp; | 365 | bhv_vnode_t *vp; |
366 | __u32 olen; | 366 | __u32 olen; |
367 | 367 | ||
368 | if (!capable(CAP_SYS_ADMIN)) | 368 | if (!capable(CAP_SYS_ADMIN)) |
@@ -393,9 +393,11 @@ xfs_readlink_by_handle( | |||
393 | auio.uio_segflg = UIO_USERSPACE; | 393 | auio.uio_segflg = UIO_USERSPACE; |
394 | auio.uio_resid = olen; | 394 | auio.uio_resid = olen; |
395 | 395 | ||
396 | VOP_READLINK(vp, &auio, IO_INVIS, NULL, error); | 396 | error = bhv_vop_readlink(vp, &auio, IO_INVIS, NULL); |
397 | |||
398 | VN_RELE(vp); | 397 | VN_RELE(vp); |
398 | if (error) | ||
399 | return -error; | ||
400 | |||
399 | return (olen - auio.uio_resid); | 401 | return (olen - auio.uio_resid); |
400 | } | 402 | } |
401 | 403 | ||
@@ -411,7 +413,7 @@ xfs_fssetdm_by_handle( | |||
411 | xfs_fsop_setdm_handlereq_t dmhreq; | 413 | xfs_fsop_setdm_handlereq_t dmhreq; |
412 | struct inode *inode; | 414 | struct inode *inode; |
413 | bhv_desc_t *bdp; | 415 | bhv_desc_t *bdp; |
414 | vnode_t *vp; | 416 | bhv_vnode_t *vp; |
415 | 417 | ||
416 | if (!capable(CAP_MKNOD)) | 418 | if (!capable(CAP_MKNOD)) |
417 | return -XFS_ERROR(EPERM); | 419 | return -XFS_ERROR(EPERM); |
@@ -452,7 +454,7 @@ xfs_attrlist_by_handle( | |||
452 | attrlist_cursor_kern_t *cursor; | 454 | attrlist_cursor_kern_t *cursor; |
453 | xfs_fsop_attrlist_handlereq_t al_hreq; | 455 | xfs_fsop_attrlist_handlereq_t al_hreq; |
454 | struct inode *inode; | 456 | struct inode *inode; |
455 | vnode_t *vp; | 457 | bhv_vnode_t *vp; |
456 | char *kbuf; | 458 | char *kbuf; |
457 | 459 | ||
458 | if (!capable(CAP_SYS_ADMIN)) | 460 | if (!capable(CAP_SYS_ADMIN)) |
@@ -472,8 +474,8 @@ xfs_attrlist_by_handle( | |||
472 | goto out_vn_rele; | 474 | goto out_vn_rele; |
473 | 475 | ||
474 | cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; | 476 | cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; |
475 | VOP_ATTR_LIST(vp, kbuf, al_hreq.buflen, al_hreq.flags, | 477 | error = bhv_vop_attr_list(vp, kbuf, al_hreq.buflen, al_hreq.flags, |
476 | cursor, NULL, error); | 478 | cursor, NULL); |
477 | if (error) | 479 | if (error) |
478 | goto out_kfree; | 480 | goto out_kfree; |
479 | 481 | ||
@@ -490,7 +492,7 @@ xfs_attrlist_by_handle( | |||
490 | 492 | ||
491 | STATIC int | 493 | STATIC int |
492 | xfs_attrmulti_attr_get( | 494 | xfs_attrmulti_attr_get( |
493 | struct vnode *vp, | 495 | bhv_vnode_t *vp, |
494 | char *name, | 496 | char *name, |
495 | char __user *ubuf, | 497 | char __user *ubuf, |
496 | __uint32_t *len, | 498 | __uint32_t *len, |
@@ -505,7 +507,7 @@ xfs_attrmulti_attr_get( | |||
505 | if (!kbuf) | 507 | if (!kbuf) |
506 | return ENOMEM; | 508 | return ENOMEM; |
507 | 509 | ||
508 | VOP_ATTR_GET(vp, name, kbuf, len, flags, NULL, error); | 510 | error = bhv_vop_attr_get(vp, name, kbuf, len, flags, NULL); |
509 | if (error) | 511 | if (error) |
510 | goto out_kfree; | 512 | goto out_kfree; |
511 | 513 | ||
@@ -519,7 +521,7 @@ xfs_attrmulti_attr_get( | |||
519 | 521 | ||
520 | STATIC int | 522 | STATIC int |
521 | xfs_attrmulti_attr_set( | 523 | xfs_attrmulti_attr_set( |
522 | struct vnode *vp, | 524 | bhv_vnode_t *vp, |
523 | char *name, | 525 | char *name, |
524 | const char __user *ubuf, | 526 | const char __user *ubuf, |
525 | __uint32_t len, | 527 | __uint32_t len, |
@@ -542,7 +544,7 @@ xfs_attrmulti_attr_set( | |||
542 | if (copy_from_user(kbuf, ubuf, len)) | 544 | if (copy_from_user(kbuf, ubuf, len)) |
543 | goto out_kfree; | 545 | goto out_kfree; |
544 | 546 | ||
545 | VOP_ATTR_SET(vp, name, kbuf, len, flags, NULL, error); | 547 | error = bhv_vop_attr_set(vp, name, kbuf, len, flags, NULL); |
546 | 548 | ||
547 | out_kfree: | 549 | out_kfree: |
548 | kfree(kbuf); | 550 | kfree(kbuf); |
@@ -551,20 +553,15 @@ xfs_attrmulti_attr_set( | |||
551 | 553 | ||
552 | STATIC int | 554 | STATIC int |
553 | xfs_attrmulti_attr_remove( | 555 | xfs_attrmulti_attr_remove( |
554 | struct vnode *vp, | 556 | bhv_vnode_t *vp, |
555 | char *name, | 557 | char *name, |
556 | __uint32_t flags) | 558 | __uint32_t flags) |
557 | { | 559 | { |
558 | int error; | ||
559 | |||
560 | |||
561 | if (IS_RDONLY(&vp->v_inode)) | 560 | if (IS_RDONLY(&vp->v_inode)) |
562 | return -EROFS; | 561 | return -EROFS; |
563 | if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) | 562 | if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) |
564 | return EPERM; | 563 | return EPERM; |
565 | 564 | return bhv_vop_attr_remove(vp, name, flags, NULL); | |
566 | VOP_ATTR_REMOVE(vp, name, flags, NULL, error); | ||
567 | return error; | ||
568 | } | 565 | } |
569 | 566 | ||
570 | STATIC int | 567 | STATIC int |
@@ -578,7 +575,7 @@ xfs_attrmulti_by_handle( | |||
578 | xfs_attr_multiop_t *ops; | 575 | xfs_attr_multiop_t *ops; |
579 | xfs_fsop_attrmulti_handlereq_t am_hreq; | 576 | xfs_fsop_attrmulti_handlereq_t am_hreq; |
580 | struct inode *inode; | 577 | struct inode *inode; |
581 | vnode_t *vp; | 578 | bhv_vnode_t *vp; |
582 | unsigned int i, size; | 579 | unsigned int i, size; |
583 | char *attr_name; | 580 | char *attr_name; |
584 | 581 | ||
@@ -658,7 +655,7 @@ xfs_attrmulti_by_handle( | |||
658 | STATIC int | 655 | STATIC int |
659 | xfs_ioc_space( | 656 | xfs_ioc_space( |
660 | bhv_desc_t *bdp, | 657 | bhv_desc_t *bdp, |
661 | vnode_t *vp, | 658 | bhv_vnode_t *vp, |
662 | struct file *filp, | 659 | struct file *filp, |
663 | int flags, | 660 | int flags, |
664 | unsigned int cmd, | 661 | unsigned int cmd, |
@@ -682,7 +679,7 @@ xfs_ioc_fsgeometry( | |||
682 | 679 | ||
683 | STATIC int | 680 | STATIC int |
684 | xfs_ioc_xattr( | 681 | xfs_ioc_xattr( |
685 | vnode_t *vp, | 682 | bhv_vnode_t *vp, |
686 | xfs_inode_t *ip, | 683 | xfs_inode_t *ip, |
687 | struct file *filp, | 684 | struct file *filp, |
688 | unsigned int cmd, | 685 | unsigned int cmd, |
@@ -711,7 +708,7 @@ xfs_ioctl( | |||
711 | void __user *arg) | 708 | void __user *arg) |
712 | { | 709 | { |
713 | int error; | 710 | int error; |
714 | vnode_t *vp; | 711 | bhv_vnode_t *vp; |
715 | xfs_inode_t *ip; | 712 | xfs_inode_t *ip; |
716 | xfs_mount_t *mp; | 713 | xfs_mount_t *mp; |
717 | 714 | ||
@@ -962,7 +959,7 @@ xfs_ioctl( | |||
962 | STATIC int | 959 | STATIC int |
963 | xfs_ioc_space( | 960 | xfs_ioc_space( |
964 | bhv_desc_t *bdp, | 961 | bhv_desc_t *bdp, |
965 | vnode_t *vp, | 962 | bhv_vnode_t *vp, |
966 | struct file *filp, | 963 | struct file *filp, |
967 | int ioflags, | 964 | int ioflags, |
968 | unsigned int cmd, | 965 | unsigned int cmd, |
@@ -1153,7 +1150,7 @@ xfs_di2lxflags( | |||
1153 | 1150 | ||
1154 | STATIC int | 1151 | STATIC int |
1155 | xfs_ioc_xattr( | 1152 | xfs_ioc_xattr( |
1156 | vnode_t *vp, | 1153 | bhv_vnode_t *vp, |
1157 | xfs_inode_t *ip, | 1154 | xfs_inode_t *ip, |
1158 | struct file *filp, | 1155 | struct file *filp, |
1159 | unsigned int cmd, | 1156 | unsigned int cmd, |
@@ -1173,7 +1170,7 @@ xfs_ioc_xattr( | |||
1173 | case XFS_IOC_FSGETXATTR: { | 1170 | case XFS_IOC_FSGETXATTR: { |
1174 | vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ | 1171 | vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ |
1175 | XFS_AT_NEXTENTS | XFS_AT_PROJID; | 1172 | XFS_AT_NEXTENTS | XFS_AT_PROJID; |
1176 | VOP_GETATTR(vp, vattr, 0, NULL, error); | 1173 | error = bhv_vop_getattr(vp, vattr, 0, NULL); |
1177 | if (unlikely(error)) { | 1174 | if (unlikely(error)) { |
1178 | error = -error; | 1175 | error = -error; |
1179 | break; | 1176 | break; |
@@ -1206,7 +1203,7 @@ xfs_ioc_xattr( | |||
1206 | vattr->va_extsize = fa.fsx_extsize; | 1203 | vattr->va_extsize = fa.fsx_extsize; |
1207 | vattr->va_projid = fa.fsx_projid; | 1204 | vattr->va_projid = fa.fsx_projid; |
1208 | 1205 | ||
1209 | VOP_SETATTR(vp, vattr, attr_flags, NULL, error); | 1206 | error = bhv_vop_setattr(vp, vattr, attr_flags, NULL); |
1210 | if (likely(!error)) | 1207 | if (likely(!error)) |
1211 | __vn_revalidate(vp, vattr); /* update flags */ | 1208 | __vn_revalidate(vp, vattr); /* update flags */ |
1212 | error = -error; | 1209 | error = -error; |
@@ -1216,7 +1213,7 @@ xfs_ioc_xattr( | |||
1216 | case XFS_IOC_FSGETXATTRA: { | 1213 | case XFS_IOC_FSGETXATTRA: { |
1217 | vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ | 1214 | vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ |
1218 | XFS_AT_ANEXTENTS | XFS_AT_PROJID; | 1215 | XFS_AT_ANEXTENTS | XFS_AT_PROJID; |
1219 | VOP_GETATTR(vp, vattr, 0, NULL, error); | 1216 | error = bhv_vop_getattr(vp, vattr, 0, NULL); |
1220 | if (unlikely(error)) { | 1217 | if (unlikely(error)) { |
1221 | error = -error; | 1218 | error = -error; |
1222 | break; | 1219 | break; |
@@ -1262,7 +1259,7 @@ xfs_ioc_xattr( | |||
1262 | vattr->va_xflags = xfs_merge_ioc_xflags(flags, | 1259 | vattr->va_xflags = xfs_merge_ioc_xflags(flags, |
1263 | xfs_ip2xflags(ip)); | 1260 | xfs_ip2xflags(ip)); |
1264 | 1261 | ||
1265 | VOP_SETATTR(vp, vattr, attr_flags, NULL, error); | 1262 | error = bhv_vop_setattr(vp, vattr, attr_flags, NULL); |
1266 | if (likely(!error)) | 1263 | if (likely(!error)) |
1267 | __vn_revalidate(vp, vattr); /* update flags */ | 1264 | __vn_revalidate(vp, vattr); /* update flags */ |
1268 | error = -error; | 1265 | error = -error; |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index 251bfe451a3f..601f01c92f7f 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c | |||
@@ -114,7 +114,7 @@ xfs_compat_ioctl( | |||
114 | unsigned long arg) | 114 | unsigned long arg) |
115 | { | 115 | { |
116 | struct inode *inode = file->f_dentry->d_inode; | 116 | struct inode *inode = file->f_dentry->d_inode; |
117 | vnode_t *vp = vn_from_inode(inode); | 117 | bhv_vnode_t *vp = vn_from_inode(inode); |
118 | int error; | 118 | int error; |
119 | 119 | ||
120 | switch (cmd) { | 120 | switch (cmd) { |
@@ -193,7 +193,7 @@ xfs_compat_ioctl( | |||
193 | return -ENOIOCTLCMD; | 193 | return -ENOIOCTLCMD; |
194 | } | 194 | } |
195 | 195 | ||
196 | VOP_IOCTL(vp, inode, file, mode, cmd, (void __user *)arg, error); | 196 | error = bhv_vop_ioctl(vp, inode, file, mode, cmd, (void __user *)arg); |
197 | VMODIFY(vp); | 197 | VMODIFY(vp); |
198 | 198 | ||
199 | return error; | 199 | return error; |
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 0da1d6b081e7..0857658882e0 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -61,7 +61,7 @@ | |||
61 | */ | 61 | */ |
62 | xfs_inode_t * | 62 | xfs_inode_t * |
63 | xfs_vtoi( | 63 | xfs_vtoi( |
64 | struct vnode *vp) | 64 | bhv_vnode_t *vp) |
65 | { | 65 | { |
66 | bhv_desc_t *bdp; | 66 | bhv_desc_t *bdp; |
67 | 67 | ||
@@ -80,7 +80,7 @@ void | |||
80 | xfs_synchronize_atime( | 80 | xfs_synchronize_atime( |
81 | xfs_inode_t *ip) | 81 | xfs_inode_t *ip) |
82 | { | 82 | { |
83 | vnode_t *vp; | 83 | bhv_vnode_t *vp; |
84 | 84 | ||
85 | vp = XFS_ITOV_NULL(ip); | 85 | vp = XFS_ITOV_NULL(ip); |
86 | if (vp) { | 86 | if (vp) { |
@@ -202,12 +202,8 @@ xfs_validate_fields( | |||
202 | struct inode *ip, | 202 | struct inode *ip, |
203 | struct vattr *vattr) | 203 | struct vattr *vattr) |
204 | { | 204 | { |
205 | vnode_t *vp = vn_from_inode(ip); | ||
206 | int error; | ||
207 | |||
208 | vattr->va_mask = XFS_AT_NLINK|XFS_AT_SIZE|XFS_AT_NBLOCKS; | 205 | vattr->va_mask = XFS_AT_NLINK|XFS_AT_SIZE|XFS_AT_NBLOCKS; |
209 | VOP_GETATTR(vp, vattr, ATTR_LAZY, NULL, error); | 206 | if (!bhv_vop_getattr(vn_from_inode(ip), vattr, ATTR_LAZY, NULL)) { |
210 | if (likely(!error)) { | ||
211 | ip->i_nlink = vattr->va_nlink; | 207 | ip->i_nlink = vattr->va_nlink; |
212 | ip->i_blocks = vattr->va_nblocks; | 208 | ip->i_blocks = vattr->va_nblocks; |
213 | 209 | ||
@@ -225,7 +221,7 @@ xfs_validate_fields( | |||
225 | */ | 221 | */ |
226 | STATIC int | 222 | STATIC int |
227 | xfs_init_security( | 223 | xfs_init_security( |
228 | struct vnode *vp, | 224 | bhv_vnode_t *vp, |
229 | struct inode *dir) | 225 | struct inode *dir) |
230 | { | 226 | { |
231 | struct inode *ip = vn_to_inode(vp); | 227 | struct inode *ip = vn_to_inode(vp); |
@@ -241,7 +237,7 @@ xfs_init_security( | |||
241 | return -error; | 237 | return -error; |
242 | } | 238 | } |
243 | 239 | ||
244 | VOP_ATTR_SET(vp, name, value, length, ATTR_SECURE, NULL, error); | 240 | error = bhv_vop_attr_set(vp, name, value, length, ATTR_SECURE, NULL); |
245 | if (!error) | 241 | if (!error) |
246 | VMODIFY(vp); | 242 | VMODIFY(vp); |
247 | 243 | ||
@@ -264,13 +260,12 @@ xfs_has_fs_struct(struct task_struct *task) | |||
264 | 260 | ||
265 | STATIC inline void | 261 | STATIC inline void |
266 | xfs_cleanup_inode( | 262 | xfs_cleanup_inode( |
267 | vnode_t *dvp, | 263 | bhv_vnode_t *dvp, |
268 | vnode_t *vp, | 264 | bhv_vnode_t *vp, |
269 | struct dentry *dentry, | 265 | struct dentry *dentry, |
270 | int mode) | 266 | int mode) |
271 | { | 267 | { |
272 | struct dentry teardown = {}; | 268 | struct dentry teardown = {}; |
273 | int error; | ||
274 | 269 | ||
275 | /* Oh, the horror. | 270 | /* Oh, the horror. |
276 | * If we can't add the ACL or we fail in | 271 | * If we can't add the ACL or we fail in |
@@ -281,9 +276,9 @@ xfs_cleanup_inode( | |||
281 | teardown.d_name = dentry->d_name; | 276 | teardown.d_name = dentry->d_name; |
282 | 277 | ||
283 | if (S_ISDIR(mode)) | 278 | if (S_ISDIR(mode)) |
284 | VOP_RMDIR(dvp, &teardown, NULL, error); | 279 | bhv_vop_rmdir(dvp, &teardown, NULL); |
285 | else | 280 | else |
286 | VOP_REMOVE(dvp, &teardown, NULL, error); | 281 | bhv_vop_remove(dvp, &teardown, NULL); |
287 | VN_RELE(vp); | 282 | VN_RELE(vp); |
288 | } | 283 | } |
289 | 284 | ||
@@ -296,7 +291,7 @@ xfs_vn_mknod( | |||
296 | { | 291 | { |
297 | struct inode *ip; | 292 | struct inode *ip; |
298 | vattr_t vattr = { 0 }; | 293 | vattr_t vattr = { 0 }; |
299 | vnode_t *vp = NULL, *dvp = vn_from_inode(dir); | 294 | bhv_vnode_t *vp = NULL, *dvp = vn_from_inode(dir); |
300 | xfs_acl_t *default_acl = NULL; | 295 | xfs_acl_t *default_acl = NULL; |
301 | attrexists_t test_default_acl = _ACL_DEFAULT_EXISTS; | 296 | attrexists_t test_default_acl = _ACL_DEFAULT_EXISTS; |
302 | int error; | 297 | int error; |
@@ -330,10 +325,10 @@ xfs_vn_mknod( | |||
330 | vattr.va_mask |= XFS_AT_RDEV; | 325 | vattr.va_mask |= XFS_AT_RDEV; |
331 | /*FALLTHROUGH*/ | 326 | /*FALLTHROUGH*/ |
332 | case S_IFREG: | 327 | case S_IFREG: |
333 | VOP_CREATE(dvp, dentry, &vattr, &vp, NULL, error); | 328 | error = bhv_vop_create(dvp, dentry, &vattr, &vp, NULL); |
334 | break; | 329 | break; |
335 | case S_IFDIR: | 330 | case S_IFDIR: |
336 | VOP_MKDIR(dvp, dentry, &vattr, &vp, NULL, error); | 331 | error = bhv_vop_mkdir(dvp, dentry, &vattr, &vp, NULL); |
337 | break; | 332 | break; |
338 | default: | 333 | default: |
339 | error = EINVAL; | 334 | error = EINVAL; |
@@ -396,14 +391,14 @@ xfs_vn_lookup( | |||
396 | struct dentry *dentry, | 391 | struct dentry *dentry, |
397 | struct nameidata *nd) | 392 | struct nameidata *nd) |
398 | { | 393 | { |
399 | struct vnode *vp = vn_from_inode(dir), *cvp; | 394 | bhv_vnode_t *vp = vn_from_inode(dir), *cvp; |
400 | int error; | 395 | int error; |
401 | 396 | ||
402 | if (dentry->d_name.len >= MAXNAMELEN) | 397 | if (dentry->d_name.len >= MAXNAMELEN) |
403 | return ERR_PTR(-ENAMETOOLONG); | 398 | return ERR_PTR(-ENAMETOOLONG); |
404 | 399 | ||
405 | VOP_LOOKUP(vp, dentry, &cvp, 0, NULL, NULL, error); | 400 | error = bhv_vop_lookup(vp, dentry, &cvp, 0, NULL, NULL); |
406 | if (error) { | 401 | if (unlikely(error)) { |
407 | if (unlikely(error != ENOENT)) | 402 | if (unlikely(error != ENOENT)) |
408 | return ERR_PTR(-error); | 403 | return ERR_PTR(-error); |
409 | d_add(dentry, NULL); | 404 | d_add(dentry, NULL); |
@@ -420,8 +415,8 @@ xfs_vn_link( | |||
420 | struct dentry *dentry) | 415 | struct dentry *dentry) |
421 | { | 416 | { |
422 | struct inode *ip; /* inode of guy being linked to */ | 417 | struct inode *ip; /* inode of guy being linked to */ |
423 | vnode_t *tdvp; /* target directory for new name/link */ | 418 | bhv_vnode_t *tdvp; /* target directory for new name/link */ |
424 | vnode_t *vp; /* vp of name being linked */ | 419 | bhv_vnode_t *vp; /* vp of name being linked */ |
425 | vattr_t vattr; | 420 | vattr_t vattr; |
426 | int error; | 421 | int error; |
427 | 422 | ||
@@ -432,7 +427,7 @@ xfs_vn_link( | |||
432 | tdvp = vn_from_inode(dir); | 427 | tdvp = vn_from_inode(dir); |
433 | vp = vn_from_inode(ip); | 428 | vp = vn_from_inode(ip); |
434 | 429 | ||
435 | VOP_LINK(tdvp, vp, dentry, NULL, error); | 430 | error = bhv_vop_link(tdvp, vp, dentry, NULL); |
436 | if (likely(!error)) { | 431 | if (likely(!error)) { |
437 | VMODIFY(tdvp); | 432 | VMODIFY(tdvp); |
438 | VN_HOLD(vp); | 433 | VN_HOLD(vp); |
@@ -448,14 +443,14 @@ xfs_vn_unlink( | |||
448 | struct dentry *dentry) | 443 | struct dentry *dentry) |
449 | { | 444 | { |
450 | struct inode *inode; | 445 | struct inode *inode; |
451 | vnode_t *dvp; /* directory containing name to remove */ | 446 | bhv_vnode_t *dvp; /* directory containing name to remove */ |
452 | vattr_t vattr; | 447 | vattr_t vattr; |
453 | int error; | 448 | int error; |
454 | 449 | ||
455 | inode = dentry->d_inode; | 450 | inode = dentry->d_inode; |
456 | dvp = vn_from_inode(dir); | 451 | dvp = vn_from_inode(dir); |
457 | 452 | ||
458 | VOP_REMOVE(dvp, dentry, NULL, error); | 453 | error = bhv_vop_remove(dvp, dentry, NULL); |
459 | if (likely(!error)) { | 454 | if (likely(!error)) { |
460 | xfs_validate_fields(dir, &vattr); /* size needs update */ | 455 | xfs_validate_fields(dir, &vattr); /* size needs update */ |
461 | xfs_validate_fields(inode, &vattr); | 456 | xfs_validate_fields(inode, &vattr); |
@@ -470,27 +465,26 @@ xfs_vn_symlink( | |||
470 | const char *symname) | 465 | const char *symname) |
471 | { | 466 | { |
472 | struct inode *ip; | 467 | struct inode *ip; |
473 | vattr_t vattr = { 0 }; | 468 | vattr_t va = { 0 }; |
474 | vnode_t *dvp; /* directory containing name of symlink */ | 469 | bhv_vnode_t *dvp; /* directory containing name of symlink */ |
475 | vnode_t *cvp; /* used to lookup symlink to put in dentry */ | 470 | bhv_vnode_t *cvp; /* used to lookup symlink to put in dentry */ |
476 | int error; | 471 | int error; |
477 | 472 | ||
478 | dvp = vn_from_inode(dir); | 473 | dvp = vn_from_inode(dir); |
479 | cvp = NULL; | 474 | cvp = NULL; |
480 | 475 | ||
481 | vattr.va_mode = S_IFLNK | | 476 | va.va_mode = S_IFLNK | |
482 | (irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO); | 477 | (irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO); |
483 | vattr.va_mask = XFS_AT_TYPE|XFS_AT_MODE; | 478 | va.va_mask = XFS_AT_TYPE|XFS_AT_MODE; |
484 | 479 | ||
485 | error = 0; | 480 | error = bhv_vop_symlink(dvp, dentry, &va, (char *)symname, &cvp, NULL); |
486 | VOP_SYMLINK(dvp, dentry, &vattr, (char *)symname, &cvp, NULL, error); | ||
487 | if (likely(!error && cvp)) { | 481 | if (likely(!error && cvp)) { |
488 | error = xfs_init_security(cvp, dir); | 482 | error = xfs_init_security(cvp, dir); |
489 | if (likely(!error)) { | 483 | if (likely(!error)) { |
490 | ip = vn_to_inode(cvp); | 484 | ip = vn_to_inode(cvp); |
491 | d_instantiate(dentry, ip); | 485 | d_instantiate(dentry, ip); |
492 | xfs_validate_fields(dir, &vattr); | 486 | xfs_validate_fields(dir, &va); |
493 | xfs_validate_fields(ip, &vattr); | 487 | xfs_validate_fields(ip, &va); |
494 | } else { | 488 | } else { |
495 | xfs_cleanup_inode(dvp, cvp, dentry, 0); | 489 | xfs_cleanup_inode(dvp, cvp, dentry, 0); |
496 | } | 490 | } |
@@ -504,11 +498,11 @@ xfs_vn_rmdir( | |||
504 | struct dentry *dentry) | 498 | struct dentry *dentry) |
505 | { | 499 | { |
506 | struct inode *inode = dentry->d_inode; | 500 | struct inode *inode = dentry->d_inode; |
507 | vnode_t *dvp = vn_from_inode(dir); | 501 | bhv_vnode_t *dvp = vn_from_inode(dir); |
508 | vattr_t vattr; | 502 | vattr_t vattr; |
509 | int error; | 503 | int error; |
510 | 504 | ||
511 | VOP_RMDIR(dvp, dentry, NULL, error); | 505 | error = bhv_vop_rmdir(dvp, dentry, NULL); |
512 | if (likely(!error)) { | 506 | if (likely(!error)) { |
513 | xfs_validate_fields(inode, &vattr); | 507 | xfs_validate_fields(inode, &vattr); |
514 | xfs_validate_fields(dir, &vattr); | 508 | xfs_validate_fields(dir, &vattr); |
@@ -524,15 +518,15 @@ xfs_vn_rename( | |||
524 | struct dentry *ndentry) | 518 | struct dentry *ndentry) |
525 | { | 519 | { |
526 | struct inode *new_inode = ndentry->d_inode; | 520 | struct inode *new_inode = ndentry->d_inode; |
527 | vnode_t *fvp; /* from directory */ | 521 | bhv_vnode_t *fvp; /* from directory */ |
528 | vnode_t *tvp; /* target directory */ | 522 | bhv_vnode_t *tvp; /* target directory */ |
529 | vattr_t vattr; | 523 | vattr_t vattr; |
530 | int error; | 524 | int error; |
531 | 525 | ||
532 | fvp = vn_from_inode(odir); | 526 | fvp = vn_from_inode(odir); |
533 | tvp = vn_from_inode(ndir); | 527 | tvp = vn_from_inode(ndir); |
534 | 528 | ||
535 | VOP_RENAME(fvp, odentry, tvp, ndentry, NULL, error); | 529 | error = bhv_vop_rename(fvp, odentry, tvp, ndentry, NULL); |
536 | if (likely(!error)) { | 530 | if (likely(!error)) { |
537 | if (new_inode) | 531 | if (new_inode) |
538 | xfs_validate_fields(new_inode, &vattr); | 532 | xfs_validate_fields(new_inode, &vattr); |
@@ -553,7 +547,7 @@ xfs_vn_follow_link( | |||
553 | struct dentry *dentry, | 547 | struct dentry *dentry, |
554 | struct nameidata *nd) | 548 | struct nameidata *nd) |
555 | { | 549 | { |
556 | vnode_t *vp; | 550 | bhv_vnode_t *vp; |
557 | uio_t *uio; | 551 | uio_t *uio; |
558 | iovec_t iov; | 552 | iovec_t iov; |
559 | int error; | 553 | int error; |
@@ -586,8 +580,8 @@ xfs_vn_follow_link( | |||
586 | uio->uio_resid = MAXPATHLEN; | 580 | uio->uio_resid = MAXPATHLEN; |
587 | uio->uio_iovcnt = 1; | 581 | uio->uio_iovcnt = 1; |
588 | 582 | ||
589 | VOP_READLINK(vp, uio, 0, NULL, error); | 583 | error = bhv_vop_readlink(vp, uio, 0, NULL); |
590 | if (error) { | 584 | if (unlikely(error)) { |
591 | kfree(link); | 585 | kfree(link); |
592 | link = ERR_PTR(-error); | 586 | link = ERR_PTR(-error); |
593 | } else { | 587 | } else { |
@@ -618,12 +612,7 @@ xfs_vn_permission( | |||
618 | int mode, | 612 | int mode, |
619 | struct nameidata *nd) | 613 | struct nameidata *nd) |
620 | { | 614 | { |
621 | vnode_t *vp = vn_from_inode(inode); | 615 | return -bhv_vop_access(vn_from_inode(inode), mode << 6, NULL); |
622 | int error; | ||
623 | |||
624 | mode <<= 6; /* convert from linux to vnode access bits */ | ||
625 | VOP_ACCESS(vp, mode, NULL, error); | ||
626 | return -error; | ||
627 | } | 616 | } |
628 | #else | 617 | #else |
629 | #define xfs_vn_permission NULL | 618 | #define xfs_vn_permission NULL |
@@ -636,7 +625,7 @@ xfs_vn_getattr( | |||
636 | struct kstat *stat) | 625 | struct kstat *stat) |
637 | { | 626 | { |
638 | struct inode *inode = dentry->d_inode; | 627 | struct inode *inode = dentry->d_inode; |
639 | vnode_t *vp = vn_from_inode(inode); | 628 | bhv_vnode_t *vp = vn_from_inode(inode); |
640 | int error = 0; | 629 | int error = 0; |
641 | 630 | ||
642 | if (unlikely(vp->v_flag & VMODIFIED)) | 631 | if (unlikely(vp->v_flag & VMODIFIED)) |
@@ -653,7 +642,7 @@ xfs_vn_setattr( | |||
653 | { | 642 | { |
654 | struct inode *inode = dentry->d_inode; | 643 | struct inode *inode = dentry->d_inode; |
655 | unsigned int ia_valid = attr->ia_valid; | 644 | unsigned int ia_valid = attr->ia_valid; |
656 | vnode_t *vp = vn_from_inode(inode); | 645 | bhv_vnode_t *vp = vn_from_inode(inode); |
657 | vattr_t vattr = { 0 }; | 646 | vattr_t vattr = { 0 }; |
658 | int flags = 0; | 647 | int flags = 0; |
659 | int error; | 648 | int error; |
@@ -697,7 +686,7 @@ xfs_vn_setattr( | |||
697 | flags |= ATTR_NONBLOCK; | 686 | flags |= ATTR_NONBLOCK; |
698 | #endif | 687 | #endif |
699 | 688 | ||
700 | VOP_SETATTR(vp, &vattr, flags, NULL, error); | 689 | error = bhv_vop_setattr(vp, &vattr, flags, NULL); |
701 | if (likely(!error)) | 690 | if (likely(!error)) |
702 | __vn_revalidate(vp, &vattr); | 691 | __vn_revalidate(vp, &vattr); |
703 | return -error; | 692 | return -error; |
@@ -718,7 +707,7 @@ xfs_vn_setxattr( | |||
718 | size_t size, | 707 | size_t size, |
719 | int flags) | 708 | int flags) |
720 | { | 709 | { |
721 | vnode_t *vp = vn_from_inode(dentry->d_inode); | 710 | bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); |
722 | char *attr = (char *)name; | 711 | char *attr = (char *)name; |
723 | attrnames_t *namesp; | 712 | attrnames_t *namesp; |
724 | int xflags = 0; | 713 | int xflags = 0; |
@@ -748,7 +737,7 @@ xfs_vn_getxattr( | |||
748 | void *data, | 737 | void *data, |
749 | size_t size) | 738 | size_t size) |
750 | { | 739 | { |
751 | vnode_t *vp = vn_from_inode(dentry->d_inode); | 740 | bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); |
752 | char *attr = (char *)name; | 741 | char *attr = (char *)name; |
753 | attrnames_t *namesp; | 742 | attrnames_t *namesp; |
754 | int xflags = 0; | 743 | int xflags = 0; |
@@ -777,7 +766,7 @@ xfs_vn_listxattr( | |||
777 | char *data, | 766 | char *data, |
778 | size_t size) | 767 | size_t size) |
779 | { | 768 | { |
780 | vnode_t *vp = vn_from_inode(dentry->d_inode); | 769 | bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); |
781 | int error, xflags = ATTR_KERNAMELS; | 770 | int error, xflags = ATTR_KERNAMELS; |
782 | ssize_t result; | 771 | ssize_t result; |
783 | 772 | ||
@@ -796,7 +785,7 @@ xfs_vn_removexattr( | |||
796 | struct dentry *dentry, | 785 | struct dentry *dentry, |
797 | const char *name) | 786 | const char *name) |
798 | { | 787 | { |
799 | vnode_t *vp = vn_from_inode(dentry->d_inode); | 788 | bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); |
800 | char *attr = (char *)name; | 789 | char *attr = (char *)name; |
801 | attrnames_t *namesp; | 790 | attrnames_t *namesp; |
802 | int xflags = 0; | 791 | int xflags = 0; |
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 6fbdca3eaa7a..a9b83018f0fb 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -206,7 +206,7 @@ xfs_read( | |||
206 | xfs_fsize_t n; | 206 | xfs_fsize_t n; |
207 | xfs_inode_t *ip; | 207 | xfs_inode_t *ip; |
208 | xfs_mount_t *mp; | 208 | xfs_mount_t *mp; |
209 | vnode_t *vp; | 209 | bhv_vnode_t *vp; |
210 | unsigned long seg; | 210 | unsigned long seg; |
211 | 211 | ||
212 | ip = XFS_BHVTOI(bdp); | 212 | ip = XFS_BHVTOI(bdp); |
@@ -271,7 +271,7 @@ xfs_read( | |||
271 | } | 271 | } |
272 | 272 | ||
273 | if (unlikely((ioflags & IO_ISDIRECT) && VN_CACHED(vp))) | 273 | if (unlikely((ioflags & IO_ISDIRECT) && VN_CACHED(vp))) |
274 | VOP_FLUSHINVAL_PAGES(vp, ctooff(offtoct(*offset)), | 274 | bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)), |
275 | -1, FI_REMAPF_LOCKED); | 275 | -1, FI_REMAPF_LOCKED); |
276 | 276 | ||
277 | xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore, | 277 | xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore, |
@@ -499,7 +499,7 @@ xfs_zero_last_block( | |||
499 | 499 | ||
500 | int /* error (positive) */ | 500 | int /* error (positive) */ |
501 | xfs_zero_eof( | 501 | xfs_zero_eof( |
502 | vnode_t *vp, | 502 | bhv_vnode_t *vp, |
503 | xfs_iocore_t *io, | 503 | xfs_iocore_t *io, |
504 | xfs_off_t offset, /* starting I/O offset */ | 504 | xfs_off_t offset, /* starting I/O offset */ |
505 | xfs_fsize_t isize, /* current inode size */ | 505 | xfs_fsize_t isize, /* current inode size */ |
@@ -626,7 +626,7 @@ xfs_write( | |||
626 | ssize_t ret = 0, error = 0; | 626 | ssize_t ret = 0, error = 0; |
627 | xfs_fsize_t isize, new_size; | 627 | xfs_fsize_t isize, new_size; |
628 | xfs_iocore_t *io; | 628 | xfs_iocore_t *io; |
629 | vnode_t *vp; | 629 | bhv_vnode_t *vp; |
630 | unsigned long seg; | 630 | unsigned long seg; |
631 | int iolock; | 631 | int iolock; |
632 | int eventsent = 0; | 632 | int eventsent = 0; |
@@ -803,7 +803,7 @@ retry: | |||
803 | if (need_flush) { | 803 | if (need_flush) { |
804 | xfs_inval_cached_trace(io, pos, -1, | 804 | xfs_inval_cached_trace(io, pos, -1, |
805 | ctooff(offtoct(pos)), -1); | 805 | ctooff(offtoct(pos)), -1); |
806 | VOP_FLUSHINVAL_PAGES(vp, ctooff(offtoct(pos)), | 806 | bhv_vop_flushinval_pages(vp, ctooff(offtoct(pos)), |
807 | -1, FI_REMAPF_LOCKED); | 807 | -1, FI_REMAPF_LOCKED); |
808 | } | 808 | } |
809 | 809 | ||
diff --git a/fs/xfs/linux-2.6/xfs_lrw.h b/fs/xfs/linux-2.6/xfs_lrw.h index dc49050688ca..c77e62efb742 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.h +++ b/fs/xfs/linux-2.6/xfs_lrw.h | |||
@@ -18,8 +18,8 @@ | |||
18 | #ifndef __XFS_LRW_H__ | 18 | #ifndef __XFS_LRW_H__ |
19 | #define __XFS_LRW_H__ | 19 | #define __XFS_LRW_H__ |
20 | 20 | ||
21 | struct vnode; | ||
22 | struct bhv_desc; | 21 | struct bhv_desc; |
22 | struct bhv_vnode; | ||
23 | struct xfs_mount; | 23 | struct xfs_mount; |
24 | struct xfs_iocore; | 24 | struct xfs_iocore; |
25 | struct xfs_inode; | 25 | struct xfs_inode; |
@@ -82,7 +82,7 @@ extern int xfsbdstrat(struct xfs_mount *, struct xfs_buf *); | |||
82 | extern int xfs_bdstrat_cb(struct xfs_buf *); | 82 | extern int xfs_bdstrat_cb(struct xfs_buf *); |
83 | extern int xfs_dev_is_read_only(struct xfs_mount *, char *); | 83 | extern int xfs_dev_is_read_only(struct xfs_mount *, char *); |
84 | 84 | ||
85 | extern int xfs_zero_eof(struct vnode *, struct xfs_iocore *, xfs_off_t, | 85 | extern int xfs_zero_eof(struct bhv_vnode *, struct xfs_iocore *, xfs_off_t, |
86 | xfs_fsize_t, xfs_fsize_t); | 86 | xfs_fsize_t, xfs_fsize_t); |
87 | extern ssize_t xfs_read(struct bhv_desc *, struct kiocb *, | 87 | extern ssize_t xfs_read(struct bhv_desc *, struct kiocb *, |
88 | const struct iovec *, unsigned int, | 88 | const struct iovec *, unsigned int, |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 97dbcb68b25f..b7aad3cfdfeb 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -151,7 +151,7 @@ xfs_set_inodeops( | |||
151 | STATIC __inline__ void | 151 | STATIC __inline__ void |
152 | xfs_revalidate_inode( | 152 | xfs_revalidate_inode( |
153 | xfs_mount_t *mp, | 153 | xfs_mount_t *mp, |
154 | vnode_t *vp, | 154 | bhv_vnode_t *vp, |
155 | xfs_inode_t *ip) | 155 | xfs_inode_t *ip) |
156 | { | 156 | { |
157 | struct inode *inode = vn_to_inode(vp); | 157 | struct inode *inode = vn_to_inode(vp); |
@@ -206,7 +206,7 @@ xfs_revalidate_inode( | |||
206 | void | 206 | void |
207 | xfs_initialize_vnode( | 207 | xfs_initialize_vnode( |
208 | bhv_desc_t *bdp, | 208 | bhv_desc_t *bdp, |
209 | vnode_t *vp, | 209 | bhv_vnode_t *vp, |
210 | bhv_desc_t *inode_bhv, | 210 | bhv_desc_t *inode_bhv, |
211 | int unlock) | 211 | int unlock) |
212 | { | 212 | { |
@@ -336,7 +336,7 @@ STATIC struct inode * | |||
336 | xfs_fs_alloc_inode( | 336 | xfs_fs_alloc_inode( |
337 | struct super_block *sb) | 337 | struct super_block *sb) |
338 | { | 338 | { |
339 | vnode_t *vp; | 339 | bhv_vnode_t *vp; |
340 | 340 | ||
341 | vp = kmem_zone_alloc(xfs_vnode_zone, KM_SLEEP); | 341 | vp = kmem_zone_alloc(xfs_vnode_zone, KM_SLEEP); |
342 | if (unlikely(!vp)) | 342 | if (unlikely(!vp)) |
@@ -359,13 +359,13 @@ xfs_fs_inode_init_once( | |||
359 | { | 359 | { |
360 | if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == | 360 | if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == |
361 | SLAB_CTOR_CONSTRUCTOR) | 361 | SLAB_CTOR_CONSTRUCTOR) |
362 | inode_init_once(vn_to_inode((vnode_t *)vnode)); | 362 | inode_init_once(vn_to_inode((bhv_vnode_t *)vnode)); |
363 | } | 363 | } |
364 | 364 | ||
365 | STATIC int | 365 | STATIC int |
366 | xfs_init_zones(void) | 366 | xfs_init_zones(void) |
367 | { | 367 | { |
368 | xfs_vnode_zone = kmem_zone_init_flags(sizeof(vnode_t), "xfs_vnode_t", | 368 | xfs_vnode_zone = kmem_zone_init_flags(sizeof(bhv_vnode_t), "xfs_vnode", |
369 | KM_ZONE_HWALIGN | KM_ZONE_RECLAIM | | 369 | KM_ZONE_HWALIGN | KM_ZONE_RECLAIM | |
370 | KM_ZONE_SPREAD, | 370 | KM_ZONE_SPREAD, |
371 | xfs_fs_inode_init_once); | 371 | xfs_fs_inode_init_once); |
@@ -409,22 +409,17 @@ xfs_fs_write_inode( | |||
409 | struct inode *inode, | 409 | struct inode *inode, |
410 | int sync) | 410 | int sync) |
411 | { | 411 | { |
412 | vnode_t *vp = vn_from_inode(inode); | 412 | bhv_vnode_t *vp = vn_from_inode(inode); |
413 | int error = 0, flags = FLUSH_INODE; | 413 | int error = 0, flags = FLUSH_INODE; |
414 | 414 | ||
415 | if (vp) { | 415 | if (vp) { |
416 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); | 416 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); |
417 | if (sync) | 417 | if (sync) |
418 | flags |= FLUSH_SYNC; | 418 | flags |= FLUSH_SYNC; |
419 | VOP_IFLUSH(vp, flags, error); | 419 | error = bhv_vop_iflush(vp, flags); |
420 | if (error == EAGAIN) { | 420 | if (error == EAGAIN) |
421 | if (sync) | 421 | error = sync? bhv_vop_iflush(vp, flags | FLUSH_LOG) : 0; |
422 | VOP_IFLUSH(vp, flags | FLUSH_LOG, error); | ||
423 | else | ||
424 | error = 0; | ||
425 | } | ||
426 | } | 422 | } |
427 | |||
428 | return -error; | 423 | return -error; |
429 | } | 424 | } |
430 | 425 | ||
@@ -432,8 +427,7 @@ STATIC void | |||
432 | xfs_fs_clear_inode( | 427 | xfs_fs_clear_inode( |
433 | struct inode *inode) | 428 | struct inode *inode) |
434 | { | 429 | { |
435 | vnode_t *vp = vn_from_inode(inode); | 430 | bhv_vnode_t *vp = vn_from_inode(inode); |
436 | int error, cache; | ||
437 | 431 | ||
438 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); | 432 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); |
439 | 433 | ||
@@ -446,20 +440,18 @@ xfs_fs_clear_inode( | |||
446 | * This can happen because xfs_iget_core calls xfs_idestroy if we | 440 | * This can happen because xfs_iget_core calls xfs_idestroy if we |
447 | * find an inode with di_mode == 0 but without IGET_CREATE set. | 441 | * find an inode with di_mode == 0 but without IGET_CREATE set. |
448 | */ | 442 | */ |
449 | if (vp->v_fbhv) | 443 | if (VNHEAD(vp)) |
450 | VOP_INACTIVE(vp, NULL, cache); | 444 | bhv_vop_inactive(vp, NULL); |
451 | 445 | ||
452 | VN_LOCK(vp); | 446 | VN_LOCK(vp); |
453 | vp->v_flag &= ~VMODIFIED; | 447 | vp->v_flag &= ~VMODIFIED; |
454 | VN_UNLOCK(vp, 0); | 448 | VN_UNLOCK(vp, 0); |
455 | 449 | ||
456 | if (vp->v_fbhv) { | 450 | if (VNHEAD(vp)) |
457 | VOP_RECLAIM(vp, error); | 451 | if (bhv_vop_reclaim(vp)) |
458 | if (error) | 452 | panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, vp); |
459 | panic("vn_purge: cannot reclaim"); | ||
460 | } | ||
461 | 453 | ||
462 | ASSERT(vp->v_fbhv == NULL); | 454 | ASSERT(VNHEAD(vp) == NULL); |
463 | 455 | ||
464 | #ifdef XFS_VNODE_TRACE | 456 | #ifdef XFS_VNODE_TRACE |
465 | ktrace_free(vp->v_trace); | 457 | ktrace_free(vp->v_trace); |
@@ -789,7 +781,7 @@ xfs_fs_fill_super( | |||
789 | void *data, | 781 | void *data, |
790 | int silent) | 782 | int silent) |
791 | { | 783 | { |
792 | vnode_t *rootvp; | 784 | struct bhv_vnode *rootvp; |
793 | struct bhv_vfs *vfsp = vfs_allocate(sb); | 785 | struct bhv_vfs *vfsp = vfs_allocate(sb); |
794 | struct xfs_mount_args *args = xfs_args_allocate(sb, silent); | 786 | struct xfs_mount_args *args = xfs_args_allocate(sb, silent); |
795 | struct kstatfs statvfs; | 787 | struct kstatfs statvfs; |
diff --git a/fs/xfs/linux-2.6/xfs_super.h b/fs/xfs/linux-2.6/xfs_super.h index 376b96cb513a..33dd1ca13245 100644 --- a/fs/xfs/linux-2.6/xfs_super.h +++ b/fs/xfs/linux-2.6/xfs_super.h | |||
@@ -105,7 +105,7 @@ struct block_device; | |||
105 | 105 | ||
106 | extern __uint64_t xfs_max_file_offset(unsigned int); | 106 | extern __uint64_t xfs_max_file_offset(unsigned int); |
107 | 107 | ||
108 | extern void xfs_initialize_vnode(bhv_desc_t *, vnode_t *, bhv_desc_t *, int); | 108 | extern void xfs_initialize_vnode(bhv_desc_t *, bhv_vnode_t *, bhv_desc_t *, int); |
109 | 109 | ||
110 | extern void xfs_flush_inode(struct xfs_inode *); | 110 | extern void xfs_flush_inode(struct xfs_inode *); |
111 | extern void xfs_flush_device(struct xfs_inode *); | 111 | extern void xfs_flush_device(struct xfs_inode *); |
diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c index 9f9bc894deb9..a91ecfa9c8aa 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.c +++ b/fs/xfs/linux-2.6/xfs_vfs.c | |||
@@ -104,7 +104,7 @@ vfs_mntupdate( | |||
104 | int | 104 | int |
105 | vfs_root( | 105 | vfs_root( |
106 | struct bhv_desc *bdp, | 106 | struct bhv_desc *bdp, |
107 | struct vnode **vpp) | 107 | struct bhv_vnode **vpp) |
108 | { | 108 | { |
109 | struct bhv_desc *next = bdp; | 109 | struct bhv_desc *next = bdp; |
110 | 110 | ||
@@ -118,7 +118,7 @@ int | |||
118 | vfs_statvfs( | 118 | vfs_statvfs( |
119 | struct bhv_desc *bdp, | 119 | struct bhv_desc *bdp, |
120 | xfs_statfs_t *sp, | 120 | xfs_statfs_t *sp, |
121 | struct vnode *vp) | 121 | struct bhv_vnode *vp) |
122 | { | 122 | { |
123 | struct bhv_desc *next = bdp; | 123 | struct bhv_desc *next = bdp; |
124 | 124 | ||
@@ -145,7 +145,7 @@ vfs_sync( | |||
145 | int | 145 | int |
146 | vfs_vget( | 146 | vfs_vget( |
147 | struct bhv_desc *bdp, | 147 | struct bhv_desc *bdp, |
148 | struct vnode **vpp, | 148 | struct bhv_vnode **vpp, |
149 | struct fid *fidp) | 149 | struct fid *fidp) |
150 | { | 150 | { |
151 | struct bhv_desc *next = bdp; | 151 | struct bhv_desc *next = bdp; |
@@ -187,7 +187,7 @@ vfs_quotactl( | |||
187 | void | 187 | void |
188 | vfs_init_vnode( | 188 | vfs_init_vnode( |
189 | struct bhv_desc *bdp, | 189 | struct bhv_desc *bdp, |
190 | struct vnode *vp, | 190 | struct bhv_vnode *vp, |
191 | struct bhv_desc *bp, | 191 | struct bhv_desc *bp, |
192 | int unlock) | 192 | int unlock) |
193 | { | 193 | { |
diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h index 55f0afd3e794..1a3a2dd4b97e 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.h +++ b/fs/xfs/linux-2.6/xfs_vfs.h | |||
@@ -22,9 +22,9 @@ | |||
22 | #include "xfs_fs.h" | 22 | #include "xfs_fs.h" |
23 | 23 | ||
24 | struct bhv_vfs; | 24 | struct bhv_vfs; |
25 | struct bhv_vnode; | ||
25 | struct fid; | 26 | struct fid; |
26 | struct cred; | 27 | struct cred; |
27 | struct vnode; | ||
28 | struct statfs; | 28 | struct statfs; |
29 | struct seq_file; | 29 | struct seq_file; |
30 | struct super_block; | 30 | struct super_block; |
@@ -53,8 +53,6 @@ typedef struct bhv_vfs { | |||
53 | wait_queue_head_t vfs_wait_single_sync_task; | 53 | wait_queue_head_t vfs_wait_single_sync_task; |
54 | } bhv_vfs_t; | 54 | } bhv_vfs_t; |
55 | 55 | ||
56 | #define vfs_fbhv vfs_bh.bh_first /* 1st on vfs behavior chain */ | ||
57 | |||
58 | #define bhvtovfs(bdp) ( (struct bhv_vfs *)BHV_VOBJ(bdp) ) | 56 | #define bhvtovfs(bdp) ( (struct bhv_vfs *)BHV_VOBJ(bdp) ) |
59 | #define bhvtovfsops(bdp) ( (struct bhv_vfsops *)BHV_OPS(bdp) ) | 57 | #define bhvtovfsops(bdp) ( (struct bhv_vfsops *)BHV_OPS(bdp) ) |
60 | #define VFS_BHVHEAD(vfs) ( &(vfs)->vfs_bh ) | 58 | #define VFS_BHVHEAD(vfs) ( &(vfs)->vfs_bh ) |
@@ -110,14 +108,15 @@ typedef int (*vfs_showargs_t)(bhv_desc_t *, struct seq_file *); | |||
110 | typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *); | 108 | typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *); |
111 | typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *, | 109 | typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *, |
112 | struct xfs_mount_args *); | 110 | struct xfs_mount_args *); |
113 | typedef int (*vfs_root_t)(bhv_desc_t *, struct vnode **); | 111 | typedef int (*vfs_root_t)(bhv_desc_t *, struct bhv_vnode **); |
114 | typedef int (*vfs_statvfs_t)(bhv_desc_t *, xfs_statfs_t *, struct vnode *); | 112 | typedef int (*vfs_statvfs_t)(bhv_desc_t *, xfs_statfs_t *, |
113 | struct bhv_vnode *); | ||
115 | typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); | 114 | typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); |
116 | typedef int (*vfs_vget_t)(bhv_desc_t *, struct vnode **, struct fid *); | 115 | typedef int (*vfs_vget_t)(bhv_desc_t *, struct bhv_vnode **, struct fid *); |
117 | typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t); | 116 | typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t); |
118 | typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); | 117 | typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); |
119 | typedef void (*vfs_init_vnode_t)(bhv_desc_t *, | 118 | typedef void (*vfs_init_vnode_t)(bhv_desc_t *, |
120 | struct vnode *, bhv_desc_t *, int); | 119 | struct bhv_vnode *, bhv_desc_t *, int); |
121 | typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int); | 120 | typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int); |
122 | typedef void (*vfs_freeze_t)(bhv_desc_t *); | 121 | typedef void (*vfs_freeze_t)(bhv_desc_t *); |
123 | 122 | ||
@@ -140,26 +139,26 @@ typedef struct bhv_vfsops { | |||
140 | } bhv_vfsops_t; | 139 | } bhv_vfsops_t; |
141 | 140 | ||
142 | /* | 141 | /* |
143 | * VFS's. Operates on vfs structure pointers (starts at bhv head). | 142 | * Virtual filesystem operations, operating from head bhv. |
144 | */ | 143 | */ |
145 | #define VHEAD(v) ((v)->vfs_fbhv) | 144 | #define VFSHEAD(v) ((v)->vfs_bh.bh_first) |
146 | #define bhv_vfs_mount(v, ma,cr) vfs_mount(VHEAD(v), ma,cr) | 145 | #define bhv_vfs_mount(v, ma,cr) vfs_mount(VFSHEAD(v), ma,cr) |
147 | #define bhv_vfs_parseargs(v, o,ma,f) vfs_parseargs(VHEAD(v), o,ma,f) | 146 | #define bhv_vfs_parseargs(v, o,ma,f) vfs_parseargs(VFSHEAD(v), o,ma,f) |
148 | #define bhv_vfs_showargs(v, m) vfs_showargs(VHEAD(v), m) | 147 | #define bhv_vfs_showargs(v, m) vfs_showargs(VFSHEAD(v), m) |
149 | #define bhv_vfs_unmount(v, f,cr) vfs_unmount(VHEAD(v), f,cr) | 148 | #define bhv_vfs_unmount(v, f,cr) vfs_unmount(VFSHEAD(v), f,cr) |
150 | #define bhv_vfs_mntupdate(v, fl,args) vfs_mntupdate(VHEAD(v), fl,args) | 149 | #define bhv_vfs_mntupdate(v, fl,args) vfs_mntupdate(VFSHEAD(v), fl,args) |
151 | #define bhv_vfs_root(v, vpp) vfs_root(VHEAD(v), vpp) | 150 | #define bhv_vfs_root(v, vpp) vfs_root(VFSHEAD(v), vpp) |
152 | #define bhv_vfs_statvfs(v, sp,vp) vfs_statvfs(VHEAD(v), sp,vp) | 151 | #define bhv_vfs_statvfs(v, sp,vp) vfs_statvfs(VFSHEAD(v), sp,vp) |
153 | #define bhv_vfs_sync(v, flag,cr) vfs_sync(VHEAD(v), flag,cr) | 152 | #define bhv_vfs_sync(v, flag,cr) vfs_sync(VFSHEAD(v), flag,cr) |
154 | #define bhv_vfs_vget(v, vpp,fidp) vfs_vget(VHEAD(v), vpp,fidp) | 153 | #define bhv_vfs_vget(v, vpp,fidp) vfs_vget(VFSHEAD(v), vpp,fidp) |
155 | #define bhv_vfs_dmapiops(v, p) vfs_dmapiops(VHEAD(v), p) | 154 | #define bhv_vfs_dmapiops(v, p) vfs_dmapiops(VFSHEAD(v), p) |
156 | #define bhv_vfs_quotactl(v, c,id,p) vfs_quotactl(VHEAD(v), c,id,p) | 155 | #define bhv_vfs_quotactl(v, c,id,p) vfs_quotactl(VFSHEAD(v), c,id,p) |
157 | #define bhv_vfs_init_vnode(v, vp,b,ul) vfs_init_vnode(VHEAD(v), vp,b,ul) | 156 | #define bhv_vfs_init_vnode(v, vp,b,ul) vfs_init_vnode(VFSHEAD(v), vp,b,ul) |
158 | #define bhv_vfs_force_shutdown(v,u,f,l) vfs_force_shutdown(VHEAD(v), u,f,l) | 157 | #define bhv_vfs_force_shutdown(v,u,f,l) vfs_force_shutdown(VFSHEAD(v), u,f,l) |
159 | #define bhv_vfs_freeze(v) vfs_freeze(VHEAD(v)) | 158 | #define bhv_vfs_freeze(v) vfs_freeze(VFSHEAD(v)) |
160 | 159 | ||
161 | /* | 160 | /* |
162 | * PVFS's. Operates on behavior descriptor pointers. | 161 | * Virtual filesystem operations, operating from next bhv. |
163 | */ | 162 | */ |
164 | #define bhv_next_vfs_mount(b, ma,cr) vfs_mount(b, ma,cr) | 163 | #define bhv_next_vfs_mount(b, ma,cr) vfs_mount(b, ma,cr) |
165 | #define bhv_next_vfs_parseargs(b, o,ma,f) vfs_parseargs(b, o,ma,f) | 164 | #define bhv_next_vfs_parseargs(b, o,ma,f) vfs_parseargs(b, o,ma,f) |
@@ -181,13 +180,13 @@ extern int vfs_parseargs(bhv_desc_t *, char *, struct xfs_mount_args *, int); | |||
181 | extern int vfs_showargs(bhv_desc_t *, struct seq_file *); | 180 | extern int vfs_showargs(bhv_desc_t *, struct seq_file *); |
182 | extern int vfs_unmount(bhv_desc_t *, int, struct cred *); | 181 | extern int vfs_unmount(bhv_desc_t *, int, struct cred *); |
183 | extern int vfs_mntupdate(bhv_desc_t *, int *, struct xfs_mount_args *); | 182 | extern int vfs_mntupdate(bhv_desc_t *, int *, struct xfs_mount_args *); |
184 | extern int vfs_root(bhv_desc_t *, struct vnode **); | 183 | extern int vfs_root(bhv_desc_t *, struct bhv_vnode **); |
185 | extern int vfs_statvfs(bhv_desc_t *, xfs_statfs_t *, struct vnode *); | 184 | extern int vfs_statvfs(bhv_desc_t *, xfs_statfs_t *, struct bhv_vnode *); |
186 | extern int vfs_sync(bhv_desc_t *, int, struct cred *); | 185 | extern int vfs_sync(bhv_desc_t *, int, struct cred *); |
187 | extern int vfs_vget(bhv_desc_t *, struct vnode **, struct fid *); | 186 | extern int vfs_vget(bhv_desc_t *, struct bhv_vnode **, struct fid *); |
188 | extern int vfs_dmapiops(bhv_desc_t *, caddr_t); | 187 | extern int vfs_dmapiops(bhv_desc_t *, caddr_t); |
189 | extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); | 188 | extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); |
190 | extern void vfs_init_vnode(bhv_desc_t *, struct vnode *, bhv_desc_t *, int); | 189 | extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, bhv_desc_t *, int); |
191 | extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); | 190 | extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); |
192 | extern void vfs_freeze(bhv_desc_t *); | 191 | extern void vfs_freeze(bhv_desc_t *); |
193 | 192 | ||
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c index 82777f1a70a7..66e36e195f29 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,7 +48,7 @@ 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)); |
@@ -61,7 +61,7 @@ vn_iowake( | |||
61 | */ | 61 | */ |
62 | void | 62 | void |
63 | vn_ioerror( | 63 | vn_ioerror( |
64 | struct vnode *vp, | 64 | bhv_vnode_t *vp, |
65 | int error, | 65 | int error, |
66 | char *f, | 66 | char *f, |
67 | int l) | 67 | int l) |
@@ -70,11 +70,11 @@ vn_ioerror( | |||
70 | bhv_vfs_force_shutdown(vp->v_vfsp, SHUTDOWN_DEVICE_REQ, f, l); | 70 | bhv_vfs_force_shutdown(vp->v_vfsp, SHUTDOWN_DEVICE_REQ, f, l); |
71 | } | 71 | } |
72 | 72 | ||
73 | struct vnode * | 73 | bhv_vnode_t * |
74 | vn_initialize( | 74 | vn_initialize( |
75 | struct inode *inode) | 75 | struct inode *inode) |
76 | { | 76 | { |
77 | struct vnode *vp = vn_from_inode(inode); | 77 | bhv_vnode_t *vp = vn_from_inode(inode); |
78 | 78 | ||
79 | XFS_STATS_INC(vn_active); | 79 | XFS_STATS_INC(vn_active); |
80 | XFS_STATS_INC(vn_alloc); | 80 | XFS_STATS_INC(vn_alloc); |
@@ -110,7 +110,7 @@ vn_initialize( | |||
110 | */ | 110 | */ |
111 | void | 111 | void |
112 | vn_revalidate_core( | 112 | vn_revalidate_core( |
113 | struct vnode *vp, | 113 | bhv_vnode_t *vp, |
114 | vattr_t *vap) | 114 | vattr_t *vap) |
115 | { | 115 | { |
116 | struct inode *inode = vn_to_inode(vp); | 116 | struct inode *inode = vn_to_inode(vp); |
@@ -146,14 +146,14 @@ vn_revalidate_core( | |||
146 | */ | 146 | */ |
147 | int | 147 | int |
148 | __vn_revalidate( | 148 | __vn_revalidate( |
149 | struct vnode *vp, | 149 | bhv_vnode_t *vp, |
150 | struct vattr *vattr) | 150 | struct vattr *vattr) |
151 | { | 151 | { |
152 | int error; | 152 | int error; |
153 | 153 | ||
154 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); | 154 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); |
155 | vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; | 155 | vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; |
156 | VOP_GETATTR(vp, vattr, 0, NULL, error); | 156 | error = bhv_vop_getattr(vp, vattr, 0, NULL); |
157 | if (likely(!error)) { | 157 | if (likely(!error)) { |
158 | vn_revalidate_core(vp, vattr); | 158 | vn_revalidate_core(vp, vattr); |
159 | VUNMODIFY(vp); | 159 | VUNMODIFY(vp); |
@@ -163,7 +163,7 @@ __vn_revalidate( | |||
163 | 163 | ||
164 | int | 164 | int |
165 | vn_revalidate( | 165 | vn_revalidate( |
166 | struct vnode *vp) | 166 | bhv_vnode_t *vp) |
167 | { | 167 | { |
168 | vattr_t vattr; | 168 | vattr_t vattr; |
169 | 169 | ||
@@ -173,9 +173,9 @@ vn_revalidate( | |||
173 | /* | 173 | /* |
174 | * Add a reference to a referenced vnode. | 174 | * Add a reference to a referenced vnode. |
175 | */ | 175 | */ |
176 | struct vnode * | 176 | bhv_vnode_t * |
177 | vn_hold( | 177 | vn_hold( |
178 | struct vnode *vp) | 178 | bhv_vnode_t *vp) |
179 | { | 179 | { |
180 | struct inode *inode; | 180 | struct inode *inode; |
181 | 181 | ||
@@ -208,31 +208,31 @@ vn_hold( | |||
208 | * Vnode tracing code. | 208 | * Vnode tracing code. |
209 | */ | 209 | */ |
210 | void | 210 | void |
211 | 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) |
212 | { | 212 | { |
213 | KTRACE_ENTER(vp, VNODE_KTRACE_ENTRY, func, 0, ra); | 213 | KTRACE_ENTER(vp, VNODE_KTRACE_ENTRY, func, 0, ra); |
214 | } | 214 | } |
215 | 215 | ||
216 | void | 216 | void |
217 | 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) |
218 | { | 218 | { |
219 | KTRACE_ENTER(vp, VNODE_KTRACE_EXIT, func, 0, ra); | 219 | KTRACE_ENTER(vp, VNODE_KTRACE_EXIT, func, 0, ra); |
220 | } | 220 | } |
221 | 221 | ||
222 | void | 222 | void |
223 | 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) |
224 | { | 224 | { |
225 | KTRACE_ENTER(vp, VNODE_KTRACE_HOLD, file, line, ra); | 225 | KTRACE_ENTER(vp, VNODE_KTRACE_HOLD, file, line, ra); |
226 | } | 226 | } |
227 | 227 | ||
228 | void | 228 | void |
229 | 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) |
230 | { | 230 | { |
231 | KTRACE_ENTER(vp, VNODE_KTRACE_REF, file, line, ra); | 231 | KTRACE_ENTER(vp, VNODE_KTRACE_REF, file, line, ra); |
232 | } | 232 | } |
233 | 233 | ||
234 | void | 234 | void |
235 | 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) |
236 | { | 236 | { |
237 | KTRACE_ENTER(vp, VNODE_KTRACE_RELE, file, line, ra); | 237 | KTRACE_ENTER(vp, VNODE_KTRACE_RELE, file, line, ra); |
238 | } | 238 | } |
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index 95343637ab66..cb16774aea73 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
@@ -14,33 +14,6 @@ | |||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write the Free Software Foundation, | 15 | * along with this program; if not, write the Free Software Foundation, |
16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | * | ||
18 | * Portions Copyright (c) 1989, 1993 | ||
19 | * The Regents of the University of California. All rights reserved. | ||
20 | * | ||
21 | * Redistribution and use in source and binary forms, with or without | ||
22 | * modification, are permitted provided that the following conditions | ||
23 | * are met: | ||
24 | * 1. Redistributions of source code must retain the above copyright | ||
25 | * notice, this list of conditions and the following disclaimer. | ||
26 | * 2. Redistributions in binary form must reproduce the above copyright | ||
27 | * notice, this list of conditions and the following disclaimer in the | ||
28 | * documentation and/or other materials provided with the distribution. | ||
29 | * 3. Neither the name of the University nor the names of its contributors | ||
30 | * may be used to endorse or promote products derived from this software | ||
31 | * without specific prior written permission. | ||
32 | * | ||
33 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
34 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
35 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
36 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
37 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
38 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
39 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
40 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
41 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
42 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
43 | * SUCH DAMAGE. | ||
44 | */ | 17 | */ |
45 | #ifndef __XFS_VNODE_H__ | 18 | #ifndef __XFS_VNODE_H__ |
46 | #define __XFS_VNODE_H__ | 19 | #define __XFS_VNODE_H__ |
@@ -51,7 +24,6 @@ struct vattr; | |||
51 | struct xfs_iomap; | 24 | struct xfs_iomap; |
52 | struct attrlist_cursor_kern; | 25 | struct attrlist_cursor_kern; |
53 | 26 | ||
54 | |||
55 | typedef xfs_ino_t vnumber_t; | 27 | typedef xfs_ino_t vnumber_t; |
56 | typedef struct dentry vname_t; | 28 | typedef struct dentry vname_t; |
57 | typedef bhv_head_t vn_bhv_head_t; | 29 | typedef bhv_head_t vn_bhv_head_t; |
@@ -66,7 +38,7 @@ typedef enum vflags { | |||
66 | * MP locking protocols: | 38 | * MP locking protocols: |
67 | * v_flag, v_vfsp VN_LOCK/VN_UNLOCK | 39 | * v_flag, v_vfsp VN_LOCK/VN_UNLOCK |
68 | */ | 40 | */ |
69 | typedef struct vnode { | 41 | typedef struct bhv_vnode { |
70 | vflags_t v_flag; /* vnode flags (see above) */ | 42 | vflags_t v_flag; /* vnode flags (see above) */ |
71 | struct bhv_vfs *v_vfsp; /* ptr to containing VFS */ | 43 | struct bhv_vfs *v_vfsp; /* ptr to containing VFS */ |
72 | vnumber_t v_number; /* in-core vnode number */ | 44 | vnumber_t v_number; /* in-core vnode number */ |
@@ -78,7 +50,7 @@ typedef struct vnode { | |||
78 | #endif | 50 | #endif |
79 | struct inode v_inode; /* Linux inode */ | 51 | struct inode v_inode; /* Linux inode */ |
80 | /* inode MUST be last */ | 52 | /* inode MUST be last */ |
81 | } vnode_t; | 53 | } bhv_vnode_t; |
82 | 54 | ||
83 | #define VN_ISLNK(vp) S_ISLNK((vp)->v_inode.i_mode) | 55 | #define VN_ISLNK(vp) S_ISLNK((vp)->v_inode.i_mode) |
84 | #define VN_ISREG(vp) S_ISREG((vp)->v_inode.i_mode) | 56 | #define VN_ISREG(vp) S_ISREG((vp)->v_inode.i_mode) |
@@ -86,9 +58,6 @@ typedef struct vnode { | |||
86 | #define VN_ISCHR(vp) S_ISCHR((vp)->v_inode.i_mode) | 58 | #define VN_ISCHR(vp) S_ISCHR((vp)->v_inode.i_mode) |
87 | #define VN_ISBLK(vp) S_ISBLK((vp)->v_inode.i_mode) | 59 | #define VN_ISBLK(vp) S_ISBLK((vp)->v_inode.i_mode) |
88 | 60 | ||
89 | #define v_fbhv v_bh.bh_first /* first behavior */ | ||
90 | #define v_fops v_bh.bh_first->bd_ops /* first behavior ops */ | ||
91 | |||
92 | #define VNODE_POSITION_BASE BHV_POSITION_BASE /* chain bottom */ | 61 | #define VNODE_POSITION_BASE BHV_POSITION_BASE /* chain bottom */ |
93 | #define VNODE_POSITION_TOP BHV_POSITION_TOP /* chain top */ | 62 | #define VNODE_POSITION_TOP BHV_POSITION_TOP /* chain top */ |
94 | #define VNODE_POSITION_INVALID BHV_POSITION_INVALID /* invalid pos. num */ | 63 | #define VNODE_POSITION_INVALID BHV_POSITION_INVALID /* invalid pos. num */ |
@@ -110,8 +79,8 @@ typedef enum { | |||
110 | /* | 79 | /* |
111 | * Macros for dealing with the behavior descriptor inside of the vnode. | 80 | * Macros for dealing with the behavior descriptor inside of the vnode. |
112 | */ | 81 | */ |
113 | #define BHV_TO_VNODE(bdp) ((vnode_t *)BHV_VOBJ(bdp)) | 82 | #define BHV_TO_VNODE(bdp) ((bhv_vnode_t *)BHV_VOBJ(bdp)) |
114 | #define BHV_TO_VNODE_NULL(bdp) ((vnode_t *)BHV_VOBJNULL(bdp)) | 83 | #define BHV_TO_VNODE_NULL(bdp) ((bhv_vnode_t *)BHV_VOBJNULL(bdp)) |
115 | 84 | ||
116 | #define VN_BHV_HEAD(vp) ((bhv_head_t *)(&((vp)->v_bh))) | 85 | #define VN_BHV_HEAD(vp) ((bhv_head_t *)(&((vp)->v_bh))) |
117 | #define vn_bhv_head_init(bhp,name) bhv_head_init(bhp,name) | 86 | #define vn_bhv_head_init(bhp,name) bhv_head_init(bhp,name) |
@@ -122,17 +91,17 @@ typedef enum { | |||
122 | /* | 91 | /* |
123 | * Vnode to Linux inode mapping. | 92 | * Vnode to Linux inode mapping. |
124 | */ | 93 | */ |
125 | static inline struct vnode *vn_from_inode(struct inode *inode) | 94 | static inline struct bhv_vnode *vn_from_inode(struct inode *inode) |
126 | { | 95 | { |
127 | return (vnode_t *)list_entry(inode, vnode_t, v_inode); | 96 | return (bhv_vnode_t *)list_entry(inode, bhv_vnode_t, v_inode); |
128 | } | 97 | } |
129 | static inline struct inode *vn_to_inode(struct vnode *vnode) | 98 | static inline struct inode *vn_to_inode(struct bhv_vnode *vnode) |
130 | { | 99 | { |
131 | return &vnode->v_inode; | 100 | return &vnode->v_inode; |
132 | } | 101 | } |
133 | 102 | ||
134 | /* | 103 | /* |
135 | * Values for the VOP_RWLOCK and VOP_RWUNLOCK flags parameter. | 104 | * Values for the vop_rwlock/rwunlock flags parameter. |
136 | */ | 105 | */ |
137 | typedef enum vrwlock { | 106 | typedef enum vrwlock { |
138 | VRWLOCK_NONE, | 107 | VRWLOCK_NONE, |
@@ -144,7 +113,7 @@ typedef enum vrwlock { | |||
144 | } vrwlock_t; | 113 | } vrwlock_t; |
145 | 114 | ||
146 | /* | 115 | /* |
147 | * Return values for VOP_INACTIVE. A return value of | 116 | * Return values for bhv_vop_inactive. A return value of |
148 | * VN_INACTIVE_NOCACHE implies that the file system behavior | 117 | * VN_INACTIVE_NOCACHE implies that the file system behavior |
149 | * has disassociated its state and bhv_desc_t from the vnode. | 118 | * has disassociated its state and bhv_desc_t from the vnode. |
150 | */ | 119 | */ |
@@ -152,7 +121,7 @@ typedef enum vrwlock { | |||
152 | #define VN_INACTIVE_NOCACHE 1 | 121 | #define VN_INACTIVE_NOCACHE 1 |
153 | 122 | ||
154 | /* | 123 | /* |
155 | * Values for the cmd code given to VOP_VNODE_CHANGE. | 124 | * Values for the cmd code given to vop_vnode_change. |
156 | */ | 125 | */ |
157 | typedef enum vchange { | 126 | typedef enum vchange { |
158 | VCHANGE_FLAGS_FRLOCKS = 0, | 127 | VCHANGE_FLAGS_FRLOCKS = 0, |
@@ -188,22 +157,22 @@ typedef int (*vop_getattr_t)(bhv_desc_t *, struct vattr *, int, | |||
188 | typedef int (*vop_setattr_t)(bhv_desc_t *, struct vattr *, int, | 157 | typedef int (*vop_setattr_t)(bhv_desc_t *, struct vattr *, int, |
189 | struct cred *); | 158 | struct cred *); |
190 | typedef int (*vop_access_t)(bhv_desc_t *, int, struct cred *); | 159 | typedef int (*vop_access_t)(bhv_desc_t *, int, struct cred *); |
191 | typedef int (*vop_lookup_t)(bhv_desc_t *, vname_t *, vnode_t **, | 160 | typedef int (*vop_lookup_t)(bhv_desc_t *, vname_t *, bhv_vnode_t **, |
192 | int, vnode_t *, struct cred *); | 161 | int, bhv_vnode_t *, struct cred *); |
193 | typedef int (*vop_create_t)(bhv_desc_t *, vname_t *, struct vattr *, | 162 | typedef int (*vop_create_t)(bhv_desc_t *, vname_t *, struct vattr *, |
194 | vnode_t **, struct cred *); | 163 | bhv_vnode_t **, struct cred *); |
195 | typedef int (*vop_remove_t)(bhv_desc_t *, vname_t *, struct cred *); | 164 | typedef int (*vop_remove_t)(bhv_desc_t *, vname_t *, struct cred *); |
196 | typedef int (*vop_link_t)(bhv_desc_t *, vnode_t *, vname_t *, | 165 | typedef int (*vop_link_t)(bhv_desc_t *, bhv_vnode_t *, vname_t *, |
197 | struct cred *); | ||
198 | typedef int (*vop_rename_t)(bhv_desc_t *, vname_t *, vnode_t *, vname_t *, | ||
199 | struct cred *); | 166 | struct cred *); |
167 | typedef int (*vop_rename_t)(bhv_desc_t *, vname_t *, bhv_vnode_t *, | ||
168 | vname_t *, struct cred *); | ||
200 | typedef int (*vop_mkdir_t)(bhv_desc_t *, vname_t *, struct vattr *, | 169 | typedef int (*vop_mkdir_t)(bhv_desc_t *, vname_t *, struct vattr *, |
201 | vnode_t **, struct cred *); | 170 | bhv_vnode_t **, struct cred *); |
202 | typedef int (*vop_rmdir_t)(bhv_desc_t *, vname_t *, struct cred *); | 171 | typedef int (*vop_rmdir_t)(bhv_desc_t *, vname_t *, struct cred *); |
203 | typedef int (*vop_readdir_t)(bhv_desc_t *, struct uio *, struct cred *, | 172 | typedef int (*vop_readdir_t)(bhv_desc_t *, struct uio *, struct cred *, |
204 | int *); | 173 | int *); |
205 | typedef int (*vop_symlink_t)(bhv_desc_t *, vname_t *, struct vattr *, | 174 | typedef int (*vop_symlink_t)(bhv_desc_t *, vname_t *, struct vattr *, |
206 | char *, vnode_t **, struct cred *); | 175 | char *, bhv_vnode_t **, struct cred *); |
207 | typedef int (*vop_readlink_t)(bhv_desc_t *, struct uio *, int, | 176 | typedef int (*vop_readlink_t)(bhv_desc_t *, struct uio *, int, |
208 | struct cred *); | 177 | struct cred *); |
209 | typedef int (*vop_fsync_t)(bhv_desc_t *, int, struct cred *, | 178 | typedef int (*vop_fsync_t)(bhv_desc_t *, int, struct cred *, |
@@ -224,7 +193,7 @@ typedef int (*vop_attr_remove_t)(bhv_desc_t *, const char *, | |||
224 | int, struct cred *); | 193 | int, struct cred *); |
225 | typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, | 194 | typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, |
226 | struct attrlist_cursor_kern *, struct cred *); | 195 | struct attrlist_cursor_kern *, struct cred *); |
227 | typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int); | 196 | typedef void (*vop_link_removed_t)(bhv_desc_t *, bhv_vnode_t *, int); |
228 | typedef void (*vop_vnode_change_t)(bhv_desc_t *, vchange_t, __psint_t); | 197 | typedef void (*vop_vnode_change_t)(bhv_desc_t *, vchange_t, __psint_t); |
229 | typedef void (*vop_ptossvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int); | 198 | typedef void (*vop_ptossvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int); |
230 | typedef void (*vop_pflushinvalvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int); | 199 | typedef void (*vop_pflushinvalvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int); |
@@ -233,7 +202,7 @@ typedef int (*vop_pflushvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, | |||
233 | typedef int (*vop_iflush_t)(bhv_desc_t *, int); | 202 | typedef int (*vop_iflush_t)(bhv_desc_t *, int); |
234 | 203 | ||
235 | 204 | ||
236 | typedef struct vnodeops { | 205 | typedef struct bhv_vnodeops { |
237 | bhv_position_t vn_position; /* position within behavior chain */ | 206 | bhv_position_t vn_position; /* position within behavior chain */ |
238 | vop_open_t vop_open; | 207 | vop_open_t vop_open; |
239 | vop_close_t vop_close; | 208 | vop_close_t vop_close; |
@@ -274,105 +243,80 @@ typedef struct vnodeops { | |||
274 | vop_pflushvp_t vop_flush_pages; | 243 | vop_pflushvp_t vop_flush_pages; |
275 | vop_release_t vop_release; | 244 | vop_release_t vop_release; |
276 | vop_iflush_t vop_iflush; | 245 | vop_iflush_t vop_iflush; |
277 | } vnodeops_t; | 246 | } bhv_vnodeops_t; |
278 | 247 | ||
279 | /* | 248 | /* |
280 | * VOP's. | 249 | * Virtual node operations, operating from head bhv. |
281 | */ | ||
282 | #define _VOP_(op, vp) (*((vnodeops_t *)(vp)->v_fops)->op) | ||
283 | |||
284 | #define VOP_OPEN(vp, cr, rv) \ | ||
285 | rv = _VOP_(vop_open, vp)((vp)->v_fbhv, cr) | ||
286 | #define VOP_CLOSE(vp, f, last, cr, rv) \ | ||
287 | rv = _VOP_(vop_close, vp)((vp)->v_fbhv, f, last, cr) | ||
288 | #define VOP_READ(vp,file,iov,segs,offset,ioflags,cr,rv) \ | ||
289 | rv = _VOP_(vop_read, vp)((vp)->v_fbhv,file,iov,segs,offset,ioflags,cr) | ||
290 | #define VOP_WRITE(vp,file,iov,segs,offset,ioflags,cr,rv) \ | ||
291 | rv = _VOP_(vop_write, vp)((vp)->v_fbhv,file,iov,segs,offset,ioflags,cr) | ||
292 | #define VOP_SENDFILE(vp,f,off,ioflags,cnt,act,targ,cr,rv) \ | ||
293 | rv = _VOP_(vop_sendfile, vp)((vp)->v_fbhv,f,off,ioflags,cnt,act,targ,cr) | ||
294 | #define VOP_SPLICE_READ(vp,f,o,pipe,cnt,fl,iofl,cr,rv) \ | ||
295 | rv = _VOP_(vop_splice_read, vp)((vp)->v_fbhv,f,o,pipe,cnt,fl,iofl,cr) | ||
296 | #define VOP_SPLICE_WRITE(vp,f,o,pipe,cnt,fl,iofl,cr,rv) \ | ||
297 | rv = _VOP_(vop_splice_write, vp)((vp)->v_fbhv,f,o,pipe,cnt,fl,iofl,cr) | ||
298 | #define VOP_BMAP(vp,of,sz,rw,b,n,rv) \ | ||
299 | rv = _VOP_(vop_bmap, vp)((vp)->v_fbhv,of,sz,rw,b,n) | ||
300 | #define VOP_GETATTR(vp, vap, f, cr, rv) \ | ||
301 | rv = _VOP_(vop_getattr, vp)((vp)->v_fbhv, vap, f, cr) | ||
302 | #define VOP_SETATTR(vp, vap, f, cr, rv) \ | ||
303 | rv = _VOP_(vop_setattr, vp)((vp)->v_fbhv, vap, f, cr) | ||
304 | #define VOP_ACCESS(vp, mode, cr, rv) \ | ||
305 | rv = _VOP_(vop_access, vp)((vp)->v_fbhv, mode, cr) | ||
306 | #define VOP_LOOKUP(vp,d,vpp,f,rdir,cr,rv) \ | ||
307 | rv = _VOP_(vop_lookup, vp)((vp)->v_fbhv,d,vpp,f,rdir,cr) | ||
308 | #define VOP_CREATE(dvp,d,vap,vpp,cr,rv) \ | ||
309 | rv = _VOP_(vop_create, dvp)((dvp)->v_fbhv,d,vap,vpp,cr) | ||
310 | #define VOP_REMOVE(dvp,d,cr,rv) \ | ||
311 | rv = _VOP_(vop_remove, dvp)((dvp)->v_fbhv,d,cr) | ||
312 | #define VOP_LINK(tdvp,fvp,d,cr,rv) \ | ||
313 | rv = _VOP_(vop_link, tdvp)((tdvp)->v_fbhv,fvp,d,cr) | ||
314 | #define VOP_RENAME(fvp,fnm,tdvp,tnm,cr,rv) \ | ||
315 | rv = _VOP_(vop_rename, fvp)((fvp)->v_fbhv,fnm,tdvp,tnm,cr) | ||
316 | #define VOP_MKDIR(dp,d,vap,vpp,cr,rv) \ | ||
317 | rv = _VOP_(vop_mkdir, dp)((dp)->v_fbhv,d,vap,vpp,cr) | ||
318 | #define VOP_RMDIR(dp,d,cr,rv) \ | ||
319 | rv = _VOP_(vop_rmdir, dp)((dp)->v_fbhv,d,cr) | ||
320 | #define VOP_READDIR(vp,uiop,cr,eofp,rv) \ | ||
321 | rv = _VOP_(vop_readdir, vp)((vp)->v_fbhv,uiop,cr,eofp) | ||
322 | #define VOP_SYMLINK(dvp,d,vap,tnm,vpp,cr,rv) \ | ||
323 | rv = _VOP_(vop_symlink, dvp) ((dvp)->v_fbhv,d,vap,tnm,vpp,cr) | ||
324 | #define VOP_READLINK(vp,uiop,fl,cr,rv) \ | ||
325 | rv = _VOP_(vop_readlink, vp)((vp)->v_fbhv,uiop,fl,cr) | ||
326 | #define VOP_FSYNC(vp,f,cr,b,e,rv) \ | ||
327 | rv = _VOP_(vop_fsync, vp)((vp)->v_fbhv,f,cr,b,e) | ||
328 | #define VOP_INACTIVE(vp, cr, rv) \ | ||
329 | rv = _VOP_(vop_inactive, vp)((vp)->v_fbhv, cr) | ||
330 | #define VOP_RELEASE(vp, rv) \ | ||
331 | rv = _VOP_(vop_release, vp)((vp)->v_fbhv) | ||
332 | #define VOP_FID2(vp, fidp, rv) \ | ||
333 | rv = _VOP_(vop_fid2, vp)((vp)->v_fbhv, fidp) | ||
334 | #define VOP_RWLOCK(vp,i) \ | ||
335 | (void)_VOP_(vop_rwlock, vp)((vp)->v_fbhv, i) | ||
336 | #define VOP_RWLOCK_TRY(vp,i) \ | ||
337 | _VOP_(vop_rwlock, vp)((vp)->v_fbhv, i) | ||
338 | #define VOP_RWUNLOCK(vp,i) \ | ||
339 | (void)_VOP_(vop_rwunlock, vp)((vp)->v_fbhv, i) | ||
340 | #define VOP_FRLOCK(vp,c,fl,flags,offset,fr,rv) \ | ||
341 | rv = _VOP_(vop_frlock, vp)((vp)->v_fbhv,c,fl,flags,offset,fr) | ||
342 | #define VOP_RECLAIM(vp, rv) \ | ||
343 | rv = _VOP_(vop_reclaim, vp)((vp)->v_fbhv) | ||
344 | #define VOP_ATTR_GET(vp, name, val, vallenp, fl, cred, rv) \ | ||
345 | rv = _VOP_(vop_attr_get, vp)((vp)->v_fbhv,name,val,vallenp,fl,cred) | ||
346 | #define VOP_ATTR_SET(vp, name, val, vallen, fl, cred, rv) \ | ||
347 | rv = _VOP_(vop_attr_set, vp)((vp)->v_fbhv,name,val,vallen,fl,cred) | ||
348 | #define VOP_ATTR_REMOVE(vp, name, flags, cred, rv) \ | ||
349 | rv = _VOP_(vop_attr_remove, vp)((vp)->v_fbhv,name,flags,cred) | ||
350 | #define VOP_ATTR_LIST(vp, buf, buflen, fl, cursor, cred, rv) \ | ||
351 | rv = _VOP_(vop_attr_list, vp)((vp)->v_fbhv,buf,buflen,fl,cursor,cred) | ||
352 | #define VOP_LINK_REMOVED(vp, dvp, linkzero) \ | ||
353 | (void)_VOP_(vop_link_removed, vp)((vp)->v_fbhv, dvp, linkzero) | ||
354 | #define VOP_VNODE_CHANGE(vp, cmd, val) \ | ||
355 | (void)_VOP_(vop_vnode_change, vp)((vp)->v_fbhv,cmd,val) | ||
356 | /* | ||
357 | * These are page cache functions that now go thru VOPs. | ||
358 | * 'last' parameter is unused and left in for IRIX compatibility | ||
359 | */ | ||
360 | #define VOP_TOSS_PAGES(vp, first, last, fiopt) \ | ||
361 | _VOP_(vop_tosspages, vp)((vp)->v_fbhv,first, last, fiopt) | ||
362 | /* | ||
363 | * 'last' parameter is unused and left in for IRIX compatibility | ||
364 | */ | ||
365 | #define VOP_FLUSHINVAL_PAGES(vp, first, last, fiopt) \ | ||
366 | _VOP_(vop_flushinval_pages, vp)((vp)->v_fbhv,first,last,fiopt) | ||
367 | /* | ||
368 | * 'last' parameter is unused and left in for IRIX compatibility | ||
369 | */ | 250 | */ |
370 | #define VOP_FLUSH_PAGES(vp, first, last, flags, fiopt, rv) \ | 251 | #define VNHEAD(vp) ((vp)->v_bh.bh_first) |
371 | rv = _VOP_(vop_flush_pages, vp)((vp)->v_fbhv,first,last,flags,fiopt) | 252 | #define VOP(op, vp) (*((bhv_vnodeops_t *)VNHEAD(vp)->bd_ops)->op) |
372 | #define VOP_IOCTL(vp, inode, filp, fl, cmd, arg, rv) \ | 253 | #define bhv_vop_open(vp, cr) VOP(vop_open, vp)(VNHEAD(vp),cr) |
373 | rv = _VOP_(vop_ioctl, vp)((vp)->v_fbhv,inode,filp,fl,cmd,arg) | 254 | #define bhv_vop_close(vp, f,last,cr) VOP(vop_close, vp)(VNHEAD(vp),f,last,cr) |
374 | #define VOP_IFLUSH(vp, flags, rv) \ | 255 | #define bhv_vop_read(vp,file,iov,segs,offset,ioflags,cr) \ |
375 | rv = _VOP_(vop_iflush, vp)((vp)->v_fbhv, flags) | 256 | VOP(vop_read, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) |
257 | #define bhv_vop_write(vp,file,iov,segs,offset,ioflags,cr) \ | ||
258 | VOP(vop_write, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) | ||
259 | #define bhv_vop_sendfile(vp,f,off,ioflags,cnt,act,targ,cr) \ | ||
260 | VOP(vop_sendfile, vp)(VNHEAD(vp),f,off,ioflags,cnt,act,targ,cr) | ||
261 | #define bhv_vop_splice_read(vp,f,o,pipe,cnt,fl,iofl,cr) \ | ||
262 | VOP(vop_splice_read, vp)(VNHEAD(vp),f,o,pipe,cnt,fl,iofl,cr) | ||
263 | #define bhv_vop_splice_write(vp,f,o,pipe,cnt,fl,iofl,cr) \ | ||
264 | VOP(vop_splice_write, vp)(VNHEAD(vp),f,o,pipe,cnt,fl,iofl,cr) | ||
265 | #define bhv_vop_bmap(vp,of,sz,rw,b,n) \ | ||
266 | VOP(vop_bmap, vp)(VNHEAD(vp),of,sz,rw,b,n) | ||
267 | #define bhv_vop_getattr(vp, vap,f,cr) \ | ||
268 | VOP(vop_getattr, vp)(VNHEAD(vp), vap,f,cr) | ||
269 | #define bhv_vop_setattr(vp, vap,f,cr) \ | ||
270 | VOP(vop_setattr, vp)(VNHEAD(vp), vap,f,cr) | ||
271 | #define bhv_vop_access(vp, mode,cr) VOP(vop_access, vp)(VNHEAD(vp), mode,cr) | ||
272 | #define bhv_vop_lookup(vp,d,vpp,f,rdir,cr) \ | ||
273 | VOP(vop_lookup, vp)(VNHEAD(vp),d,vpp,f,rdir,cr) | ||
274 | #define bhv_vop_create(dvp,d,vap,vpp,cr) \ | ||
275 | VOP(vop_create, dvp)(VNHEAD(dvp),d,vap,vpp,cr) | ||
276 | #define bhv_vop_remove(dvp,d,cr) VOP(vop_remove, dvp)(VNHEAD(dvp),d,cr) | ||
277 | #define bhv_vop_link(dvp,fvp,d,cr) VOP(vop_link, dvp)(VNHEAD(dvp),fvp,d,cr) | ||
278 | #define bhv_vop_rename(fvp,fnm,tdvp,tnm,cr) \ | ||
279 | VOP(vop_rename, fvp)(VNHEAD(fvp),fnm,tdvp,tnm,cr) | ||
280 | #define bhv_vop_mkdir(dp,d,vap,vpp,cr) \ | ||
281 | VOP(vop_mkdir, dp)(VNHEAD(dp),d,vap,vpp,cr) | ||
282 | #define bhv_vop_rmdir(dp,d,cr) VOP(vop_rmdir, dp)(VNHEAD(dp),d,cr) | ||
283 | #define bhv_vop_readdir(vp,uiop,cr,eofp) \ | ||
284 | VOP(vop_readdir, vp)(VNHEAD(vp),uiop,cr,eofp) | ||
285 | #define bhv_vop_symlink(dvp,d,vap,tnm,vpp,cr) \ | ||
286 | VOP(vop_symlink, dvp)(VNHEAD(dvp),d,vap,tnm,vpp,cr) | ||
287 | #define bhv_vop_readlink(vp,uiop,fl,cr) \ | ||
288 | VOP(vop_readlink, vp)(VNHEAD(vp),uiop,fl,cr) | ||
289 | #define bhv_vop_fsync(vp,f,cr,b,e) VOP(vop_fsync, vp)(VNHEAD(vp),f,cr,b,e) | ||
290 | #define bhv_vop_inactive(vp,cr) VOP(vop_inactive, vp)(VNHEAD(vp),cr) | ||
291 | #define bhv_vop_release(vp) VOP(vop_release, vp)(VNHEAD(vp)) | ||
292 | #define bhv_vop_fid2(vp,fidp) VOP(vop_fid2, vp)(VNHEAD(vp),fidp) | ||
293 | #define bhv_vop_rwlock(vp,i) VOP(vop_rwlock, vp)(VNHEAD(vp),i) | ||
294 | #define bhv_vop_rwlock_try(vp,i) VOP(vop_rwlock, vp)(VNHEAD(vp),i) | ||
295 | #define bhv_vop_rwunlock(vp,i) VOP(vop_rwunlock, vp)(VNHEAD(vp),i) | ||
296 | #define bhv_vop_frlock(vp,c,fl,flags,offset,fr) \ | ||
297 | VOP(vop_frlock, vp)(VNHEAD(vp),c,fl,flags,offset,fr) | ||
298 | #define bhv_vop_reclaim(vp) VOP(vop_reclaim, vp)(VNHEAD(vp)) | ||
299 | #define bhv_vop_attr_get(vp, name, val, vallenp, fl, cred) \ | ||
300 | VOP(vop_attr_get, vp)(VNHEAD(vp),name,val,vallenp,fl,cred) | ||
301 | #define bhv_vop_attr_set(vp, name, val, vallen, fl, cred) \ | ||
302 | VOP(vop_attr_set, vp)(VNHEAD(vp),name,val,vallen,fl,cred) | ||
303 | #define bhv_vop_attr_remove(vp, name, flags, cred) \ | ||
304 | VOP(vop_attr_remove, vp)(VNHEAD(vp),name,flags,cred) | ||
305 | #define bhv_vop_attr_list(vp, buf, buflen, fl, cursor, cred) \ | ||
306 | VOP(vop_attr_list, vp)(VNHEAD(vp),buf,buflen,fl,cursor,cred) | ||
307 | #define bhv_vop_link_removed(vp, dvp, linkzero) \ | ||
308 | VOP(vop_link_removed, vp)(VNHEAD(vp), dvp, linkzero) | ||
309 | #define bhv_vop_vnode_change(vp, cmd, val) \ | ||
310 | VOP(vop_vnode_change, vp)(VNHEAD(vp), cmd, val) | ||
311 | #define bhv_vop_toss_pages(vp, first, last, fiopt) \ | ||
312 | VOP(vop_tosspages, vp)(VNHEAD(vp), first, last, fiopt) | ||
313 | #define bhv_vop_flushinval_pages(vp, first, last, fiopt) \ | ||
314 | VOP(vop_flushinval_pages, vp)(VNHEAD(vp),first,last,fiopt) | ||
315 | #define bhv_vop_flush_pages(vp, first, last, flags, fiopt) \ | ||
316 | VOP(vop_flush_pages, vp)(VNHEAD(vp),first,last,flags,fiopt) | ||
317 | #define bhv_vop_ioctl(vp, inode, filp, fl, cmd, arg) \ | ||
318 | VOP(vop_ioctl, vp)(VNHEAD(vp),inode,filp,fl,cmd,arg) | ||
319 | #define bhv_vop_iflush(vp, flags) VOP(vop_iflush, vp)(VNHEAD(vp), flags) | ||
376 | 320 | ||
377 | /* | 321 | /* |
378 | * Flags for read/write calls - same values as IRIX | 322 | * Flags for read/write calls - same values as IRIX |
@@ -382,7 +326,7 @@ typedef struct vnodeops { | |||
382 | #define IO_INVIS 0x00020 /* don't update inode timestamps */ | 326 | #define IO_INVIS 0x00020 /* don't update inode timestamps */ |
383 | 327 | ||
384 | /* | 328 | /* |
385 | * Flags for VOP_IFLUSH call | 329 | * Flags for vop_iflush call |
386 | */ | 330 | */ |
387 | #define FLUSH_SYNC 1 /* wait for flush to complete */ | 331 | #define FLUSH_SYNC 1 /* wait for flush to complete */ |
388 | #define FLUSH_INODE 2 /* flush the inode itself */ | 332 | #define FLUSH_INODE 2 /* flush the inode itself */ |
@@ -390,8 +334,7 @@ typedef struct vnodeops { | |||
390 | * this inode out to disk */ | 334 | * this inode out to disk */ |
391 | 335 | ||
392 | /* | 336 | /* |
393 | * Flush/Invalidate options for VOP_TOSS_PAGES, VOP_FLUSHINVAL_PAGES and | 337 | * Flush/Invalidate options for vop_toss/flush/flushinval_pages. |
394 | * VOP_FLUSH_PAGES. | ||
395 | */ | 338 | */ |
396 | #define FI_NONE 0 /* none */ | 339 | #define FI_NONE 0 /* none */ |
397 | #define FI_REMAPF 1 /* Do a remapf prior to the operation */ | 340 | #define FI_REMAPF 1 /* Do a remapf prior to the operation */ |
@@ -497,31 +440,17 @@ typedef struct vattr { | |||
497 | (VN_ISREG(vp) && ((mode) & (VSGID|(VEXEC>>3))) == VSGID) | 440 | (VN_ISREG(vp) && ((mode) & (VSGID|(VEXEC>>3))) == VSGID) |
498 | 441 | ||
499 | extern void vn_init(void); | 442 | extern void vn_init(void); |
500 | extern vnode_t *vn_initialize(struct inode *); | 443 | extern bhv_vnode_t *vn_initialize(struct inode *); |
501 | 444 | extern int vn_revalidate(struct bhv_vnode *); | |
502 | /* | 445 | extern int __vn_revalidate(struct bhv_vnode *, vattr_t *); |
503 | * vnode_map structures _must_ match vn_epoch and vnode structure sizes. | 446 | extern void vn_revalidate_core(struct bhv_vnode *, vattr_t *); |
504 | */ | ||
505 | typedef struct vnode_map { | ||
506 | bhv_vfs_t *v_vfsp; | ||
507 | vnumber_t v_number; /* in-core vnode number */ | ||
508 | xfs_ino_t v_ino; /* inode # */ | ||
509 | } vmap_t; | ||
510 | |||
511 | #define VMAP(vp, vmap) {(vmap).v_vfsp = (vp)->v_vfsp, \ | ||
512 | (vmap).v_number = (vp)->v_number, \ | ||
513 | (vmap).v_ino = (vp)->v_inode.i_ino; } | ||
514 | |||
515 | extern int vn_revalidate(struct vnode *); | ||
516 | extern int __vn_revalidate(struct vnode *, vattr_t *); | ||
517 | extern void vn_revalidate_core(struct vnode *, vattr_t *); | ||
518 | 447 | ||
519 | extern void vn_iowait(struct vnode *vp); | 448 | extern void vn_iowait(struct bhv_vnode *vp); |
520 | extern void vn_iowake(struct vnode *vp); | 449 | extern void vn_iowake(struct bhv_vnode *vp); |
521 | 450 | ||
522 | extern void vn_ioerror(struct vnode *vp, int error, char *f, int l); | 451 | extern void vn_ioerror(struct bhv_vnode *vp, int error, char *f, int l); |
523 | 452 | ||
524 | static inline int vn_count(struct vnode *vp) | 453 | static inline int vn_count(struct bhv_vnode *vp) |
525 | { | 454 | { |
526 | return atomic_read(&vn_to_inode(vp)->i_count); | 455 | return atomic_read(&vn_to_inode(vp)->i_count); |
527 | } | 456 | } |
@@ -529,7 +458,7 @@ static inline int vn_count(struct vnode *vp) | |||
529 | /* | 458 | /* |
530 | * Vnode reference counting functions (and macros for compatibility). | 459 | * Vnode reference counting functions (and macros for compatibility). |
531 | */ | 460 | */ |
532 | extern vnode_t *vn_hold(struct vnode *); | 461 | extern bhv_vnode_t *vn_hold(struct bhv_vnode *); |
533 | 462 | ||
534 | #if defined(XFS_VNODE_TRACE) | 463 | #if defined(XFS_VNODE_TRACE) |
535 | #define VN_HOLD(vp) \ | 464 | #define VN_HOLD(vp) \ |
@@ -543,7 +472,7 @@ extern vnode_t *vn_hold(struct vnode *); | |||
543 | #define VN_RELE(vp) (iput(vn_to_inode(vp))) | 472 | #define VN_RELE(vp) (iput(vn_to_inode(vp))) |
544 | #endif | 473 | #endif |
545 | 474 | ||
546 | static inline struct vnode *vn_grab(struct vnode *vp) | 475 | static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp) |
547 | { | 476 | { |
548 | struct inode *inode = igrab(vn_to_inode(vp)); | 477 | struct inode *inode = igrab(vn_to_inode(vp)); |
549 | return inode ? vn_from_inode(inode) : NULL; | 478 | return inode ? vn_from_inode(inode) : NULL; |
@@ -562,14 +491,14 @@ static inline struct vnode *vn_grab(struct vnode *vp) | |||
562 | #define VN_LOCK(vp) mutex_spinlock(&(vp)->v_lock) | 491 | #define VN_LOCK(vp) mutex_spinlock(&(vp)->v_lock) |
563 | #define VN_UNLOCK(vp, s) mutex_spinunlock(&(vp)->v_lock, s) | 492 | #define VN_UNLOCK(vp, s) mutex_spinunlock(&(vp)->v_lock, s) |
564 | 493 | ||
565 | static __inline__ void vn_flagset(struct vnode *vp, uint flag) | 494 | static __inline__ void vn_flagset(struct bhv_vnode *vp, uint flag) |
566 | { | 495 | { |
567 | spin_lock(&vp->v_lock); | 496 | spin_lock(&vp->v_lock); |
568 | vp->v_flag |= flag; | 497 | vp->v_flag |= flag; |
569 | spin_unlock(&vp->v_lock); | 498 | spin_unlock(&vp->v_lock); |
570 | } | 499 | } |
571 | 500 | ||
572 | static __inline__ uint vn_flagclr(struct vnode *vp, uint flag) | 501 | static __inline__ uint vn_flagclr(struct bhv_vnode *vp, uint flag) |
573 | { | 502 | { |
574 | uint cleared; | 503 | uint cleared; |
575 | 504 | ||
@@ -588,12 +517,12 @@ static __inline__ uint vn_flagclr(struct vnode *vp, uint flag) | |||
588 | /* | 517 | /* |
589 | * Dealing with bad inodes | 518 | * Dealing with bad inodes |
590 | */ | 519 | */ |
591 | static inline void vn_mark_bad(struct vnode *vp) | 520 | static inline void vn_mark_bad(struct bhv_vnode *vp) |
592 | { | 521 | { |
593 | make_bad_inode(vn_to_inode(vp)); | 522 | make_bad_inode(vn_to_inode(vp)); |
594 | } | 523 | } |
595 | 524 | ||
596 | static inline int VN_BAD(struct vnode *vp) | 525 | static inline int VN_BAD(struct bhv_vnode *vp) |
597 | { | 526 | { |
598 | return is_bad_inode(vn_to_inode(vp)); | 527 | return is_bad_inode(vn_to_inode(vp)); |
599 | } | 528 | } |
@@ -601,18 +530,18 @@ static inline int VN_BAD(struct vnode *vp) | |||
601 | /* | 530 | /* |
602 | * Extracting atime values in various formats | 531 | * Extracting atime values in various formats |
603 | */ | 532 | */ |
604 | static inline void vn_atime_to_bstime(struct vnode *vp, xfs_bstime_t *bs_atime) | 533 | static inline void vn_atime_to_bstime(bhv_vnode_t *vp, xfs_bstime_t *bs_atime) |
605 | { | 534 | { |
606 | bs_atime->tv_sec = vp->v_inode.i_atime.tv_sec; | 535 | bs_atime->tv_sec = vp->v_inode.i_atime.tv_sec; |
607 | bs_atime->tv_nsec = vp->v_inode.i_atime.tv_nsec; | 536 | bs_atime->tv_nsec = vp->v_inode.i_atime.tv_nsec; |
608 | } | 537 | } |
609 | 538 | ||
610 | static inline void vn_atime_to_timespec(struct vnode *vp, struct timespec *ts) | 539 | static inline void vn_atime_to_timespec(bhv_vnode_t *vp, struct timespec *ts) |
611 | { | 540 | { |
612 | *ts = vp->v_inode.i_atime; | 541 | *ts = vp->v_inode.i_atime; |
613 | } | 542 | } |
614 | 543 | ||
615 | static inline void vn_atime_to_time_t(struct vnode *vp, time_t *tt) | 544 | static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) |
616 | { | 545 | { |
617 | *tt = vp->v_inode.i_atime.tv_sec; | 546 | *tt = vp->v_inode.i_atime.tv_sec; |
618 | } | 547 | } |
@@ -627,7 +556,7 @@ static inline void vn_atime_to_time_t(struct vnode *vp, time_t *tt) | |||
627 | #define VN_TRUNC(vp) ((vp)->v_flag & VTRUNCATED) | 556 | #define VN_TRUNC(vp) ((vp)->v_flag & VTRUNCATED) |
628 | 557 | ||
629 | /* | 558 | /* |
630 | * Flags to VOP_SETATTR/VOP_GETATTR. | 559 | * Flags to vop_setattr/getattr. |
631 | */ | 560 | */ |
632 | #define ATTR_UTIME 0x01 /* non-default utime(2) request */ | 561 | #define ATTR_UTIME 0x01 /* non-default utime(2) request */ |
633 | #define ATTR_DMI 0x08 /* invocation from a DMI function */ | 562 | #define ATTR_DMI 0x08 /* invocation from a DMI function */ |
@@ -637,7 +566,7 @@ static inline void vn_atime_to_time_t(struct vnode *vp, time_t *tt) | |||
637 | #define ATTR_NOSIZETOK 0x400 /* Don't get the SIZE token */ | 566 | #define ATTR_NOSIZETOK 0x400 /* Don't get the SIZE token */ |
638 | 567 | ||
639 | /* | 568 | /* |
640 | * Flags to VOP_FSYNC and VOP_RECLAIM. | 569 | * Flags to vop_fsync/reclaim. |
641 | */ | 570 | */ |
642 | #define FSYNC_NOWAIT 0 /* asynchronous flush */ | 571 | #define FSYNC_NOWAIT 0 /* asynchronous flush */ |
643 | #define FSYNC_WAIT 0x1 /* synchronous fsync or forced reclaim */ | 572 | #define FSYNC_WAIT 0x1 /* synchronous fsync or forced reclaim */ |
@@ -656,11 +585,11 @@ static inline void vn_atime_to_time_t(struct vnode *vp, time_t *tt) | |||
656 | #define VNODE_KTRACE_REF 4 | 585 | #define VNODE_KTRACE_REF 4 |
657 | #define VNODE_KTRACE_RELE 5 | 586 | #define VNODE_KTRACE_RELE 5 |
658 | 587 | ||
659 | extern void vn_trace_entry(struct vnode *, const char *, inst_t *); | 588 | extern void vn_trace_entry(struct bhv_vnode *, const char *, inst_t *); |
660 | extern void vn_trace_exit(struct vnode *, const char *, inst_t *); | 589 | extern void vn_trace_exit(struct bhv_vnode *, const char *, inst_t *); |
661 | extern void vn_trace_hold(struct vnode *, char *, int, inst_t *); | 590 | extern void vn_trace_hold(struct bhv_vnode *, char *, int, inst_t *); |
662 | extern void vn_trace_ref(struct vnode *, char *, int, inst_t *); | 591 | extern void vn_trace_ref(struct bhv_vnode *, char *, int, inst_t *); |
663 | extern void vn_trace_rele(struct vnode *, char *, int, inst_t *); | 592 | extern void vn_trace_rele(struct bhv_vnode *, char *, int, inst_t *); |
664 | 593 | ||
665 | #define VN_TRACE(vp) \ | 594 | #define VN_TRACE(vp) \ |
666 | vn_trace_ref(vp, __FILE__, __LINE__, (inst_t *)__return_address) | 595 | vn_trace_ref(vp, __FILE__, __LINE__, (inst_t *)__return_address) |
diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c index 78f5962e5781..ad9ab104946a 100644 --- a/fs/xfs/quota/xfs_qm_bhv.c +++ b/fs/xfs/quota/xfs_qm_bhv.c | |||
@@ -192,7 +192,7 @@ STATIC int | |||
192 | xfs_qm_statvfs( | 192 | xfs_qm_statvfs( |
193 | struct bhv_desc *bhv, | 193 | struct bhv_desc *bhv, |
194 | xfs_statfs_t *statp, | 194 | xfs_statfs_t *statp, |
195 | struct vnode *vnode) | 195 | struct bhv_vnode *vnode) |
196 | { | 196 | { |
197 | xfs_mount_t *mp; | 197 | xfs_mount_t *mp; |
198 | xfs_inode_t *ip; | 198 | xfs_inode_t *ip; |
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c index afc7c1c696b8..c93072be6792 100644 --- a/fs/xfs/quota/xfs_qm_syscalls.c +++ b/fs/xfs/quota/xfs_qm_syscalls.c | |||
@@ -1035,7 +1035,7 @@ xfs_qm_dqrele_all_inodes( | |||
1035 | { | 1035 | { |
1036 | xfs_inode_t *ip, *topino; | 1036 | xfs_inode_t *ip, *topino; |
1037 | uint ireclaims; | 1037 | uint ireclaims; |
1038 | vnode_t *vp; | 1038 | bhv_vnode_t *vp; |
1039 | boolean_t vnode_refd; | 1039 | boolean_t vnode_refd; |
1040 | 1040 | ||
1041 | ASSERT(mp->m_quotainfo); | 1041 | ASSERT(mp->m_quotainfo); |
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 2539af34eb63..8c300da4e7ab 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c | |||
@@ -39,15 +39,15 @@ | |||
39 | #include <linux/capability.h> | 39 | #include <linux/capability.h> |
40 | #include <linux/posix_acl_xattr.h> | 40 | #include <linux/posix_acl_xattr.h> |
41 | 41 | ||
42 | STATIC int xfs_acl_setmode(vnode_t *, xfs_acl_t *, int *); | 42 | STATIC int xfs_acl_setmode(bhv_vnode_t *, xfs_acl_t *, int *); |
43 | STATIC void xfs_acl_filter_mode(mode_t, xfs_acl_t *); | 43 | STATIC void xfs_acl_filter_mode(mode_t, xfs_acl_t *); |
44 | STATIC void xfs_acl_get_endian(xfs_acl_t *); | 44 | STATIC void xfs_acl_get_endian(xfs_acl_t *); |
45 | STATIC int xfs_acl_access(uid_t, gid_t, xfs_acl_t *, mode_t, cred_t *); | 45 | STATIC int xfs_acl_access(uid_t, gid_t, xfs_acl_t *, mode_t, cred_t *); |
46 | STATIC int xfs_acl_invalid(xfs_acl_t *); | 46 | STATIC int xfs_acl_invalid(xfs_acl_t *); |
47 | STATIC void xfs_acl_sync_mode(mode_t, xfs_acl_t *); | 47 | STATIC void xfs_acl_sync_mode(mode_t, xfs_acl_t *); |
48 | STATIC void xfs_acl_get_attr(vnode_t *, xfs_acl_t *, int, int, int *); | 48 | STATIC void xfs_acl_get_attr(bhv_vnode_t *, xfs_acl_t *, int, int, int *); |
49 | STATIC void xfs_acl_set_attr(vnode_t *, xfs_acl_t *, int, int *); | 49 | STATIC void xfs_acl_set_attr(bhv_vnode_t *, xfs_acl_t *, int, int *); |
50 | STATIC int xfs_acl_allow_set(vnode_t *, int); | 50 | STATIC int xfs_acl_allow_set(bhv_vnode_t *, int); |
51 | 51 | ||
52 | kmem_zone_t *xfs_acl_zone; | 52 | kmem_zone_t *xfs_acl_zone; |
53 | 53 | ||
@@ -57,7 +57,7 @@ kmem_zone_t *xfs_acl_zone; | |||
57 | */ | 57 | */ |
58 | int | 58 | int |
59 | xfs_acl_vhasacl_access( | 59 | xfs_acl_vhasacl_access( |
60 | vnode_t *vp) | 60 | bhv_vnode_t *vp) |
61 | { | 61 | { |
62 | int error; | 62 | int error; |
63 | 63 | ||
@@ -70,7 +70,7 @@ xfs_acl_vhasacl_access( | |||
70 | */ | 70 | */ |
71 | int | 71 | int |
72 | xfs_acl_vhasacl_default( | 72 | xfs_acl_vhasacl_default( |
73 | vnode_t *vp) | 73 | bhv_vnode_t *vp) |
74 | { | 74 | { |
75 | int error; | 75 | int error; |
76 | 76 | ||
@@ -209,7 +209,7 @@ posix_acl_xfs_to_xattr( | |||
209 | 209 | ||
210 | int | 210 | int |
211 | xfs_acl_vget( | 211 | xfs_acl_vget( |
212 | vnode_t *vp, | 212 | bhv_vnode_t *vp, |
213 | void *acl, | 213 | void *acl, |
214 | size_t size, | 214 | size_t size, |
215 | int kind) | 215 | int kind) |
@@ -244,7 +244,7 @@ xfs_acl_vget( | |||
244 | vattr_t va; | 244 | vattr_t va; |
245 | 245 | ||
246 | va.va_mask = XFS_AT_MODE; | 246 | va.va_mask = XFS_AT_MODE; |
247 | VOP_GETATTR(vp, &va, 0, sys_cred, error); | 247 | error = bhv_vop_getattr(vp, &va, 0, sys_cred); |
248 | if (error) | 248 | if (error) |
249 | goto out; | 249 | goto out; |
250 | xfs_acl_sync_mode(va.va_mode, xfs_acl); | 250 | xfs_acl_sync_mode(va.va_mode, xfs_acl); |
@@ -260,7 +260,7 @@ out: | |||
260 | 260 | ||
261 | int | 261 | int |
262 | xfs_acl_vremove( | 262 | xfs_acl_vremove( |
263 | vnode_t *vp, | 263 | bhv_vnode_t *vp, |
264 | int kind) | 264 | int kind) |
265 | { | 265 | { |
266 | int error; | 266 | int error; |
@@ -268,9 +268,9 @@ xfs_acl_vremove( | |||
268 | VN_HOLD(vp); | 268 | VN_HOLD(vp); |
269 | error = xfs_acl_allow_set(vp, kind); | 269 | error = xfs_acl_allow_set(vp, kind); |
270 | if (!error) { | 270 | if (!error) { |
271 | VOP_ATTR_REMOVE(vp, kind == _ACL_TYPE_DEFAULT? | 271 | error = bhv_vop_attr_remove(vp, kind == _ACL_TYPE_DEFAULT? |
272 | SGI_ACL_DEFAULT: SGI_ACL_FILE, | 272 | SGI_ACL_DEFAULT: SGI_ACL_FILE, |
273 | ATTR_ROOT, sys_cred, error); | 273 | ATTR_ROOT, sys_cred); |
274 | if (error == ENOATTR) | 274 | if (error == ENOATTR) |
275 | error = 0; /* 'scool */ | 275 | error = 0; /* 'scool */ |
276 | } | 276 | } |
@@ -280,7 +280,7 @@ xfs_acl_vremove( | |||
280 | 280 | ||
281 | int | 281 | int |
282 | xfs_acl_vset( | 282 | xfs_acl_vset( |
283 | vnode_t *vp, | 283 | bhv_vnode_t *vp, |
284 | void *acl, | 284 | void *acl, |
285 | size_t size, | 285 | size_t size, |
286 | int kind) | 286 | int kind) |
@@ -370,7 +370,7 @@ xfs_acl_iaccess( | |||
370 | 370 | ||
371 | STATIC int | 371 | STATIC int |
372 | xfs_acl_allow_set( | 372 | xfs_acl_allow_set( |
373 | vnode_t *vp, | 373 | bhv_vnode_t *vp, |
374 | int kind) | 374 | int kind) |
375 | { | 375 | { |
376 | vattr_t va; | 376 | vattr_t va; |
@@ -383,7 +383,7 @@ xfs_acl_allow_set( | |||
383 | if (vp->v_vfsp->vfs_flag & VFS_RDONLY) | 383 | if (vp->v_vfsp->vfs_flag & VFS_RDONLY) |
384 | return EROFS; | 384 | return EROFS; |
385 | va.va_mask = XFS_AT_UID; | 385 | va.va_mask = XFS_AT_UID; |
386 | VOP_GETATTR(vp, &va, 0, NULL, error); | 386 | error = bhv_vop_getattr(vp, &va, 0, NULL); |
387 | if (error) | 387 | if (error) |
388 | return error; | 388 | return error; |
389 | if (va.va_uid != current->fsuid && !capable(CAP_FOWNER)) | 389 | if (va.va_uid != current->fsuid && !capable(CAP_FOWNER)) |
@@ -606,7 +606,7 @@ xfs_acl_get_endian( | |||
606 | */ | 606 | */ |
607 | STATIC void | 607 | STATIC void |
608 | xfs_acl_get_attr( | 608 | xfs_acl_get_attr( |
609 | vnode_t *vp, | 609 | bhv_vnode_t *vp, |
610 | xfs_acl_t *aclp, | 610 | xfs_acl_t *aclp, |
611 | int kind, | 611 | int kind, |
612 | int flags, | 612 | int flags, |
@@ -616,9 +616,9 @@ xfs_acl_get_attr( | |||
616 | 616 | ||
617 | ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1); | 617 | ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1); |
618 | flags |= ATTR_ROOT; | 618 | flags |= ATTR_ROOT; |
619 | VOP_ATTR_GET(vp, | 619 | *error = bhv_vop_attr_get(vp, kind == _ACL_TYPE_ACCESS ? |
620 | kind == _ACL_TYPE_ACCESS ? SGI_ACL_FILE : SGI_ACL_DEFAULT, | 620 | SGI_ACL_FILE : SGI_ACL_DEFAULT, |
621 | (char *)aclp, &len, flags, sys_cred, *error); | 621 | (char *)aclp, &len, flags, sys_cred); |
622 | if (*error || (flags & ATTR_KERNOVAL)) | 622 | if (*error || (flags & ATTR_KERNOVAL)) |
623 | return; | 623 | return; |
624 | xfs_acl_get_endian(aclp); | 624 | xfs_acl_get_endian(aclp); |
@@ -629,7 +629,7 @@ xfs_acl_get_attr( | |||
629 | */ | 629 | */ |
630 | STATIC void | 630 | STATIC void |
631 | xfs_acl_set_attr( | 631 | xfs_acl_set_attr( |
632 | vnode_t *vp, | 632 | bhv_vnode_t *vp, |
633 | xfs_acl_t *aclp, | 633 | xfs_acl_t *aclp, |
634 | int kind, | 634 | int kind, |
635 | int *error) | 635 | int *error) |
@@ -654,15 +654,15 @@ xfs_acl_set_attr( | |||
654 | INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm); | 654 | INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm); |
655 | } | 655 | } |
656 | INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt); | 656 | INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt); |
657 | VOP_ATTR_SET(vp, | 657 | *error = bhv_vop_attr_set(vp, kind == _ACL_TYPE_ACCESS ? |
658 | kind == _ACL_TYPE_ACCESS ? SGI_ACL_FILE: SGI_ACL_DEFAULT, | 658 | SGI_ACL_FILE: SGI_ACL_DEFAULT, |
659 | (char *)newacl, len, ATTR_ROOT, sys_cred, *error); | 659 | (char *)newacl, len, ATTR_ROOT, sys_cred); |
660 | _ACL_FREE(newacl); | 660 | _ACL_FREE(newacl); |
661 | } | 661 | } |
662 | 662 | ||
663 | int | 663 | int |
664 | xfs_acl_vtoacl( | 664 | xfs_acl_vtoacl( |
665 | vnode_t *vp, | 665 | bhv_vnode_t *vp, |
666 | xfs_acl_t *access_acl, | 666 | xfs_acl_t *access_acl, |
667 | xfs_acl_t *default_acl) | 667 | xfs_acl_t *default_acl) |
668 | { | 668 | { |
@@ -678,7 +678,7 @@ xfs_acl_vtoacl( | |||
678 | if (!error) { | 678 | if (!error) { |
679 | /* Got the ACL, need the mode... */ | 679 | /* Got the ACL, need the mode... */ |
680 | va.va_mask = XFS_AT_MODE; | 680 | va.va_mask = XFS_AT_MODE; |
681 | VOP_GETATTR(vp, &va, 0, sys_cred, error); | 681 | error = bhv_vop_getattr(vp, &va, 0, sys_cred); |
682 | } | 682 | } |
683 | 683 | ||
684 | if (error) | 684 | if (error) |
@@ -701,7 +701,7 @@ xfs_acl_vtoacl( | |||
701 | */ | 701 | */ |
702 | int | 702 | int |
703 | xfs_acl_inherit( | 703 | xfs_acl_inherit( |
704 | vnode_t *vp, | 704 | bhv_vnode_t *vp, |
705 | vattr_t *vap, | 705 | vattr_t *vap, |
706 | xfs_acl_t *pdaclp) | 706 | xfs_acl_t *pdaclp) |
707 | { | 707 | { |
@@ -757,7 +757,7 @@ xfs_acl_inherit( | |||
757 | */ | 757 | */ |
758 | STATIC int | 758 | STATIC int |
759 | xfs_acl_setmode( | 759 | xfs_acl_setmode( |
760 | vnode_t *vp, | 760 | bhv_vnode_t *vp, |
761 | xfs_acl_t *acl, | 761 | xfs_acl_t *acl, |
762 | int *basicperms) | 762 | int *basicperms) |
763 | { | 763 | { |
@@ -776,7 +776,7 @@ xfs_acl_setmode( | |||
776 | * mode. The m:: bits take precedence over the g:: bits. | 776 | * mode. The m:: bits take precedence over the g:: bits. |
777 | */ | 777 | */ |
778 | va.va_mask = XFS_AT_MODE; | 778 | va.va_mask = XFS_AT_MODE; |
779 | VOP_GETATTR(vp, &va, 0, sys_cred, error); | 779 | error = bhv_vop_getattr(vp, &va, 0, sys_cred); |
780 | if (error) | 780 | if (error) |
781 | return error; | 781 | return error; |
782 | 782 | ||
@@ -810,8 +810,7 @@ xfs_acl_setmode( | |||
810 | if (gap && nomask) | 810 | if (gap && nomask) |
811 | va.va_mode |= gap->ae_perm << 3; | 811 | va.va_mode |= gap->ae_perm << 3; |
812 | 812 | ||
813 | VOP_SETATTR(vp, &va, 0, sys_cred, error); | 813 | return bhv_vop_setattr(vp, &va, 0, sys_cred); |
814 | return error; | ||
815 | } | 814 | } |
816 | 815 | ||
817 | /* | 816 | /* |
diff --git a/fs/xfs/xfs_acl.h b/fs/xfs/xfs_acl.h index 538d0d65b04c..a57ff4e6d39a 100644 --- a/fs/xfs/xfs_acl.h +++ b/fs/xfs/xfs_acl.h | |||
@@ -50,7 +50,7 @@ typedef struct xfs_acl { | |||
50 | #ifdef CONFIG_XFS_POSIX_ACL | 50 | #ifdef CONFIG_XFS_POSIX_ACL |
51 | 51 | ||
52 | struct vattr; | 52 | struct vattr; |
53 | struct vnode; | 53 | struct bhv_vnode; |
54 | struct xfs_inode; | 54 | struct xfs_inode; |
55 | 55 | ||
56 | extern struct kmem_zone *xfs_acl_zone; | 56 | extern struct kmem_zone *xfs_acl_zone; |
@@ -58,14 +58,14 @@ extern struct kmem_zone *xfs_acl_zone; | |||
58 | (zone) = kmem_zone_init(sizeof(xfs_acl_t), (name)) | 58 | (zone) = kmem_zone_init(sizeof(xfs_acl_t), (name)) |
59 | #define xfs_acl_zone_destroy(zone) kmem_zone_destroy(zone) | 59 | #define xfs_acl_zone_destroy(zone) kmem_zone_destroy(zone) |
60 | 60 | ||
61 | extern int xfs_acl_inherit(struct vnode *, struct vattr *, xfs_acl_t *); | 61 | extern int xfs_acl_inherit(struct bhv_vnode *, struct vattr *, xfs_acl_t *); |
62 | extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *); | 62 | extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *); |
63 | extern int xfs_acl_vtoacl(struct vnode *, xfs_acl_t *, xfs_acl_t *); | 63 | extern int xfs_acl_vtoacl(struct bhv_vnode *, xfs_acl_t *, xfs_acl_t *); |
64 | extern int xfs_acl_vhasacl_access(struct vnode *); | 64 | extern int xfs_acl_vhasacl_access(struct bhv_vnode *); |
65 | extern int xfs_acl_vhasacl_default(struct vnode *); | 65 | extern int xfs_acl_vhasacl_default(struct bhv_vnode *); |
66 | extern int xfs_acl_vset(struct vnode *, void *, size_t, int); | 66 | extern int xfs_acl_vset(struct bhv_vnode *, void *, size_t, int); |
67 | extern int xfs_acl_vget(struct vnode *, void *, size_t, int); | 67 | extern int xfs_acl_vget(struct bhv_vnode *, void *, size_t, int); |
68 | extern int xfs_acl_vremove(struct vnode *vp, int); | 68 | extern int xfs_acl_vremove(struct bhv_vnode *, int); |
69 | 69 | ||
70 | #define _ACL_TYPE_ACCESS 1 | 70 | #define _ACL_TYPE_ACCESS 1 |
71 | #define _ACL_TYPE_DEFAULT 2 | 71 | #define _ACL_TYPE_DEFAULT 2 |
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index 3ef41e75d08a..4dcef8d1c32f 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c | |||
@@ -2324,56 +2324,56 @@ xfs_attr_trace_enter(int type, char *where, | |||
2324 | 2324 | ||
2325 | STATIC int | 2325 | STATIC int |
2326 | posix_acl_access_set( | 2326 | posix_acl_access_set( |
2327 | vnode_t *vp, char *name, void *data, size_t size, int xflags) | 2327 | bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) |
2328 | { | 2328 | { |
2329 | return xfs_acl_vset(vp, data, size, _ACL_TYPE_ACCESS); | 2329 | return xfs_acl_vset(vp, data, size, _ACL_TYPE_ACCESS); |
2330 | } | 2330 | } |
2331 | 2331 | ||
2332 | STATIC int | 2332 | STATIC int |
2333 | posix_acl_access_remove( | 2333 | posix_acl_access_remove( |
2334 | struct vnode *vp, char *name, int xflags) | 2334 | bhv_vnode_t *vp, char *name, int xflags) |
2335 | { | 2335 | { |
2336 | return xfs_acl_vremove(vp, _ACL_TYPE_ACCESS); | 2336 | return xfs_acl_vremove(vp, _ACL_TYPE_ACCESS); |
2337 | } | 2337 | } |
2338 | 2338 | ||
2339 | STATIC int | 2339 | STATIC int |
2340 | posix_acl_access_get( | 2340 | posix_acl_access_get( |
2341 | vnode_t *vp, char *name, void *data, size_t size, int xflags) | 2341 | bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) |
2342 | { | 2342 | { |
2343 | return xfs_acl_vget(vp, data, size, _ACL_TYPE_ACCESS); | 2343 | return xfs_acl_vget(vp, data, size, _ACL_TYPE_ACCESS); |
2344 | } | 2344 | } |
2345 | 2345 | ||
2346 | STATIC int | 2346 | STATIC int |
2347 | posix_acl_access_exists( | 2347 | posix_acl_access_exists( |
2348 | vnode_t *vp) | 2348 | bhv_vnode_t *vp) |
2349 | { | 2349 | { |
2350 | return xfs_acl_vhasacl_access(vp); | 2350 | return xfs_acl_vhasacl_access(vp); |
2351 | } | 2351 | } |
2352 | 2352 | ||
2353 | STATIC int | 2353 | STATIC int |
2354 | posix_acl_default_set( | 2354 | posix_acl_default_set( |
2355 | vnode_t *vp, char *name, void *data, size_t size, int xflags) | 2355 | bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) |
2356 | { | 2356 | { |
2357 | return xfs_acl_vset(vp, data, size, _ACL_TYPE_DEFAULT); | 2357 | return xfs_acl_vset(vp, data, size, _ACL_TYPE_DEFAULT); |
2358 | } | 2358 | } |
2359 | 2359 | ||
2360 | STATIC int | 2360 | STATIC int |
2361 | posix_acl_default_get( | 2361 | posix_acl_default_get( |
2362 | vnode_t *vp, char *name, void *data, size_t size, int xflags) | 2362 | bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) |
2363 | { | 2363 | { |
2364 | return xfs_acl_vget(vp, data, size, _ACL_TYPE_DEFAULT); | 2364 | return xfs_acl_vget(vp, data, size, _ACL_TYPE_DEFAULT); |
2365 | } | 2365 | } |
2366 | 2366 | ||
2367 | STATIC int | 2367 | STATIC int |
2368 | posix_acl_default_remove( | 2368 | posix_acl_default_remove( |
2369 | struct vnode *vp, char *name, int xflags) | 2369 | bhv_vnode_t *vp, char *name, int xflags) |
2370 | { | 2370 | { |
2371 | return xfs_acl_vremove(vp, _ACL_TYPE_DEFAULT); | 2371 | return xfs_acl_vremove(vp, _ACL_TYPE_DEFAULT); |
2372 | } | 2372 | } |
2373 | 2373 | ||
2374 | STATIC int | 2374 | STATIC int |
2375 | posix_acl_default_exists( | 2375 | posix_acl_default_exists( |
2376 | vnode_t *vp) | 2376 | bhv_vnode_t *vp) |
2377 | { | 2377 | { |
2378 | return xfs_acl_vhasacl_default(vp); | 2378 | return xfs_acl_vhasacl_default(vp); |
2379 | } | 2379 | } |
@@ -2406,21 +2406,18 @@ STATIC struct attrnames *attr_system_names[] = | |||
2406 | 2406 | ||
2407 | STATIC int | 2407 | STATIC int |
2408 | attr_generic_set( | 2408 | attr_generic_set( |
2409 | struct vnode *vp, char *name, void *data, size_t size, int xflags) | 2409 | bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) |
2410 | { | 2410 | { |
2411 | int error; | 2411 | return -bhv_vop_attr_set(vp, name, data, size, xflags, NULL); |
2412 | |||
2413 | VOP_ATTR_SET(vp, name, data, size, xflags, NULL, error); | ||
2414 | return -error; | ||
2415 | } | 2412 | } |
2416 | 2413 | ||
2417 | STATIC int | 2414 | STATIC int |
2418 | attr_generic_get( | 2415 | attr_generic_get( |
2419 | struct vnode *vp, char *name, void *data, size_t size, int xflags) | 2416 | bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) |
2420 | { | 2417 | { |
2421 | int error, asize = size; | 2418 | int error, asize = size; |
2422 | 2419 | ||
2423 | VOP_ATTR_GET(vp, name, data, &asize, xflags, NULL, error); | 2420 | error = bhv_vop_attr_get(vp, name, data, &asize, xflags, NULL); |
2424 | if (!error) | 2421 | if (!error) |
2425 | return asize; | 2422 | return asize; |
2426 | return -error; | 2423 | return -error; |
@@ -2428,12 +2425,9 @@ attr_generic_get( | |||
2428 | 2425 | ||
2429 | STATIC int | 2426 | STATIC int |
2430 | attr_generic_remove( | 2427 | attr_generic_remove( |
2431 | struct vnode *vp, char *name, int xflags) | 2428 | bhv_vnode_t *vp, char *name, int xflags) |
2432 | { | 2429 | { |
2433 | int error; | 2430 | return -bhv_vop_attr_remove(vp, name, xflags, NULL); |
2434 | |||
2435 | VOP_ATTR_REMOVE(vp, name, xflags, NULL, error); | ||
2436 | return -error; | ||
2437 | } | 2431 | } |
2438 | 2432 | ||
2439 | STATIC int | 2433 | STATIC int |
@@ -2461,7 +2455,7 @@ attr_generic_listadd( | |||
2461 | 2455 | ||
2462 | STATIC int | 2456 | STATIC int |
2463 | attr_system_list( | 2457 | attr_system_list( |
2464 | struct vnode *vp, | 2458 | bhv_vnode_t *vp, |
2465 | void *data, | 2459 | void *data, |
2466 | size_t size, | 2460 | size_t size, |
2467 | ssize_t *result) | 2461 | ssize_t *result) |
@@ -2483,12 +2477,12 @@ attr_system_list( | |||
2483 | 2477 | ||
2484 | int | 2478 | int |
2485 | attr_generic_list( | 2479 | attr_generic_list( |
2486 | struct vnode *vp, void *data, size_t size, int xflags, ssize_t *result) | 2480 | bhv_vnode_t *vp, void *data, size_t size, int xflags, ssize_t *result) |
2487 | { | 2481 | { |
2488 | attrlist_cursor_kern_t cursor = { 0 }; | 2482 | attrlist_cursor_kern_t cursor = { 0 }; |
2489 | int error; | 2483 | int error; |
2490 | 2484 | ||
2491 | VOP_ATTR_LIST(vp, data, size, xflags, &cursor, NULL, error); | 2485 | error = bhv_vop_attr_list(vp, data, size, xflags, &cursor, NULL); |
2492 | if (error > 0) | 2486 | if (error > 0) |
2493 | return -error; | 2487 | return -error; |
2494 | *result = -error; | 2488 | *result = -error; |
@@ -2516,7 +2510,7 @@ attr_lookup_namespace( | |||
2516 | */ | 2510 | */ |
2517 | STATIC int | 2511 | STATIC int |
2518 | attr_user_capable( | 2512 | attr_user_capable( |
2519 | struct vnode *vp, | 2513 | bhv_vnode_t *vp, |
2520 | cred_t *cred) | 2514 | cred_t *cred) |
2521 | { | 2515 | { |
2522 | struct inode *inode = vn_to_inode(vp); | 2516 | struct inode *inode = vn_to_inode(vp); |
@@ -2534,7 +2528,7 @@ attr_user_capable( | |||
2534 | 2528 | ||
2535 | STATIC int | 2529 | STATIC int |
2536 | attr_trusted_capable( | 2530 | attr_trusted_capable( |
2537 | struct vnode *vp, | 2531 | bhv_vnode_t *vp, |
2538 | cred_t *cred) | 2532 | cred_t *cred) |
2539 | { | 2533 | { |
2540 | struct inode *inode = vn_to_inode(vp); | 2534 | struct inode *inode = vn_to_inode(vp); |
@@ -2548,7 +2542,7 @@ attr_trusted_capable( | |||
2548 | 2542 | ||
2549 | STATIC int | 2543 | STATIC int |
2550 | attr_secure_capable( | 2544 | attr_secure_capable( |
2551 | struct vnode *vp, | 2545 | bhv_vnode_t *vp, |
2552 | cred_t *cred) | 2546 | cred_t *cred) |
2553 | { | 2547 | { |
2554 | return -ENOSECURITY; | 2548 | return -ENOSECURITY; |
@@ -2556,7 +2550,7 @@ attr_secure_capable( | |||
2556 | 2550 | ||
2557 | STATIC int | 2551 | STATIC int |
2558 | attr_system_set( | 2552 | attr_system_set( |
2559 | struct vnode *vp, char *name, void *data, size_t size, int xflags) | 2553 | bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) |
2560 | { | 2554 | { |
2561 | attrnames_t *namesp; | 2555 | attrnames_t *namesp; |
2562 | int error; | 2556 | int error; |
@@ -2575,7 +2569,7 @@ attr_system_set( | |||
2575 | 2569 | ||
2576 | STATIC int | 2570 | STATIC int |
2577 | attr_system_get( | 2571 | attr_system_get( |
2578 | struct vnode *vp, char *name, void *data, size_t size, int xflags) | 2572 | bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) |
2579 | { | 2573 | { |
2580 | attrnames_t *namesp; | 2574 | attrnames_t *namesp; |
2581 | 2575 | ||
@@ -2587,7 +2581,7 @@ attr_system_get( | |||
2587 | 2581 | ||
2588 | STATIC int | 2582 | STATIC int |
2589 | attr_system_remove( | 2583 | attr_system_remove( |
2590 | struct vnode *vp, char *name, int xflags) | 2584 | bhv_vnode_t *vp, char *name, int xflags) |
2591 | { | 2585 | { |
2592 | attrnames_t *namesp; | 2586 | attrnames_t *namesp; |
2593 | 2587 | ||
diff --git a/fs/xfs/xfs_attr.h b/fs/xfs/xfs_attr.h index b2c7b9fcded3..981633f6c077 100644 --- a/fs/xfs/xfs_attr.h +++ b/fs/xfs/xfs_attr.h | |||
@@ -36,13 +36,13 @@ | |||
36 | *========================================================================*/ | 36 | *========================================================================*/ |
37 | 37 | ||
38 | struct cred; | 38 | struct cred; |
39 | struct vnode; | 39 | struct bhv_vnode; |
40 | 40 | ||
41 | typedef int (*attrset_t)(struct vnode *, char *, void *, size_t, int); | 41 | typedef int (*attrset_t)(struct bhv_vnode *, char *, void *, size_t, int); |
42 | typedef int (*attrget_t)(struct vnode *, char *, void *, size_t, int); | 42 | typedef int (*attrget_t)(struct bhv_vnode *, char *, void *, size_t, int); |
43 | typedef int (*attrremove_t)(struct vnode *, char *, int); | 43 | typedef int (*attrremove_t)(struct bhv_vnode *, char *, int); |
44 | typedef int (*attrexists_t)(struct vnode *); | 44 | typedef int (*attrexists_t)(struct bhv_vnode *); |
45 | typedef int (*attrcapable_t)(struct vnode *, struct cred *); | 45 | typedef int (*attrcapable_t)(struct bhv_vnode *, struct cred *); |
46 | 46 | ||
47 | typedef struct attrnames { | 47 | typedef struct attrnames { |
48 | char * attr_name; | 48 | char * attr_name; |
@@ -63,7 +63,7 @@ extern struct attrnames attr_trusted; | |||
63 | extern struct attrnames *attr_namespaces[ATTR_NAMECOUNT]; | 63 | extern struct attrnames *attr_namespaces[ATTR_NAMECOUNT]; |
64 | 64 | ||
65 | extern attrnames_t *attr_lookup_namespace(char *, attrnames_t **, int); | 65 | extern attrnames_t *attr_lookup_namespace(char *, attrnames_t **, int); |
66 | extern int attr_generic_list(struct vnode *, void *, size_t, int, ssize_t *); | 66 | extern int attr_generic_list(struct bhv_vnode *, void *, size_t, int, ssize_t *); |
67 | 67 | ||
68 | #define ATTR_DONTFOLLOW 0x0001 /* -- unused, from IRIX -- */ | 68 | #define ATTR_DONTFOLLOW 0x0001 /* -- unused, from IRIX -- */ |
69 | #define ATTR_ROOT 0x0002 /* use attrs in root (trusted) namespace */ | 69 | #define ATTR_ROOT 0x0002 /* use attrs in root (trusted) namespace */ |
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index b4529421823b..3050b4c647c0 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -5759,7 +5759,7 @@ xfs_getbmap( | |||
5759 | __int64_t fixlen; /* length for -1 case */ | 5759 | __int64_t fixlen; /* length for -1 case */ |
5760 | int i; /* extent number */ | 5760 | int i; /* extent number */ |
5761 | xfs_inode_t *ip; /* xfs incore inode pointer */ | 5761 | xfs_inode_t *ip; /* xfs incore inode pointer */ |
5762 | vnode_t *vp; /* corresponding vnode */ | 5762 | bhv_vnode_t *vp; /* corresponding vnode */ |
5763 | int lock; /* lock state */ | 5763 | int lock; /* lock state */ |
5764 | xfs_bmbt_irec_t *map; /* buffer for user's data */ | 5764 | xfs_bmbt_irec_t *map; /* buffer for user's data */ |
5765 | xfs_mount_t *mp; /* file system mount point */ | 5765 | xfs_mount_t *mp; /* file system mount point */ |
@@ -5856,7 +5856,7 @@ xfs_getbmap( | |||
5856 | 5856 | ||
5857 | if (whichfork == XFS_DATA_FORK && ip->i_delayed_blks) { | 5857 | if (whichfork == XFS_DATA_FORK && ip->i_delayed_blks) { |
5858 | /* xfs_fsize_t last_byte = xfs_file_last_byte(ip); */ | 5858 | /* xfs_fsize_t last_byte = xfs_file_last_byte(ip); */ |
5859 | VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error); | 5859 | error = bhv_vop_flush_pages(vp, (xfs_off_t)0, -1, 0, FI_REMAPF); |
5860 | } | 5860 | } |
5861 | 5861 | ||
5862 | ASSERT(whichfork == XFS_ATTR_FORK || ip->i_delayed_blks == 0); | 5862 | ASSERT(whichfork == XFS_ATTR_FORK || ip->i_delayed_blks == 0); |
diff --git a/fs/xfs/xfs_cap.h b/fs/xfs/xfs_cap.h index d0035c6e9514..7a0e482dd436 100644 --- a/fs/xfs/xfs_cap.h +++ b/fs/xfs/xfs_cap.h | |||
@@ -49,12 +49,12 @@ typedef struct xfs_cap_set { | |||
49 | 49 | ||
50 | #include <linux/posix_cap_xattr.h> | 50 | #include <linux/posix_cap_xattr.h> |
51 | 51 | ||
52 | struct vnode; | 52 | struct bhv_vnode; |
53 | 53 | ||
54 | extern int xfs_cap_vhascap(struct vnode *); | 54 | extern int xfs_cap_vhascap(struct bhv_vnode *); |
55 | extern int xfs_cap_vset(struct vnode *, void *, size_t); | 55 | extern int xfs_cap_vset(struct bhv_vnode *, void *, size_t); |
56 | extern int xfs_cap_vget(struct vnode *, void *, size_t); | 56 | extern int xfs_cap_vget(struct bhv_vnode *, void *, size_t); |
57 | extern int xfs_cap_vremove(struct vnode *vp); | 57 | extern int xfs_cap_vremove(struct bhv_vnode *); |
58 | 58 | ||
59 | #define _CAP_EXISTS xfs_cap_vhascap | 59 | #define _CAP_EXISTS xfs_cap_vhascap |
60 | 60 | ||
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index 99daf8c0f900..29a6c866f2c3 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c | |||
@@ -57,7 +57,7 @@ xfs_swapext( | |||
57 | xfs_inode_t *ip=NULL, *tip=NULL; | 57 | xfs_inode_t *ip=NULL, *tip=NULL; |
58 | xfs_mount_t *mp; | 58 | xfs_mount_t *mp; |
59 | struct file *fp = NULL, *tfp = NULL; | 59 | struct file *fp = NULL, *tfp = NULL; |
60 | vnode_t *vp, *tvp; | 60 | bhv_vnode_t *vp, *tvp; |
61 | int error = 0; | 61 | int error = 0; |
62 | 62 | ||
63 | sxp = kmem_alloc(sizeof(xfs_swapext_t), KM_MAYFAIL); | 63 | sxp = kmem_alloc(sizeof(xfs_swapext_t), KM_MAYFAIL); |
@@ -137,7 +137,7 @@ xfs_swap_extents( | |||
137 | xfs_inode_t *ips[2]; | 137 | xfs_inode_t *ips[2]; |
138 | xfs_trans_t *tp; | 138 | xfs_trans_t *tp; |
139 | xfs_bstat_t *sbp = &sxp->sx_stat; | 139 | xfs_bstat_t *sbp = &sxp->sx_stat; |
140 | vnode_t *vp, *tvp; | 140 | bhv_vnode_t *vp, *tvp; |
141 | xfs_ifork_t *tempifp, *ifp, *tifp; | 141 | xfs_ifork_t *tempifp, *ifp, *tifp; |
142 | int ilf_fields, tilf_fields; | 142 | int ilf_fields, tilf_fields; |
143 | static uint lock_flags = XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL; | 143 | static uint lock_flags = XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL; |
@@ -202,7 +202,7 @@ xfs_swap_extents( | |||
202 | 202 | ||
203 | if (VN_CACHED(tvp) != 0) { | 203 | if (VN_CACHED(tvp) != 0) { |
204 | xfs_inval_cached_trace(&tip->i_iocore, 0, -1, 0, -1); | 204 | xfs_inval_cached_trace(&tip->i_iocore, 0, -1, 0, -1); |
205 | VOP_FLUSHINVAL_PAGES(tvp, 0, -1, FI_REMAPF_LOCKED); | 205 | bhv_vop_flushinval_pages(tvp, 0, -1, FI_REMAPF_LOCKED); |
206 | } | 206 | } |
207 | 207 | ||
208 | /* Verify O_DIRECT for ftmp */ | 208 | /* Verify O_DIRECT for ftmp */ |
@@ -247,7 +247,7 @@ xfs_swap_extents( | |||
247 | /* We need to fail if the file is memory mapped. Once we have tossed | 247 | /* We need to fail if the file is memory mapped. Once we have tossed |
248 | * all existing pages, the page fault will have no option | 248 | * all existing pages, the page fault will have no option |
249 | * but to go to the filesystem for pages. By making the page fault call | 249 | * but to go to the filesystem for pages. By making the page fault call |
250 | * VOP_READ (or write in the case of autogrow) they block on the iolock | 250 | * vop_read (or write in the case of autogrow) they block on the iolock |
251 | * until we have switched the extents. | 251 | * until we have switched the extents. |
252 | */ | 252 | */ |
253 | if (VN_MAPPED(vp)) { | 253 | if (VN_MAPPED(vp)) { |
@@ -266,7 +266,7 @@ xfs_swap_extents( | |||
266 | * fields change. | 266 | * fields change. |
267 | */ | 267 | */ |
268 | 268 | ||
269 | VOP_TOSS_PAGES(vp, 0, -1, FI_REMAPF); | 269 | bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF); |
270 | 270 | ||
271 | tp = xfs_trans_alloc(mp, XFS_TRANS_SWAPEXT); | 271 | tp = xfs_trans_alloc(mp, XFS_TRANS_SWAPEXT); |
272 | if ((error = xfs_trans_reserve(tp, 0, | 272 | if ((error = xfs_trans_reserve(tp, 0, |
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index 41f38eb60ebc..da3c94c230db 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -186,7 +186,7 @@ xfs_ihash_promote( | |||
186 | */ | 186 | */ |
187 | STATIC int | 187 | STATIC int |
188 | xfs_iget_core( | 188 | xfs_iget_core( |
189 | vnode_t *vp, | 189 | bhv_vnode_t *vp, |
190 | xfs_mount_t *mp, | 190 | xfs_mount_t *mp, |
191 | xfs_trans_t *tp, | 191 | xfs_trans_t *tp, |
192 | xfs_ino_t ino, | 192 | xfs_ino_t ino, |
@@ -198,7 +198,7 @@ xfs_iget_core( | |||
198 | xfs_ihash_t *ih; | 198 | xfs_ihash_t *ih; |
199 | xfs_inode_t *ip; | 199 | xfs_inode_t *ip; |
200 | xfs_inode_t *iq; | 200 | xfs_inode_t *iq; |
201 | vnode_t *inode_vp; | 201 | bhv_vnode_t *inode_vp; |
202 | ulong version; | 202 | ulong version; |
203 | int error; | 203 | int error; |
204 | /* REFERENCED */ | 204 | /* REFERENCED */ |
@@ -489,7 +489,7 @@ xfs_iget( | |||
489 | xfs_daddr_t bno) | 489 | xfs_daddr_t bno) |
490 | { | 490 | { |
491 | struct inode *inode; | 491 | struct inode *inode; |
492 | vnode_t *vp = NULL; | 492 | bhv_vnode_t *vp = NULL; |
493 | int error; | 493 | int error; |
494 | 494 | ||
495 | XFS_STATS_INC(xs_ig_attempts); | 495 | XFS_STATS_INC(xs_ig_attempts); |
@@ -543,7 +543,7 @@ retry: | |||
543 | void | 543 | void |
544 | xfs_inode_lock_init( | 544 | xfs_inode_lock_init( |
545 | xfs_inode_t *ip, | 545 | xfs_inode_t *ip, |
546 | vnode_t *vp) | 546 | bhv_vnode_t *vp) |
547 | { | 547 | { |
548 | mrlock_init(&ip->i_lock, MRLOCK_ALLOW_EQUAL_PRI|MRLOCK_BARRIER, | 548 | mrlock_init(&ip->i_lock, MRLOCK_ALLOW_EQUAL_PRI|MRLOCK_BARRIER, |
549 | "xfsino", (long)vp->v_number); | 549 | "xfsino", (long)vp->v_number); |
@@ -603,12 +603,10 @@ void | |||
603 | xfs_iput(xfs_inode_t *ip, | 603 | xfs_iput(xfs_inode_t *ip, |
604 | uint lock_flags) | 604 | uint lock_flags) |
605 | { | 605 | { |
606 | vnode_t *vp = XFS_ITOV(ip); | 606 | bhv_vnode_t *vp = XFS_ITOV(ip); |
607 | 607 | ||
608 | vn_trace_entry(vp, "xfs_iput", (inst_t *)__return_address); | 608 | vn_trace_entry(vp, "xfs_iput", (inst_t *)__return_address); |
609 | |||
610 | xfs_iunlock(ip, lock_flags); | 609 | xfs_iunlock(ip, lock_flags); |
611 | |||
612 | VN_RELE(vp); | 610 | VN_RELE(vp); |
613 | } | 611 | } |
614 | 612 | ||
@@ -619,7 +617,7 @@ void | |||
619 | xfs_iput_new(xfs_inode_t *ip, | 617 | xfs_iput_new(xfs_inode_t *ip, |
620 | uint lock_flags) | 618 | uint lock_flags) |
621 | { | 619 | { |
622 | vnode_t *vp = XFS_ITOV(ip); | 620 | bhv_vnode_t *vp = XFS_ITOV(ip); |
623 | struct inode *inode = vn_to_inode(vp); | 621 | struct inode *inode = vn_to_inode(vp); |
624 | 622 | ||
625 | vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address); | 623 | vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address); |
@@ -645,7 +643,7 @@ xfs_iput_new(xfs_inode_t *ip, | |||
645 | void | 643 | void |
646 | xfs_ireclaim(xfs_inode_t *ip) | 644 | xfs_ireclaim(xfs_inode_t *ip) |
647 | { | 645 | { |
648 | vnode_t *vp; | 646 | bhv_vnode_t *vp; |
649 | 647 | ||
650 | /* | 648 | /* |
651 | * Remove from old hash list and mount list. | 649 | * Remove from old hash list and mount list. |
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 0ed707ed664b..848783ba5650 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -1086,7 +1086,7 @@ xfs_ialloc( | |||
1086 | { | 1086 | { |
1087 | xfs_ino_t ino; | 1087 | xfs_ino_t ino; |
1088 | xfs_inode_t *ip; | 1088 | xfs_inode_t *ip; |
1089 | vnode_t *vp; | 1089 | bhv_vnode_t *vp; |
1090 | uint flags; | 1090 | uint flags; |
1091 | int error; | 1091 | int error; |
1092 | 1092 | ||
@@ -1427,7 +1427,7 @@ xfs_itruncate_start( | |||
1427 | xfs_fsize_t last_byte; | 1427 | xfs_fsize_t last_byte; |
1428 | xfs_off_t toss_start; | 1428 | xfs_off_t toss_start; |
1429 | xfs_mount_t *mp; | 1429 | xfs_mount_t *mp; |
1430 | vnode_t *vp; | 1430 | bhv_vnode_t *vp; |
1431 | 1431 | ||
1432 | ASSERT(ismrlocked(&ip->i_iolock, MR_UPDATE) != 0); | 1432 | ASSERT(ismrlocked(&ip->i_iolock, MR_UPDATE) != 0); |
1433 | ASSERT((new_size == 0) || (new_size <= ip->i_d.di_size)); | 1433 | ASSERT((new_size == 0) || (new_size <= ip->i_d.di_size)); |
@@ -1440,9 +1440,9 @@ xfs_itruncate_start( | |||
1440 | vn_iowait(vp); /* wait for the completion of any pending DIOs */ | 1440 | vn_iowait(vp); /* wait for the completion of any pending DIOs */ |
1441 | 1441 | ||
1442 | /* | 1442 | /* |
1443 | * Call VOP_TOSS_PAGES() or VOP_FLUSHINVAL_PAGES() to get rid of pages and buffers | 1443 | * Call toss_pages or flushinval_pages to get rid of pages |
1444 | * overlapping the region being removed. We have to use | 1444 | * overlapping the region being removed. We have to use |
1445 | * the less efficient VOP_FLUSHINVAL_PAGES() in the case that the | 1445 | * the less efficient flushinval_pages in the case that the |
1446 | * caller may not be able to finish the truncate without | 1446 | * caller may not be able to finish the truncate without |
1447 | * dropping the inode's I/O lock. Make sure | 1447 | * dropping the inode's I/O lock. Make sure |
1448 | * to catch any pages brought in by buffers overlapping | 1448 | * to catch any pages brought in by buffers overlapping |
@@ -1451,10 +1451,10 @@ xfs_itruncate_start( | |||
1451 | * so that we don't toss things on the same block as | 1451 | * so that we don't toss things on the same block as |
1452 | * new_size but before it. | 1452 | * new_size but before it. |
1453 | * | 1453 | * |
1454 | * Before calling VOP_TOSS_PAGES() or VOP_FLUSHINVAL_PAGES(), make sure to | 1454 | * Before calling toss_page or flushinval_pages, make sure to |
1455 | * call remapf() over the same region if the file is mapped. | 1455 | * call remapf() over the same region if the file is mapped. |
1456 | * This frees up mapped file references to the pages in the | 1456 | * This frees up mapped file references to the pages in the |
1457 | * given range and for the VOP_FLUSHINVAL_PAGES() case it ensures | 1457 | * given range and for the flushinval_pages case it ensures |
1458 | * that we get the latest mapped changes flushed out. | 1458 | * that we get the latest mapped changes flushed out. |
1459 | */ | 1459 | */ |
1460 | toss_start = XFS_B_TO_FSB(mp, (xfs_ufsize_t)new_size); | 1460 | toss_start = XFS_B_TO_FSB(mp, (xfs_ufsize_t)new_size); |
@@ -1472,9 +1472,9 @@ xfs_itruncate_start( | |||
1472 | last_byte); | 1472 | last_byte); |
1473 | if (last_byte > toss_start) { | 1473 | if (last_byte > toss_start) { |
1474 | if (flags & XFS_ITRUNC_DEFINITE) { | 1474 | if (flags & XFS_ITRUNC_DEFINITE) { |
1475 | VOP_TOSS_PAGES(vp, toss_start, -1, FI_REMAPF_LOCKED); | 1475 | bhv_vop_toss_pages(vp, toss_start, -1, FI_REMAPF_LOCKED); |
1476 | } else { | 1476 | } else { |
1477 | VOP_FLUSHINVAL_PAGES(vp, toss_start, -1, FI_REMAPF_LOCKED); | 1477 | bhv_vop_flushinval_pages(vp, toss_start, -1, FI_REMAPF_LOCKED); |
1478 | } | 1478 | } |
1479 | } | 1479 | } |
1480 | 1480 | ||
@@ -2752,7 +2752,7 @@ xfs_iunpin( | |||
2752 | * the inode to become unpinned. | 2752 | * the inode to become unpinned. |
2753 | */ | 2753 | */ |
2754 | if (!(ip->i_flags & (XFS_IRECLAIM|XFS_IRECLAIMABLE))) { | 2754 | if (!(ip->i_flags & (XFS_IRECLAIM|XFS_IRECLAIMABLE))) { |
2755 | vnode_t *vp = XFS_ITOV_NULL(ip); | 2755 | bhv_vnode_t *vp = XFS_ITOV_NULL(ip); |
2756 | 2756 | ||
2757 | /* make sync come back and flush this inode */ | 2757 | /* make sync come back and flush this inode */ |
2758 | if (vp) { | 2758 | if (vp) { |
@@ -3512,7 +3512,7 @@ xfs_iflush_all( | |||
3512 | xfs_mount_t *mp) | 3512 | xfs_mount_t *mp) |
3513 | { | 3513 | { |
3514 | xfs_inode_t *ip; | 3514 | xfs_inode_t *ip; |
3515 | vnode_t *vp; | 3515 | bhv_vnode_t *vp; |
3516 | 3516 | ||
3517 | again: | 3517 | again: |
3518 | XFS_MOUNT_ILOCK(mp); | 3518 | XFS_MOUNT_ILOCK(mp); |
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 233668b748f7..d10b76ed1e5b 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -102,9 +102,9 @@ typedef struct xfs_ifork { | |||
102 | 102 | ||
103 | #ifdef __KERNEL__ | 103 | #ifdef __KERNEL__ |
104 | struct bhv_desc; | 104 | struct bhv_desc; |
105 | struct bhv_vnode; | ||
105 | struct cred; | 106 | struct cred; |
106 | struct ktrace; | 107 | struct ktrace; |
107 | struct vnode; | ||
108 | struct xfs_buf; | 108 | struct xfs_buf; |
109 | struct xfs_bmap_free; | 109 | struct xfs_bmap_free; |
110 | struct xfs_bmbt_irec; | 110 | struct xfs_bmbt_irec; |
@@ -400,7 +400,7 @@ void xfs_chash_init(struct xfs_mount *); | |||
400 | void xfs_chash_free(struct xfs_mount *); | 400 | void xfs_chash_free(struct xfs_mount *); |
401 | xfs_inode_t *xfs_inode_incore(struct xfs_mount *, xfs_ino_t, | 401 | xfs_inode_t *xfs_inode_incore(struct xfs_mount *, xfs_ino_t, |
402 | struct xfs_trans *); | 402 | struct xfs_trans *); |
403 | void xfs_inode_lock_init(xfs_inode_t *, struct vnode *); | 403 | void xfs_inode_lock_init(xfs_inode_t *, struct bhv_vnode *); |
404 | int xfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, | 404 | int xfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, |
405 | uint, uint, xfs_inode_t **, xfs_daddr_t); | 405 | uint, uint, xfs_inode_t **, xfs_daddr_t); |
406 | void xfs_iput(xfs_inode_t *, uint); | 406 | void xfs_iput(xfs_inode_t *, uint); |
@@ -461,7 +461,7 @@ void xfs_ichgtime(xfs_inode_t *, int); | |||
461 | xfs_fsize_t xfs_file_last_byte(xfs_inode_t *); | 461 | xfs_fsize_t xfs_file_last_byte(xfs_inode_t *); |
462 | void xfs_lock_inodes(xfs_inode_t **, int, int, uint); | 462 | void xfs_lock_inodes(xfs_inode_t **, int, int, uint); |
463 | 463 | ||
464 | xfs_inode_t *xfs_vtoi(struct vnode *vp); | 464 | xfs_inode_t *xfs_vtoi(struct bhv_vnode *vp); |
465 | 465 | ||
466 | void xfs_synchronize_atime(xfs_inode_t *); | 466 | void xfs_synchronize_atime(xfs_inode_t *); |
467 | 467 | ||
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index 864b43d65840..a0182ced29c4 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c | |||
@@ -51,7 +51,7 @@ xfs_bulkstat_one_iget( | |||
51 | { | 51 | { |
52 | xfs_dinode_core_t *dic; /* dinode core info pointer */ | 52 | xfs_dinode_core_t *dic; /* dinode core info pointer */ |
53 | xfs_inode_t *ip; /* incore inode pointer */ | 53 | xfs_inode_t *ip; /* incore inode pointer */ |
54 | vnode_t *vp; | 54 | bhv_vnode_t *vp; |
55 | int error; | 55 | int error; |
56 | 56 | ||
57 | error = xfs_iget(mp, NULL, ino, 0, XFS_ILOCK_SHARED, &ip, bno); | 57 | error = xfs_iget(mp, NULL, ino, 0, XFS_ILOCK_SHARED, &ip, bno); |
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 56c4b7e51f4d..5ce6416fbd33 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -658,7 +658,7 @@ xfs_mountfs( | |||
658 | xfs_buf_t *bp; | 658 | xfs_buf_t *bp; |
659 | xfs_sb_t *sbp = &(mp->m_sb); | 659 | xfs_sb_t *sbp = &(mp->m_sb); |
660 | xfs_inode_t *rip; | 660 | xfs_inode_t *rip; |
661 | vnode_t *rvp = NULL; | 661 | bhv_vnode_t *rvp = NULL; |
662 | int readio_log, writeio_log; | 662 | int readio_log, writeio_log; |
663 | xfs_daddr_t d; | 663 | xfs_daddr_t d; |
664 | __uint64_t ret64; | 664 | __uint64_t ret64; |
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 7e612255f530..a70999063696 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -54,7 +54,7 @@ typedef struct xfs_trans_reservations { | |||
54 | struct cred; | 54 | struct cred; |
55 | struct log; | 55 | struct log; |
56 | struct bhv_vfs; | 56 | struct bhv_vfs; |
57 | struct vnode; | 57 | struct bhv_vnode; |
58 | struct xfs_mount_args; | 58 | struct xfs_mount_args; |
59 | struct xfs_ihash; | 59 | struct xfs_ihash; |
60 | struct xfs_chash; | 60 | struct xfs_chash; |
@@ -67,7 +67,7 @@ struct xfs_extdelta; | |||
67 | struct xfs_swapext; | 67 | struct xfs_swapext; |
68 | 68 | ||
69 | extern struct bhv_vfsops xfs_vfsops; | 69 | extern struct bhv_vfsops xfs_vfsops; |
70 | extern struct vnodeops xfs_vnodeops; | 70 | extern struct bhv_vnodeops xfs_vnodeops; |
71 | 71 | ||
72 | #define AIL_LOCK_T lock_t | 72 | #define AIL_LOCK_T lock_t |
73 | #define AIL_LOCKINIT(x,y) spinlock_init(x,y) | 73 | #define AIL_LOCKINIT(x,y) spinlock_init(x,y) |
@@ -80,15 +80,15 @@ extern struct vnodeops xfs_vnodeops; | |||
80 | * Prototypes and functions for the Data Migration subsystem. | 80 | * Prototypes and functions for the Data Migration subsystem. |
81 | */ | 81 | */ |
82 | 82 | ||
83 | typedef int (*xfs_send_data_t)(int, struct vnode *, | 83 | typedef int (*xfs_send_data_t)(int, struct bhv_vnode *, |
84 | xfs_off_t, size_t, int, vrwlock_t *); | 84 | xfs_off_t, size_t, int, vrwlock_t *); |
85 | typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); | 85 | typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); |
86 | typedef int (*xfs_send_destroy_t)(struct vnode *, dm_right_t); | 86 | typedef int (*xfs_send_destroy_t)(struct bhv_vnode *, dm_right_t); |
87 | typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *, | 87 | typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *, |
88 | struct vnode *, | 88 | struct bhv_vnode *, |
89 | dm_right_t, struct vnode *, dm_right_t, | 89 | dm_right_t, struct bhv_vnode *, dm_right_t, |
90 | char *, char *, mode_t, int, int); | 90 | char *, char *, mode_t, int, int); |
91 | typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, struct vnode *, | 91 | typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, struct bhv_vnode *, |
92 | dm_right_t, mode_t, int, int); | 92 | dm_right_t, mode_t, int, int); |
93 | 93 | ||
94 | typedef struct xfs_dmops { | 94 | typedef struct xfs_dmops { |
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index 1f148762eb28..a20566b89121 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c | |||
@@ -226,7 +226,7 @@ int | |||
226 | xfs_rename( | 226 | xfs_rename( |
227 | bhv_desc_t *src_dir_bdp, | 227 | bhv_desc_t *src_dir_bdp, |
228 | vname_t *src_vname, | 228 | vname_t *src_vname, |
229 | vnode_t *target_dir_vp, | 229 | bhv_vnode_t *target_dir_vp, |
230 | vname_t *target_vname, | 230 | vname_t *target_vname, |
231 | cred_t *credp) | 231 | cred_t *credp) |
232 | { | 232 | { |
@@ -242,7 +242,7 @@ xfs_rename( | |||
242 | int committed; | 242 | int committed; |
243 | xfs_inode_t *inodes[4]; | 243 | xfs_inode_t *inodes[4]; |
244 | int target_ip_dropped = 0; /* dropped target_ip link? */ | 244 | int target_ip_dropped = 0; /* dropped target_ip link? */ |
245 | vnode_t *src_dir_vp; | 245 | bhv_vnode_t *src_dir_vp; |
246 | int spaceres; | 246 | int spaceres; |
247 | int target_link_zero = 0; | 247 | int target_link_zero = 0; |
248 | int num_inodes; | 248 | int num_inodes; |
@@ -609,7 +609,7 @@ xfs_rename( | |||
609 | * Let interposed file systems know about removed links. | 609 | * Let interposed file systems know about removed links. |
610 | */ | 610 | */ |
611 | if (target_ip_dropped) { | 611 | if (target_ip_dropped) { |
612 | VOP_LINK_REMOVED(XFS_ITOV(target_ip), target_dir_vp, | 612 | bhv_vop_link_removed(XFS_ITOV(target_ip), target_dir_vp, |
613 | target_link_zero); | 613 | target_link_zero); |
614 | IRELE(target_ip); | 614 | IRELE(target_ip); |
615 | } | 615 | } |
diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c index 34654ec6ae10..6ecc0ca58681 100644 --- a/fs/xfs/xfs_utils.c +++ b/fs/xfs/xfs_utils.c | |||
@@ -54,7 +54,7 @@ xfs_get_dir_entry( | |||
54 | vname_t *dentry, | 54 | vname_t *dentry, |
55 | xfs_inode_t **ipp) | 55 | xfs_inode_t **ipp) |
56 | { | 56 | { |
57 | vnode_t *vp; | 57 | bhv_vnode_t *vp; |
58 | 58 | ||
59 | vp = VNAME_TO_VNODE(dentry); | 59 | vp = VNAME_TO_VNODE(dentry); |
60 | 60 | ||
@@ -73,7 +73,7 @@ xfs_dir_lookup_int( | |||
73 | xfs_ino_t *inum, | 73 | xfs_ino_t *inum, |
74 | xfs_inode_t **ipp) | 74 | xfs_inode_t **ipp) |
75 | { | 75 | { |
76 | vnode_t *dir_vp; | 76 | bhv_vnode_t *dir_vp; |
77 | xfs_inode_t *dp; | 77 | xfs_inode_t *dp; |
78 | int error; | 78 | int error; |
79 | 79 | ||
diff --git a/fs/xfs/xfs_utils.h b/fs/xfs/xfs_utils.h index 472661a3b6d8..cecf1031059b 100644 --- a/fs/xfs/xfs_utils.h +++ b/fs/xfs/xfs_utils.h | |||
@@ -23,7 +23,8 @@ | |||
23 | #define ITRACE(ip) vn_trace_ref(XFS_ITOV(ip), __FILE__, __LINE__, \ | 23 | #define ITRACE(ip) vn_trace_ref(XFS_ITOV(ip), __FILE__, __LINE__, \ |
24 | (inst_t *)__return_address) | 24 | (inst_t *)__return_address) |
25 | 25 | ||
26 | extern int xfs_rename (bhv_desc_t *, vname_t *, vnode_t *, vname_t *, cred_t *); | 26 | extern int xfs_rename (bhv_desc_t *, vname_t *, bhv_vnode_t *, |
27 | vname_t *, cred_t *); | ||
27 | extern int xfs_get_dir_entry (vname_t *, xfs_inode_t **); | 28 | extern int xfs_get_dir_entry (vname_t *, xfs_inode_t **); |
28 | extern int xfs_dir_lookup_int (bhv_desc_t *, uint, vname_t *, xfs_ino_t *, | 29 | extern int xfs_dir_lookup_int (bhv_desc_t *, uint, vname_t *, xfs_ino_t *, |
29 | xfs_inode_t **); | 30 | xfs_inode_t **); |
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 57ee2bebd248..d3f270a62c9f 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -555,7 +555,7 @@ xfs_unmount( | |||
555 | bhv_vfs_t *vfsp = bhvtovfs(bdp); | 555 | bhv_vfs_t *vfsp = bhvtovfs(bdp); |
556 | xfs_mount_t *mp = XFS_BHVTOM(bdp); | 556 | xfs_mount_t *mp = XFS_BHVTOM(bdp); |
557 | xfs_inode_t *rip; | 557 | xfs_inode_t *rip; |
558 | vnode_t *rvp; | 558 | bhv_vnode_t *rvp; |
559 | int unmount_event_wanted = 0; | 559 | int unmount_event_wanted = 0; |
560 | int unmount_event_flags = 0; | 560 | int unmount_event_flags = 0; |
561 | int xfs_unmountfs_needed = 0; | 561 | int xfs_unmountfs_needed = 0; |
@@ -701,7 +701,7 @@ xfs_unmount_flush( | |||
701 | xfs_inode_t *rip = mp->m_rootip; | 701 | xfs_inode_t *rip = mp->m_rootip; |
702 | xfs_inode_t *rbmip; | 702 | xfs_inode_t *rbmip; |
703 | xfs_inode_t *rsumip = NULL; | 703 | xfs_inode_t *rsumip = NULL; |
704 | vnode_t *rvp = XFS_ITOV(rip); | 704 | bhv_vnode_t *rvp = XFS_ITOV(rip); |
705 | int error; | 705 | int error; |
706 | 706 | ||
707 | xfs_ilock(rip, XFS_ILOCK_EXCL); | 707 | xfs_ilock(rip, XFS_ILOCK_EXCL); |
@@ -780,9 +780,9 @@ fscorrupt_out2: | |||
780 | STATIC int | 780 | STATIC int |
781 | xfs_root( | 781 | xfs_root( |
782 | bhv_desc_t *bdp, | 782 | bhv_desc_t *bdp, |
783 | vnode_t **vpp) | 783 | bhv_vnode_t **vpp) |
784 | { | 784 | { |
785 | vnode_t *vp; | 785 | bhv_vnode_t *vp; |
786 | 786 | ||
787 | vp = XFS_ITOV((XFS_BHVTOM(bdp))->m_rootip); | 787 | vp = XFS_ITOV((XFS_BHVTOM(bdp))->m_rootip); |
788 | VN_HOLD(vp); | 788 | VN_HOLD(vp); |
@@ -801,7 +801,7 @@ STATIC int | |||
801 | xfs_statvfs( | 801 | xfs_statvfs( |
802 | bhv_desc_t *bdp, | 802 | bhv_desc_t *bdp, |
803 | xfs_statfs_t *statp, | 803 | xfs_statfs_t *statp, |
804 | vnode_t *vp) | 804 | bhv_vnode_t *vp) |
805 | { | 805 | { |
806 | __uint64_t fakeinos; | 806 | __uint64_t fakeinos; |
807 | xfs_extlen_t lsize; | 807 | xfs_extlen_t lsize; |
@@ -916,7 +916,7 @@ xfs_sync_inodes( | |||
916 | xfs_inode_t *ip = NULL; | 916 | xfs_inode_t *ip = NULL; |
917 | xfs_inode_t *ip_next; | 917 | xfs_inode_t *ip_next; |
918 | xfs_buf_t *bp; | 918 | xfs_buf_t *bp; |
919 | vnode_t *vp = NULL; | 919 | bhv_vnode_t *vp = NULL; |
920 | int error; | 920 | int error; |
921 | int last_error; | 921 | int last_error; |
922 | uint64_t fflag; | 922 | uint64_t fflag; |
@@ -1155,9 +1155,9 @@ xfs_sync_inodes( | |||
1155 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | 1155 | xfs_iunlock(ip, XFS_ILOCK_SHARED); |
1156 | 1156 | ||
1157 | if (XFS_FORCED_SHUTDOWN(mp)) { | 1157 | if (XFS_FORCED_SHUTDOWN(mp)) { |
1158 | VOP_TOSS_PAGES(vp, 0, -1, FI_REMAPF); | 1158 | bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF); |
1159 | } else { | 1159 | } else { |
1160 | VOP_FLUSHINVAL_PAGES(vp, 0, -1, FI_REMAPF); | 1160 | bhv_vop_flushinval_pages(vp, 0, -1, FI_REMAPF); |
1161 | } | 1161 | } |
1162 | 1162 | ||
1163 | xfs_ilock(ip, XFS_ILOCK_SHARED); | 1163 | xfs_ilock(ip, XFS_ILOCK_SHARED); |
@@ -1177,8 +1177,8 @@ xfs_sync_inodes( | |||
1177 | * across calls to the buffer cache. | 1177 | * across calls to the buffer cache. |
1178 | */ | 1178 | */ |
1179 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | 1179 | xfs_iunlock(ip, XFS_ILOCK_SHARED); |
1180 | VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, | 1180 | error = bhv_vop_flush_pages(vp, (xfs_off_t)0, |
1181 | fflag, FI_NONE, error); | 1181 | -1, fflag, FI_NONE); |
1182 | xfs_ilock(ip, XFS_ILOCK_SHARED); | 1182 | xfs_ilock(ip, XFS_ILOCK_SHARED); |
1183 | } | 1183 | } |
1184 | 1184 | ||
@@ -1230,9 +1230,7 @@ xfs_sync_inodes( | |||
1230 | * marker and free it. | 1230 | * marker and free it. |
1231 | */ | 1231 | */ |
1232 | XFS_MOUNT_ILOCK(mp); | 1232 | XFS_MOUNT_ILOCK(mp); |
1233 | |||
1234 | IPOINTER_REMOVE(ip, mp); | 1233 | IPOINTER_REMOVE(ip, mp); |
1235 | |||
1236 | XFS_MOUNT_IUNLOCK(mp); | 1234 | XFS_MOUNT_IUNLOCK(mp); |
1237 | 1235 | ||
1238 | ASSERT(!(lock_flags & | 1236 | ASSERT(!(lock_flags & |
@@ -1573,7 +1571,7 @@ xfs_syncsub( | |||
1573 | STATIC int | 1571 | STATIC int |
1574 | xfs_vget( | 1572 | xfs_vget( |
1575 | bhv_desc_t *bdp, | 1573 | bhv_desc_t *bdp, |
1576 | vnode_t **vpp, | 1574 | bhv_vnode_t **vpp, |
1577 | fid_t *fidp) | 1575 | fid_t *fidp) |
1578 | { | 1576 | { |
1579 | xfs_mount_t *mp = XFS_BHVTOM(bdp); | 1577 | xfs_mount_t *mp = XFS_BHVTOM(bdp); |
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 35906bae92e1..f3c2deeed0a3 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -62,7 +62,7 @@ xfs_open( | |||
62 | cred_t *credp) | 62 | cred_t *credp) |
63 | { | 63 | { |
64 | int mode; | 64 | int mode; |
65 | vnode_t *vp = BHV_TO_VNODE(bdp); | 65 | bhv_vnode_t *vp = BHV_TO_VNODE(bdp); |
66 | xfs_inode_t *ip = XFS_BHVTOI(bdp); | 66 | xfs_inode_t *ip = XFS_BHVTOI(bdp); |
67 | 67 | ||
68 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) | 68 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) |
@@ -88,9 +88,8 @@ xfs_close( | |||
88 | lastclose_t lastclose, | 88 | lastclose_t lastclose, |
89 | cred_t *credp) | 89 | cred_t *credp) |
90 | { | 90 | { |
91 | vnode_t *vp = BHV_TO_VNODE(bdp); | 91 | bhv_vnode_t *vp = BHV_TO_VNODE(bdp); |
92 | xfs_inode_t *ip = XFS_BHVTOI(bdp); | 92 | xfs_inode_t *ip = XFS_BHVTOI(bdp); |
93 | int error = 0; | ||
94 | 93 | ||
95 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) | 94 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) |
96 | return XFS_ERROR(EIO); | 95 | return XFS_ERROR(EIO); |
@@ -108,8 +107,8 @@ xfs_close( | |||
108 | * window where we'd otherwise be exposed to that problem. | 107 | * window where we'd otherwise be exposed to that problem. |
109 | */ | 108 | */ |
110 | if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0) | 109 | if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0) |
111 | VOP_FLUSH_PAGES(vp, 0, -1, XFS_B_ASYNC, FI_NONE, error); | 110 | return bhv_vop_flush_pages(vp, 0, -1, XFS_B_ASYNC, FI_NONE); |
112 | return error; | 111 | return 0; |
113 | } | 112 | } |
114 | 113 | ||
115 | /* | 114 | /* |
@@ -124,7 +123,7 @@ xfs_getattr( | |||
124 | { | 123 | { |
125 | xfs_inode_t *ip; | 124 | xfs_inode_t *ip; |
126 | xfs_mount_t *mp; | 125 | xfs_mount_t *mp; |
127 | vnode_t *vp; | 126 | bhv_vnode_t *vp; |
128 | 127 | ||
129 | vp = BHV_TO_VNODE(bdp); | 128 | vp = BHV_TO_VNODE(bdp); |
130 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); | 129 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); |
@@ -265,7 +264,7 @@ xfs_setattr( | |||
265 | uid_t uid=0, iuid=0; | 264 | uid_t uid=0, iuid=0; |
266 | gid_t gid=0, igid=0; | 265 | gid_t gid=0, igid=0; |
267 | int timeflags = 0; | 266 | int timeflags = 0; |
268 | vnode_t *vp; | 267 | bhv_vnode_t *vp; |
269 | xfs_prid_t projid=0, iprojid=0; | 268 | xfs_prid_t projid=0, iprojid=0; |
270 | int mandlock_before, mandlock_after; | 269 | int mandlock_before, mandlock_after; |
271 | struct xfs_dquot *udqp, *gdqp, *olddquot1, *olddquot2; | 270 | struct xfs_dquot *udqp, *gdqp, *olddquot1, *olddquot2; |
@@ -888,7 +887,7 @@ xfs_setattr( | |||
888 | */ | 887 | */ |
889 | mandlock_after = MANDLOCK(vp, ip->i_d.di_mode); | 888 | mandlock_after = MANDLOCK(vp, ip->i_d.di_mode); |
890 | if (mandlock_before != mandlock_after) { | 889 | if (mandlock_before != mandlock_after) { |
891 | VOP_VNODE_CHANGE(vp, VCHANGE_FLAGS_ENF_LOCKING, | 890 | bhv_vop_vnode_change(vp, VCHANGE_FLAGS_ENF_LOCKING, |
892 | mandlock_after); | 891 | mandlock_after); |
893 | } | 892 | } |
894 | 893 | ||
@@ -976,7 +975,7 @@ xfs_readlink( | |||
976 | int count; | 975 | int count; |
977 | xfs_off_t offset; | 976 | xfs_off_t offset; |
978 | int pathlen; | 977 | int pathlen; |
979 | vnode_t *vp; | 978 | bhv_vnode_t *vp; |
980 | int error = 0; | 979 | int error = 0; |
981 | xfs_mount_t *mp; | 980 | xfs_mount_t *mp; |
982 | int nmaps; | 981 | int nmaps; |
@@ -1547,7 +1546,7 @@ xfs_release( | |||
1547 | bhv_desc_t *bdp) | 1546 | bhv_desc_t *bdp) |
1548 | { | 1547 | { |
1549 | xfs_inode_t *ip; | 1548 | xfs_inode_t *ip; |
1550 | vnode_t *vp; | 1549 | bhv_vnode_t *vp; |
1551 | xfs_mount_t *mp; | 1550 | xfs_mount_t *mp; |
1552 | int error; | 1551 | int error; |
1553 | 1552 | ||
@@ -1600,8 +1599,8 @@ xfs_inactive( | |||
1600 | cred_t *credp) | 1599 | cred_t *credp) |
1601 | { | 1600 | { |
1602 | xfs_inode_t *ip; | 1601 | xfs_inode_t *ip; |
1603 | vnode_t *vp; | 1602 | bhv_vnode_t *vp; |
1604 | xfs_bmap_free_t free_list; | 1603 | xfs_bmap_free_t free_list; |
1605 | xfs_fsblock_t first_block; | 1604 | xfs_fsblock_t first_block; |
1606 | int committed; | 1605 | int committed; |
1607 | xfs_trans_t *tp; | 1606 | xfs_trans_t *tp; |
@@ -1817,16 +1816,16 @@ STATIC int | |||
1817 | xfs_lookup( | 1816 | xfs_lookup( |
1818 | bhv_desc_t *dir_bdp, | 1817 | bhv_desc_t *dir_bdp, |
1819 | vname_t *dentry, | 1818 | vname_t *dentry, |
1820 | vnode_t **vpp, | 1819 | bhv_vnode_t **vpp, |
1821 | int flags, | 1820 | int flags, |
1822 | vnode_t *rdir, | 1821 | bhv_vnode_t *rdir, |
1823 | cred_t *credp) | 1822 | cred_t *credp) |
1824 | { | 1823 | { |
1825 | xfs_inode_t *dp, *ip; | 1824 | xfs_inode_t *dp, *ip; |
1826 | xfs_ino_t e_inum; | 1825 | xfs_ino_t e_inum; |
1827 | int error; | 1826 | int error; |
1828 | uint lock_mode; | 1827 | uint lock_mode; |
1829 | vnode_t *dir_vp; | 1828 | bhv_vnode_t *dir_vp; |
1830 | 1829 | ||
1831 | dir_vp = BHV_TO_VNODE(dir_bdp); | 1830 | dir_vp = BHV_TO_VNODE(dir_bdp); |
1832 | vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); | 1831 | vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); |
@@ -1855,13 +1854,13 @@ xfs_create( | |||
1855 | bhv_desc_t *dir_bdp, | 1854 | bhv_desc_t *dir_bdp, |
1856 | vname_t *dentry, | 1855 | vname_t *dentry, |
1857 | vattr_t *vap, | 1856 | vattr_t *vap, |
1858 | vnode_t **vpp, | 1857 | bhv_vnode_t **vpp, |
1859 | cred_t *credp) | 1858 | cred_t *credp) |
1860 | { | 1859 | { |
1861 | char *name = VNAME(dentry); | 1860 | char *name = VNAME(dentry); |
1862 | vnode_t *dir_vp; | 1861 | bhv_vnode_t *dir_vp; |
1863 | xfs_inode_t *dp, *ip; | 1862 | xfs_inode_t *dp, *ip; |
1864 | vnode_t *vp=NULL; | 1863 | bhv_vnode_t *vp = NULL; |
1865 | xfs_trans_t *tp; | 1864 | xfs_trans_t *tp; |
1866 | xfs_mount_t *mp; | 1865 | xfs_mount_t *mp; |
1867 | xfs_dev_t rdev; | 1866 | xfs_dev_t rdev; |
@@ -2047,7 +2046,7 @@ xfs_create( | |||
2047 | * Propagate the fact that the vnode changed after the | 2046 | * Propagate the fact that the vnode changed after the |
2048 | * xfs_inode locks have been released. | 2047 | * xfs_inode locks have been released. |
2049 | */ | 2048 | */ |
2050 | VOP_VNODE_CHANGE(vp, VCHANGE_FLAGS_TRUNCATED, 3); | 2049 | bhv_vop_vnode_change(vp, VCHANGE_FLAGS_TRUNCATED, 3); |
2051 | 2050 | ||
2052 | *vpp = vp; | 2051 | *vpp = vp; |
2053 | 2052 | ||
@@ -2345,7 +2344,7 @@ xfs_remove( | |||
2345 | vname_t *dentry, | 2344 | vname_t *dentry, |
2346 | cred_t *credp) | 2345 | cred_t *credp) |
2347 | { | 2346 | { |
2348 | vnode_t *dir_vp; | 2347 | bhv_vnode_t *dir_vp; |
2349 | char *name = VNAME(dentry); | 2348 | char *name = VNAME(dentry); |
2350 | xfs_inode_t *dp, *ip; | 2349 | xfs_inode_t *dp, *ip; |
2351 | xfs_trans_t *tp = NULL; | 2350 | xfs_trans_t *tp = NULL; |
@@ -2532,7 +2531,7 @@ xfs_remove( | |||
2532 | /* | 2531 | /* |
2533 | * Let interposed file systems know about removed links. | 2532 | * Let interposed file systems know about removed links. |
2534 | */ | 2533 | */ |
2535 | VOP_LINK_REMOVED(XFS_ITOV(ip), dir_vp, link_zero); | 2534 | bhv_vop_link_removed(XFS_ITOV(ip), dir_vp, link_zero); |
2536 | 2535 | ||
2537 | IRELE(ip); | 2536 | IRELE(ip); |
2538 | 2537 | ||
@@ -2585,7 +2584,7 @@ xfs_remove( | |||
2585 | STATIC int | 2584 | STATIC int |
2586 | xfs_link( | 2585 | xfs_link( |
2587 | bhv_desc_t *target_dir_bdp, | 2586 | bhv_desc_t *target_dir_bdp, |
2588 | vnode_t *src_vp, | 2587 | bhv_vnode_t *src_vp, |
2589 | vname_t *dentry, | 2588 | vname_t *dentry, |
2590 | cred_t *credp) | 2589 | cred_t *credp) |
2591 | { | 2590 | { |
@@ -2598,7 +2597,7 @@ xfs_link( | |||
2598 | xfs_fsblock_t first_block; | 2597 | xfs_fsblock_t first_block; |
2599 | int cancel_flags; | 2598 | int cancel_flags; |
2600 | int committed; | 2599 | int committed; |
2601 | vnode_t *target_dir_vp; | 2600 | bhv_vnode_t *target_dir_vp; |
2602 | int resblks; | 2601 | int resblks; |
2603 | char *target_name = VNAME(dentry); | 2602 | char *target_name = VNAME(dentry); |
2604 | int target_namelen; | 2603 | int target_namelen; |
@@ -2757,13 +2756,13 @@ xfs_mkdir( | |||
2757 | bhv_desc_t *dir_bdp, | 2756 | bhv_desc_t *dir_bdp, |
2758 | vname_t *dentry, | 2757 | vname_t *dentry, |
2759 | vattr_t *vap, | 2758 | vattr_t *vap, |
2760 | vnode_t **vpp, | 2759 | bhv_vnode_t **vpp, |
2761 | cred_t *credp) | 2760 | cred_t *credp) |
2762 | { | 2761 | { |
2763 | char *dir_name = VNAME(dentry); | 2762 | char *dir_name = VNAME(dentry); |
2764 | xfs_inode_t *dp; | 2763 | xfs_inode_t *dp; |
2765 | xfs_inode_t *cdp; /* inode of created dir */ | 2764 | xfs_inode_t *cdp; /* inode of created dir */ |
2766 | vnode_t *cvp; /* vnode of created dir */ | 2765 | bhv_vnode_t *cvp; /* vnode of created dir */ |
2767 | xfs_trans_t *tp; | 2766 | xfs_trans_t *tp; |
2768 | xfs_mount_t *mp; | 2767 | xfs_mount_t *mp; |
2769 | int cancel_flags; | 2768 | int cancel_flags; |
@@ -2771,7 +2770,7 @@ xfs_mkdir( | |||
2771 | int committed; | 2770 | int committed; |
2772 | xfs_bmap_free_t free_list; | 2771 | xfs_bmap_free_t free_list; |
2773 | xfs_fsblock_t first_block; | 2772 | xfs_fsblock_t first_block; |
2774 | vnode_t *dir_vp; | 2773 | bhv_vnode_t *dir_vp; |
2775 | boolean_t dp_joined_to_trans; | 2774 | boolean_t dp_joined_to_trans; |
2776 | boolean_t created = B_FALSE; | 2775 | boolean_t created = B_FALSE; |
2777 | int dm_event_sent = 0; | 2776 | int dm_event_sent = 0; |
@@ -3003,7 +3002,7 @@ xfs_rmdir( | |||
3003 | xfs_fsblock_t first_block; | 3002 | xfs_fsblock_t first_block; |
3004 | int cancel_flags; | 3003 | int cancel_flags; |
3005 | int committed; | 3004 | int committed; |
3006 | vnode_t *dir_vp; | 3005 | bhv_vnode_t *dir_vp; |
3007 | int dm_di_mode = 0; | 3006 | int dm_di_mode = 0; |
3008 | int last_cdp_link; | 3007 | int last_cdp_link; |
3009 | int namelen; | 3008 | int namelen; |
@@ -3202,7 +3201,7 @@ xfs_rmdir( | |||
3202 | /* | 3201 | /* |
3203 | * Let interposed file systems know about removed links. | 3202 | * Let interposed file systems know about removed links. |
3204 | */ | 3203 | */ |
3205 | VOP_LINK_REMOVED(XFS_ITOV(cdp), dir_vp, last_cdp_link); | 3204 | bhv_vop_link_removed(XFS_ITOV(cdp), dir_vp, last_cdp_link); |
3206 | 3205 | ||
3207 | IRELE(cdp); | 3206 | IRELE(cdp); |
3208 | 3207 | ||
@@ -3272,7 +3271,7 @@ xfs_symlink( | |||
3272 | vname_t *dentry, | 3271 | vname_t *dentry, |
3273 | vattr_t *vap, | 3272 | vattr_t *vap, |
3274 | char *target_path, | 3273 | char *target_path, |
3275 | vnode_t **vpp, | 3274 | bhv_vnode_t **vpp, |
3276 | cred_t *credp) | 3275 | cred_t *credp) |
3277 | { | 3276 | { |
3278 | xfs_trans_t *tp; | 3277 | xfs_trans_t *tp; |
@@ -3284,7 +3283,7 @@ xfs_symlink( | |||
3284 | xfs_bmap_free_t free_list; | 3283 | xfs_bmap_free_t free_list; |
3285 | xfs_fsblock_t first_block; | 3284 | xfs_fsblock_t first_block; |
3286 | boolean_t dp_joined_to_trans; | 3285 | boolean_t dp_joined_to_trans; |
3287 | vnode_t *dir_vp; | 3286 | bhv_vnode_t *dir_vp; |
3288 | uint cancel_flags; | 3287 | uint cancel_flags; |
3289 | int committed; | 3288 | int committed; |
3290 | xfs_fileoff_t first_fsb; | 3289 | xfs_fileoff_t first_fsb; |
@@ -3562,7 +3561,7 @@ std_return: | |||
3562 | } | 3561 | } |
3563 | 3562 | ||
3564 | if (!error) { | 3563 | if (!error) { |
3565 | vnode_t *vp; | 3564 | bhv_vnode_t *vp; |
3566 | 3565 | ||
3567 | ASSERT(ip); | 3566 | ASSERT(ip); |
3568 | vp = XFS_ITOV(ip); | 3567 | vp = XFS_ITOV(ip); |
@@ -3630,7 +3629,7 @@ xfs_rwlock( | |||
3630 | vrwlock_t locktype) | 3629 | vrwlock_t locktype) |
3631 | { | 3630 | { |
3632 | xfs_inode_t *ip; | 3631 | xfs_inode_t *ip; |
3633 | vnode_t *vp; | 3632 | bhv_vnode_t *vp; |
3634 | 3633 | ||
3635 | vp = BHV_TO_VNODE(bdp); | 3634 | vp = BHV_TO_VNODE(bdp); |
3636 | if (VN_ISDIR(vp)) | 3635 | if (VN_ISDIR(vp)) |
@@ -3661,7 +3660,7 @@ xfs_rwunlock( | |||
3661 | vrwlock_t locktype) | 3660 | vrwlock_t locktype) |
3662 | { | 3661 | { |
3663 | xfs_inode_t *ip; | 3662 | xfs_inode_t *ip; |
3664 | vnode_t *vp; | 3663 | bhv_vnode_t *vp; |
3665 | 3664 | ||
3666 | vp = BHV_TO_VNODE(bdp); | 3665 | vp = BHV_TO_VNODE(bdp); |
3667 | if (VN_ISDIR(vp)) | 3666 | if (VN_ISDIR(vp)) |
@@ -3810,7 +3809,7 @@ xfs_reclaim( | |||
3810 | bhv_desc_t *bdp) | 3809 | bhv_desc_t *bdp) |
3811 | { | 3810 | { |
3812 | xfs_inode_t *ip; | 3811 | xfs_inode_t *ip; |
3813 | vnode_t *vp; | 3812 | bhv_vnode_t *vp; |
3814 | 3813 | ||
3815 | vp = BHV_TO_VNODE(bdp); | 3814 | vp = BHV_TO_VNODE(bdp); |
3816 | ip = XFS_BHVTOI(bdp); | 3815 | ip = XFS_BHVTOI(bdp); |
@@ -3865,7 +3864,7 @@ xfs_finish_reclaim( | |||
3865 | int sync_mode) | 3864 | int sync_mode) |
3866 | { | 3865 | { |
3867 | xfs_ihash_t *ih = ip->i_hash; | 3866 | xfs_ihash_t *ih = ip->i_hash; |
3868 | vnode_t *vp = XFS_ITOV_NULL(ip); | 3867 | bhv_vnode_t *vp = XFS_ITOV_NULL(ip); |
3869 | int error; | 3868 | int error; |
3870 | 3869 | ||
3871 | if (vp && VN_BAD(vp)) | 3870 | if (vp && VN_BAD(vp)) |
@@ -4275,7 +4274,7 @@ xfs_free_file_space( | |||
4275 | xfs_off_t len, | 4274 | xfs_off_t len, |
4276 | int attr_flags) | 4275 | int attr_flags) |
4277 | { | 4276 | { |
4278 | vnode_t *vp; | 4277 | bhv_vnode_t *vp; |
4279 | int committed; | 4278 | int committed; |
4280 | int done; | 4279 | int done; |
4281 | xfs_off_t end_dmi_offset; | 4280 | xfs_off_t end_dmi_offset; |
@@ -4341,7 +4340,7 @@ xfs_free_file_space( | |||
4341 | if (VN_CACHED(vp) != 0) { | 4340 | if (VN_CACHED(vp) != 0) { |
4342 | xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1, | 4341 | xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1, |
4343 | ctooff(offtoct(ioffset)), -1); | 4342 | ctooff(offtoct(ioffset)), -1); |
4344 | VOP_FLUSHINVAL_PAGES(vp, ctooff(offtoct(ioffset)), | 4343 | bhv_vop_flushinval_pages(vp, ctooff(offtoct(ioffset)), |
4345 | -1, FI_REMAPF_LOCKED); | 4344 | -1, FI_REMAPF_LOCKED); |
4346 | } | 4345 | } |
4347 | 4346 | ||
@@ -4504,7 +4503,7 @@ xfs_change_file_space( | |||
4504 | xfs_off_t llen; | 4503 | xfs_off_t llen; |
4505 | xfs_trans_t *tp; | 4504 | xfs_trans_t *tp; |
4506 | vattr_t va; | 4505 | vattr_t va; |
4507 | vnode_t *vp; | 4506 | bhv_vnode_t *vp; |
4508 | 4507 | ||
4509 | vp = BHV_TO_VNODE(bdp); | 4508 | vp = BHV_TO_VNODE(bdp); |
4510 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); | 4509 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); |
@@ -4657,7 +4656,7 @@ xfs_change_file_space( | |||
4657 | return error; | 4656 | return error; |
4658 | } | 4657 | } |
4659 | 4658 | ||
4660 | vnodeops_t xfs_vnodeops = { | 4659 | bhv_vnodeops_t xfs_vnodeops = { |
4661 | BHV_IDENTITY_INIT(VN_BHV_XFS,VNODE_POSITION_XFS), | 4660 | BHV_IDENTITY_INIT(VN_BHV_XFS,VNODE_POSITION_XFS), |
4662 | .vop_open = xfs_open, | 4661 | .vop_open = xfs_open, |
4663 | .vop_close = xfs_close, | 4662 | .vop_close = xfs_close, |