aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/Makefile-linux-2.61
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c25
-rw-r--r--fs/xfs/linux-2.6/xfs_export.c8
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c49
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c40
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.c5
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c77
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.h6
-rw-r--r--fs/xfs/linux-2.6/xfs_lrw.c8
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c44
-rw-r--r--fs/xfs/linux-2.6/xfs_super.h2
-rw-r--r--fs/xfs/linux-2.6/xfs_vfs.c4
-rw-r--r--fs/xfs/linux-2.6/xfs_vfs.h5
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.c8
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h217
-rw-r--r--fs/xfs/xfs_acl.c24
-rw-r--r--fs/xfs/xfs_attr.c10
-rw-r--r--fs/xfs/xfs_bmap.c4
-rw-r--r--fs/xfs/xfs_dfrag.c6
-rw-r--r--fs/xfs/xfs_iget.c5
-rw-r--r--fs/xfs/xfs_inode.c9
-rw-r--r--fs/xfs/xfs_inode.h12
-rw-r--r--fs/xfs/xfs_mount.h1
-rw-r--r--fs/xfs/xfs_rename.c5
-rw-r--r--fs/xfs/xfs_vfsops.c11
-rw-r--r--fs/xfs/xfs_vnodeops.c30
-rw-r--r--fs/xfs/xfs_vnodeops_bhv.c438
27 files changed, 188 insertions, 866 deletions
diff --git a/fs/xfs/Makefile-linux-2.6 b/fs/xfs/Makefile-linux-2.6
index 8ed1f0475778..6d48a5ed38f3 100644
--- a/fs/xfs/Makefile-linux-2.6
+++ b/fs/xfs/Makefile-linux-2.6
@@ -89,7 +89,6 @@ xfs-y += xfs_alloc.o \
89 xfs_utils.o \ 89 xfs_utils.o \
90 xfs_vfsops.o \ 90 xfs_vfsops.o \
91 xfs_vnodeops.o \ 91 xfs_vnodeops.o \
92 xfs_vnodeops_bhv.o \
93 xfs_rw.o \ 92 xfs_rw.o \
94 xfs_dmops.o \ 93 xfs_dmops.o \
95 xfs_qmops.o 94 xfs_qmops.o
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 5f152f60d74d..28ccca98839b 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -37,6 +37,7 @@
37#include "xfs_error.h" 37#include "xfs_error.h"
38#include "xfs_rw.h" 38#include "xfs_rw.h"
39#include "xfs_iomap.h" 39#include "xfs_iomap.h"
40#include "xfs_vnodeops.h"
40#include <linux/mpage.h> 41#include <linux/mpage.h>
41#include <linux/pagevec.h> 42#include <linux/pagevec.h>
42#include <linux/writeback.h> 43#include <linux/writeback.h>
@@ -232,7 +233,8 @@ xfs_end_bio_unwritten(
232 size_t size = ioend->io_size; 233 size_t size = ioend->io_size;
233 234
234 if (likely(!ioend->io_error)) { 235 if (likely(!ioend->io_error)) {
235 bhv_vop_bmap(vp, offset, size, BMAPI_UNWRITTEN, NULL, NULL); 236 xfs_bmap(xfs_vtoi(vp), offset, size,
237 BMAPI_UNWRITTEN, NULL, NULL);
236 xfs_setfilesize(ioend); 238 xfs_setfilesize(ioend);
237 } 239 }
238 xfs_destroy_ioend(ioend); 240 xfs_destroy_ioend(ioend);
@@ -305,7 +307,8 @@ xfs_map_blocks(
305 bhv_vnode_t *vp = vn_from_inode(inode); 307 bhv_vnode_t *vp = vn_from_inode(inode);
306 int error, nmaps = 1; 308 int error, nmaps = 1;
307 309
308 error = bhv_vop_bmap(vp, offset, count, flags, mapp, &nmaps); 310 error = xfs_bmap(xfs_vtoi(vp), offset, count,
311 flags, mapp, &nmaps);
309 if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE))) 312 if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)))
310 VMODIFY(vp); 313 VMODIFY(vp);
311 return -error; 314 return -error;
@@ -1323,7 +1326,6 @@ __xfs_get_blocks(
1323 int direct, 1326 int direct,
1324 bmapi_flags_t flags) 1327 bmapi_flags_t flags)
1325{ 1328{
1326 bhv_vnode_t *vp = vn_from_inode(inode);
1327 xfs_iomap_t iomap; 1329 xfs_iomap_t iomap;
1328 xfs_off_t offset; 1330 xfs_off_t offset;
1329 ssize_t size; 1331 ssize_t size;
@@ -1333,7 +1335,7 @@ __xfs_get_blocks(
1333 offset = (xfs_off_t)iblock << inode->i_blkbits; 1335 offset = (xfs_off_t)iblock << inode->i_blkbits;
1334 ASSERT(bh_result->b_size >= (1 << inode->i_blkbits)); 1336 ASSERT(bh_result->b_size >= (1 << inode->i_blkbits));
1335 size = bh_result->b_size; 1337 size = bh_result->b_size;
1336 error = bhv_vop_bmap(vp, offset, size, 1338 error = xfs_bmap(XFS_I(inode), offset, size,
1337 create ? flags : BMAPI_READ, &iomap, &niomap); 1339 create ? flags : BMAPI_READ, &iomap, &niomap);
1338 if (error) 1340 if (error)
1339 return -error; 1341 return -error;
@@ -1481,13 +1483,13 @@ xfs_vm_direct_IO(
1481{ 1483{
1482 struct file *file = iocb->ki_filp; 1484 struct file *file = iocb->ki_filp;
1483 struct inode *inode = file->f_mapping->host; 1485 struct inode *inode = file->f_mapping->host;
1484 bhv_vnode_t *vp = vn_from_inode(inode);
1485 xfs_iomap_t iomap; 1486 xfs_iomap_t iomap;
1486 int maps = 1; 1487 int maps = 1;
1487 int error; 1488 int error;
1488 ssize_t ret; 1489 ssize_t ret;
1489 1490
1490 error = bhv_vop_bmap(vp, offset, 0, BMAPI_DEVICE, &iomap, &maps); 1491 error = xfs_bmap(XFS_I(inode), offset, 0,
1492 BMAPI_DEVICE, &iomap, &maps);
1491 if (error) 1493 if (error)
1492 return -error; 1494 return -error;
1493 1495
@@ -1528,12 +1530,13 @@ xfs_vm_bmap(
1528 sector_t block) 1530 sector_t block)
1529{ 1531{
1530 struct inode *inode = (struct inode *)mapping->host; 1532 struct inode *inode = (struct inode *)mapping->host;
1531 bhv_vnode_t *vp = vn_from_inode(inode); 1533 struct xfs_inode *ip = XFS_I(inode);
1532 1534
1533 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); 1535 vn_trace_entry(vn_from_inode(inode), __FUNCTION__,
1534 bhv_vop_rwlock(vp, VRWLOCK_READ); 1536 (inst_t *)__return_address);
1535 bhv_vop_flush_pages(vp, (xfs_off_t)0, -1, 0, FI_REMAPF); 1537 xfs_rwlock(ip, VRWLOCK_READ);
1536 bhv_vop_rwunlock(vp, VRWLOCK_READ); 1538 xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF);
1539 xfs_rwunlock(ip, VRWLOCK_READ);
1537 return generic_block_bmap(mapping, block, xfs_get_blocks); 1540 return generic_block_bmap(mapping, block, xfs_get_blocks);
1538} 1541}
1539 1542
diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c
index f6e99fa7a683..0919021d56c4 100644
--- a/fs/xfs/linux-2.6/xfs_export.c
+++ b/fs/xfs/linux-2.6/xfs_export.c
@@ -25,6 +25,9 @@
25#include "xfs_dmapi.h" 25#include "xfs_dmapi.h"
26#include "xfs_mount.h" 26#include "xfs_mount.h"
27#include "xfs_export.h" 27#include "xfs_export.h"
28#include "xfs_vnodeops.h"
29#include "xfs_bmap_btree.h"
30#include "xfs_inode.h"
28 31
29static struct dentry dotdot = { .d_name.name = "..", .d_name.len = 2, }; 32static struct dentry dotdot = { .d_name.name = "..", .d_name.len = 2, };
30 33
@@ -161,12 +164,11 @@ xfs_fs_get_parent(
161 struct dentry *child) 164 struct dentry *child)
162{ 165{
163 int error; 166 int error;
164 bhv_vnode_t *vp, *cvp; 167 bhv_vnode_t *cvp;
165 struct dentry *parent; 168 struct dentry *parent;
166 169
167 cvp = NULL; 170 cvp = NULL;
168 vp = vn_from_inode(child->d_inode); 171 error = xfs_lookup(XFS_I(child->d_inode), &dotdot, &cvp);
169 error = bhv_vop_lookup(vp, &dotdot, &cvp, 0, NULL, NULL);
170 if (unlikely(error)) 172 if (unlikely(error))
171 return ERR_PTR(-error); 173 return ERR_PTR(-error);
172 174
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index 3678f6912d04..83707708ebb1 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -37,6 +37,7 @@
37#include "xfs_error.h" 37#include "xfs_error.h"
38#include "xfs_rw.h" 38#include "xfs_rw.h"
39#include "xfs_ioctl32.h" 39#include "xfs_ioctl32.h"
40#include "xfs_vnodeops.h"
40 41
41#include <linux/dcache.h> 42#include <linux/dcache.h>
42#include <linux/smp_lock.h> 43#include <linux/smp_lock.h>
@@ -55,13 +56,12 @@ __xfs_file_read(
55 loff_t pos) 56 loff_t pos)
56{ 57{
57 struct file *file = iocb->ki_filp; 58 struct file *file = iocb->ki_filp;
58 bhv_vnode_t *vp = vn_from_inode(file->f_path.dentry->d_inode);
59 59
60 BUG_ON(iocb->ki_pos != pos); 60 BUG_ON(iocb->ki_pos != pos);
61 if (unlikely(file->f_flags & O_DIRECT)) 61 if (unlikely(file->f_flags & O_DIRECT))
62 ioflags |= IO_ISDIRECT; 62 ioflags |= IO_ISDIRECT;
63 return bhv_vop_read(vp, iocb, iov, nr_segs, &iocb->ki_pos, 63 return xfs_read(XFS_I(file->f_path.dentry->d_inode), iocb, iov,
64 ioflags, NULL); 64 nr_segs, &iocb->ki_pos, ioflags);
65} 65}
66 66
67STATIC ssize_t 67STATIC ssize_t
@@ -93,14 +93,12 @@ __xfs_file_write(
93 loff_t pos) 93 loff_t pos)
94{ 94{
95 struct file *file = iocb->ki_filp; 95 struct file *file = iocb->ki_filp;
96 struct inode *inode = file->f_mapping->host;
97 bhv_vnode_t *vp = vn_from_inode(inode);
98 96
99 BUG_ON(iocb->ki_pos != pos); 97 BUG_ON(iocb->ki_pos != pos);
100 if (unlikely(file->f_flags & O_DIRECT)) 98 if (unlikely(file->f_flags & O_DIRECT))
101 ioflags |= IO_ISDIRECT; 99 ioflags |= IO_ISDIRECT;
102 return bhv_vop_write(vp, iocb, iov, nr_segs, &iocb->ki_pos, 100 return xfs_write(XFS_I(file->f_mapping->host), iocb, iov, nr_segs,
103 ioflags, NULL); 101 &iocb->ki_pos, ioflags);
104} 102}
105 103
106STATIC ssize_t 104STATIC ssize_t
@@ -131,8 +129,8 @@ xfs_file_splice_read(
131 size_t len, 129 size_t len,
132 unsigned int flags) 130 unsigned int flags)
133{ 131{
134 return bhv_vop_splice_read(vn_from_inode(infilp->f_path.dentry->d_inode), 132 return xfs_splice_read(XFS_I(infilp->f_path.dentry->d_inode),
135 infilp, ppos, pipe, len, flags, 0, NULL); 133 infilp, ppos, pipe, len, flags, 0);
136} 134}
137 135
138STATIC ssize_t 136STATIC ssize_t
@@ -143,9 +141,8 @@ xfs_file_splice_read_invis(
143 size_t len, 141 size_t len,
144 unsigned int flags) 142 unsigned int flags)
145{ 143{
146 return bhv_vop_splice_read(vn_from_inode(infilp->f_path.dentry->d_inode), 144 return xfs_splice_read(XFS_I(infilp->f_path.dentry->d_inode),
147 infilp, ppos, pipe, len, flags, IO_INVIS, 145 infilp, ppos, pipe, len, flags, IO_INVIS);
148 NULL);
149} 146}
150 147
151STATIC ssize_t 148STATIC ssize_t
@@ -156,8 +153,8 @@ xfs_file_splice_write(
156 size_t len, 153 size_t len,
157 unsigned int flags) 154 unsigned int flags)
158{ 155{
159 return bhv_vop_splice_write(vn_from_inode(outfilp->f_path.dentry->d_inode), 156 return xfs_splice_write(XFS_I(outfilp->f_path.dentry->d_inode),
160 pipe, outfilp, ppos, len, flags, 0, NULL); 157 pipe, outfilp, ppos, len, flags, 0);
161} 158}
162 159
163STATIC ssize_t 160STATIC ssize_t
@@ -168,9 +165,8 @@ xfs_file_splice_write_invis(
168 size_t len, 165 size_t len,
169 unsigned int flags) 166 unsigned int flags)
170{ 167{
171 return bhv_vop_splice_write(vn_from_inode(outfilp->f_path.dentry->d_inode), 168 return xfs_splice_write(XFS_I(outfilp->f_path.dentry->d_inode),
172 pipe, outfilp, ppos, len, flags, IO_INVIS, 169 pipe, outfilp, ppos, len, flags, IO_INVIS);
173 NULL);
174} 170}
175 171
176STATIC int 172STATIC int
@@ -180,7 +176,7 @@ xfs_file_open(
180{ 176{
181 if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS) 177 if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS)
182 return -EFBIG; 178 return -EFBIG;
183 return -bhv_vop_open(vn_from_inode(inode), NULL); 179 return -xfs_open(XFS_I(inode));
184} 180}
185 181
186STATIC int 182STATIC int
@@ -188,11 +184,7 @@ xfs_file_release(
188 struct inode *inode, 184 struct inode *inode,
189 struct file *filp) 185 struct file *filp)
190{ 186{
191 bhv_vnode_t *vp = vn_from_inode(inode); 187 return -xfs_release(XFS_I(inode));
192
193 if (vp)
194 return -bhv_vop_release(vp);
195 return 0;
196} 188}
197 189
198STATIC int 190STATIC int
@@ -208,7 +200,8 @@ xfs_file_fsync(
208 flags |= FSYNC_DATA; 200 flags |= FSYNC_DATA;
209 if (VN_TRUNC(vp)) 201 if (VN_TRUNC(vp))
210 VUNTRUNCATE(vp); 202 VUNTRUNCATE(vp);
211 return -bhv_vop_fsync(vp, flags, NULL, (xfs_off_t)0, (xfs_off_t)-1); 203 return -xfs_fsync(XFS_I(dentry->d_inode), flags,
204 (xfs_off_t)0, (xfs_off_t)-1);
212} 205}
213 206
214#ifdef CONFIG_XFS_DMAPI 207#ifdef CONFIG_XFS_DMAPI
@@ -234,7 +227,7 @@ xfs_file_readdir(
234 filldir_t filldir) 227 filldir_t filldir)
235{ 228{
236 struct inode *inode = filp->f_path.dentry->d_inode; 229 struct inode *inode = filp->f_path.dentry->d_inode;
237 bhv_vnode_t *vp = vn_from_inode(inode); 230 xfs_inode_t *ip = XFS_I(inode);
238 int error; 231 int error;
239 size_t bufsize; 232 size_t bufsize;
240 233
@@ -252,7 +245,7 @@ xfs_file_readdir(
252 */ 245 */
253 bufsize = (size_t)min_t(loff_t, PAGE_SIZE, inode->i_size); 246 bufsize = (size_t)min_t(loff_t, PAGE_SIZE, inode->i_size);
254 247
255 error = bhv_vop_readdir(vp, dirent, bufsize, 248 error = xfs_readdir(ip, dirent, bufsize,
256 (xfs_off_t *)&filp->f_pos, filldir); 249 (xfs_off_t *)&filp->f_pos, filldir);
257 if (error) 250 if (error)
258 return -error; 251 return -error;
@@ -286,7 +279,7 @@ xfs_file_ioctl(
286 struct inode *inode = filp->f_path.dentry->d_inode; 279 struct inode *inode = filp->f_path.dentry->d_inode;
287 bhv_vnode_t *vp = vn_from_inode(inode); 280 bhv_vnode_t *vp = vn_from_inode(inode);
288 281
289 error = bhv_vop_ioctl(vp, inode, filp, 0, cmd, (void __user *)p); 282 error = xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p);
290 VMODIFY(vp); 283 VMODIFY(vp);
291 284
292 /* NOTE: some of the ioctl's return positive #'s as a 285 /* NOTE: some of the ioctl's return positive #'s as a
@@ -308,7 +301,7 @@ xfs_file_ioctl_invis(
308 struct inode *inode = filp->f_path.dentry->d_inode; 301 struct inode *inode = filp->f_path.dentry->d_inode;
309 bhv_vnode_t *vp = vn_from_inode(inode); 302 bhv_vnode_t *vp = vn_from_inode(inode);
310 303
311 error = bhv_vop_ioctl(vp, inode, filp, IO_INVIS, cmd, (void __user *)p); 304 error = xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p);
312 VMODIFY(vp); 305 VMODIFY(vp);
313 306
314 /* NOTE: some of the ioctl's return positive #'s as a 307 /* NOTE: some of the ioctl's return positive #'s as a
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index f36902fa714d..9bba9f8be1eb 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -413,7 +413,7 @@ xfs_readlink_by_handle(
413 if (!link) 413 if (!link)
414 goto out_iput; 414 goto out_iput;
415 415
416 error = -bhv_vop_readlink(vp, link); 416 error = -xfs_readlink(XFS_I(inode), link);
417 if (error) 417 if (error)
418 goto out_kfree; 418 goto out_kfree;
419 error = do_readlink(hreq.ohandle, olen, link); 419 error = do_readlink(hreq.ohandle, olen, link);
@@ -497,8 +497,8 @@ xfs_attrlist_by_handle(
497 goto out_vn_rele; 497 goto out_vn_rele;
498 498
499 cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; 499 cursor = (attrlist_cursor_kern_t *)&al_hreq.pos;
500 error = bhv_vop_attr_list(vp, kbuf, al_hreq.buflen, al_hreq.flags, 500 error = xfs_attr_list(XFS_I(inode), kbuf, al_hreq.buflen,
501 cursor, NULL); 501 al_hreq.flags, cursor);
502 if (error) 502 if (error)
503 goto out_kfree; 503 goto out_kfree;
504 504
@@ -515,7 +515,7 @@ xfs_attrlist_by_handle(
515 515
516STATIC int 516STATIC int
517xfs_attrmulti_attr_get( 517xfs_attrmulti_attr_get(
518 bhv_vnode_t *vp, 518 struct inode *inode,
519 char *name, 519 char *name,
520 char __user *ubuf, 520 char __user *ubuf,
521 __uint32_t *len, 521 __uint32_t *len,
@@ -530,7 +530,7 @@ xfs_attrmulti_attr_get(
530 if (!kbuf) 530 if (!kbuf)
531 return ENOMEM; 531 return ENOMEM;
532 532
533 error = bhv_vop_attr_get(vp, name, kbuf, len, flags, NULL); 533 error = xfs_attr_get(XFS_I(inode), name, kbuf, len, flags, NULL);
534 if (error) 534 if (error)
535 goto out_kfree; 535 goto out_kfree;
536 536
@@ -544,7 +544,7 @@ xfs_attrmulti_attr_get(
544 544
545STATIC int 545STATIC int
546xfs_attrmulti_attr_set( 546xfs_attrmulti_attr_set(
547 bhv_vnode_t *vp, 547 struct inode *inode,
548 char *name, 548 char *name,
549 const char __user *ubuf, 549 const char __user *ubuf,
550 __uint32_t len, 550 __uint32_t len,
@@ -553,9 +553,9 @@ xfs_attrmulti_attr_set(
553 char *kbuf; 553 char *kbuf;
554 int error = EFAULT; 554 int error = EFAULT;
555 555
556 if (IS_RDONLY(&vp->v_inode)) 556 if (IS_RDONLY(inode))
557 return -EROFS; 557 return -EROFS;
558 if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) 558 if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
559 return EPERM; 559 return EPERM;
560 if (len > XATTR_SIZE_MAX) 560 if (len > XATTR_SIZE_MAX)
561 return EINVAL; 561 return EINVAL;
@@ -567,7 +567,7 @@ xfs_attrmulti_attr_set(
567 if (copy_from_user(kbuf, ubuf, len)) 567 if (copy_from_user(kbuf, ubuf, len))
568 goto out_kfree; 568 goto out_kfree;
569 569
570 error = bhv_vop_attr_set(vp, name, kbuf, len, flags, NULL); 570 error = xfs_attr_set(XFS_I(inode), name, kbuf, len, flags);
571 571
572 out_kfree: 572 out_kfree:
573 kfree(kbuf); 573 kfree(kbuf);
@@ -576,15 +576,15 @@ xfs_attrmulti_attr_set(
576 576
577STATIC int 577STATIC int
578xfs_attrmulti_attr_remove( 578xfs_attrmulti_attr_remove(
579 bhv_vnode_t *vp, 579 struct inode *inode,
580 char *name, 580 char *name,
581 __uint32_t flags) 581 __uint32_t flags)
582{ 582{
583 if (IS_RDONLY(&vp->v_inode)) 583 if (IS_RDONLY(inode))
584 return -EROFS; 584 return -EROFS;
585 if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) 585 if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
586 return EPERM; 586 return EPERM;
587 return bhv_vop_attr_remove(vp, name, flags, NULL); 587 return xfs_attr_remove(XFS_I(inode), name, flags);
588} 588}
589 589
590STATIC int 590STATIC int
@@ -640,17 +640,17 @@ xfs_attrmulti_by_handle(
640 640
641 switch (ops[i].am_opcode) { 641 switch (ops[i].am_opcode) {
642 case ATTR_OP_GET: 642 case ATTR_OP_GET:
643 ops[i].am_error = xfs_attrmulti_attr_get(vp, 643 ops[i].am_error = xfs_attrmulti_attr_get(inode,
644 attr_name, ops[i].am_attrvalue, 644 attr_name, ops[i].am_attrvalue,
645 &ops[i].am_length, ops[i].am_flags); 645 &ops[i].am_length, ops[i].am_flags);
646 break; 646 break;
647 case ATTR_OP_SET: 647 case ATTR_OP_SET:
648 ops[i].am_error = xfs_attrmulti_attr_set(vp, 648 ops[i].am_error = xfs_attrmulti_attr_set(inode,
649 attr_name, ops[i].am_attrvalue, 649 attr_name, ops[i].am_attrvalue,
650 ops[i].am_length, ops[i].am_flags); 650 ops[i].am_length, ops[i].am_flags);
651 break; 651 break;
652 case ATTR_OP_REMOVE: 652 case ATTR_OP_REMOVE:
653 ops[i].am_error = xfs_attrmulti_attr_remove(vp, 653 ops[i].am_error = xfs_attrmulti_attr_remove(inode,
654 attr_name, ops[i].am_flags); 654 attr_name, ops[i].am_flags);
655 break; 655 break;
656 default: 656 default:
@@ -1182,7 +1182,7 @@ xfs_ioc_xattr(
1182 case XFS_IOC_FSGETXATTR: { 1182 case XFS_IOC_FSGETXATTR: {
1183 vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ 1183 vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \
1184 XFS_AT_NEXTENTS | XFS_AT_PROJID; 1184 XFS_AT_NEXTENTS | XFS_AT_PROJID;
1185 error = bhv_vop_getattr(vp, vattr, 0, NULL); 1185 error = xfs_getattr(ip, vattr, 0);
1186 if (unlikely(error)) { 1186 if (unlikely(error)) {
1187 error = -error; 1187 error = -error;
1188 break; 1188 break;
@@ -1215,7 +1215,7 @@ xfs_ioc_xattr(
1215 vattr->va_extsize = fa.fsx_extsize; 1215 vattr->va_extsize = fa.fsx_extsize;
1216 vattr->va_projid = fa.fsx_projid; 1216 vattr->va_projid = fa.fsx_projid;
1217 1217
1218 error = bhv_vop_setattr(vp, vattr, attr_flags, NULL); 1218 error = xfs_setattr(ip, vattr, attr_flags, NULL);
1219 if (likely(!error)) 1219 if (likely(!error))
1220 __vn_revalidate(vp, vattr); /* update flags */ 1220 __vn_revalidate(vp, vattr); /* update flags */
1221 error = -error; 1221 error = -error;
@@ -1225,7 +1225,7 @@ xfs_ioc_xattr(
1225 case XFS_IOC_FSGETXATTRA: { 1225 case XFS_IOC_FSGETXATTRA: {
1226 vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ 1226 vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \
1227 XFS_AT_ANEXTENTS | XFS_AT_PROJID; 1227 XFS_AT_ANEXTENTS | XFS_AT_PROJID;
1228 error = bhv_vop_getattr(vp, vattr, 0, NULL); 1228 error = xfs_getattr(ip, vattr, 0);
1229 if (unlikely(error)) { 1229 if (unlikely(error)) {
1230 error = -error; 1230 error = -error;
1231 break; 1231 break;
@@ -1271,7 +1271,7 @@ xfs_ioc_xattr(
1271 vattr->va_xflags = xfs_merge_ioc_xflags(flags, 1271 vattr->va_xflags = xfs_merge_ioc_xflags(flags,
1272 xfs_ip2xflags(ip)); 1272 xfs_ip2xflags(ip));
1273 1273
1274 error = bhv_vop_setattr(vp, vattr, attr_flags, NULL); 1274 error = xfs_setattr(ip, vattr, attr_flags, NULL);
1275 if (likely(!error)) 1275 if (likely(!error))
1276 __vn_revalidate(vp, vattr); /* update flags */ 1276 __vn_revalidate(vp, vattr); /* update flags */
1277 error = -error; 1277 error = -error;
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c
index 42319d75aaab..83f509960305 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.c
@@ -43,6 +43,7 @@
43#include "xfs_itable.h" 43#include "xfs_itable.h"
44#include "xfs_error.h" 44#include "xfs_error.h"
45#include "xfs_dfrag.h" 45#include "xfs_dfrag.h"
46#include "xfs_vnodeops.h"
46 47
47#define _NATIVE_IOC(cmd, type) \ 48#define _NATIVE_IOC(cmd, type) \
48 _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type)) 49 _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type))
@@ -443,7 +444,7 @@ xfs_compat_ioctl(
443 case XFS_IOC_FSBULKSTAT_SINGLE_32: 444 case XFS_IOC_FSBULKSTAT_SINGLE_32:
444 case XFS_IOC_FSINUMBERS_32: 445 case XFS_IOC_FSINUMBERS_32:
445 cmd = _NATIVE_IOC(cmd, struct xfs_fsop_bulkreq); 446 cmd = _NATIVE_IOC(cmd, struct xfs_fsop_bulkreq);
446 return xfs_ioc_bulkstat_compat(XFS_BHVTOI(VNHEAD(vp))->i_mount, 447 return xfs_ioc_bulkstat_compat(XFS_I(inode)->i_mount,
447 cmd, (void __user*)arg); 448 cmd, (void __user*)arg);
448 case XFS_IOC_FD_TO_HANDLE_32: 449 case XFS_IOC_FD_TO_HANDLE_32:
449 case XFS_IOC_PATH_TO_HANDLE_32: 450 case XFS_IOC_PATH_TO_HANDLE_32:
@@ -457,7 +458,7 @@ xfs_compat_ioctl(
457 return -ENOIOCTLCMD; 458 return -ENOIOCTLCMD;
458 } 459 }
459 460
460 error = bhv_vop_ioctl(vp, inode, file, mode, cmd, (void __user *)arg); 461 error = xfs_ioctl(XFS_I(inode), file, mode, cmd, (void __user *)arg);
461 VMODIFY(vp); 462 VMODIFY(vp);
462 463
463 return error; 464 return error;
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index ef941f99b2bc..4da034f4ae14 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -46,6 +46,7 @@
46#include "xfs_attr.h" 46#include "xfs_attr.h"
47#include "xfs_buf_item.h" 47#include "xfs_buf_item.h"
48#include "xfs_utils.h" 48#include "xfs_utils.h"
49#include "xfs_vnodeops.h"
49 50
50#include <linux/capability.h> 51#include <linux/capability.h>
51#include <linux/xattr.h> 52#include <linux/xattr.h>
@@ -53,22 +54,6 @@
53#include <linux/security.h> 54#include <linux/security.h>
54 55
55/* 56/*
56 * Get a XFS inode from a given vnode.
57 */
58xfs_inode_t *
59xfs_vtoi(
60 bhv_vnode_t *vp)
61{
62 bhv_desc_t *bdp;
63
64 bdp = bhv_lookup_range(VN_BHV_HEAD(vp),
65 VNODE_POSITION_XFS, VNODE_POSITION_XFS);
66 if (unlikely(bdp == NULL))
67 return NULL;
68 return XFS_BHVTOI(bdp);
69}
70
71/*
72 * Bring the atime in the XFS inode uptodate. 57 * Bring the atime in the XFS inode uptodate.
73 * Used before logging the inode to disk or when the Linux inode goes away. 58 * Used before logging the inode to disk or when the Linux inode goes away.
74 */ 59 */
@@ -199,7 +184,7 @@ xfs_validate_fields(
199 bhv_vattr_t *vattr) 184 bhv_vattr_t *vattr)
200{ 185{
201 vattr->va_mask = XFS_AT_NLINK|XFS_AT_SIZE|XFS_AT_NBLOCKS; 186 vattr->va_mask = XFS_AT_NLINK|XFS_AT_SIZE|XFS_AT_NBLOCKS;
202 if (!bhv_vop_getattr(vn_from_inode(ip), vattr, ATTR_LAZY, NULL)) { 187 if (!xfs_getattr(XFS_I(ip), vattr, ATTR_LAZY)) {
203 ip->i_nlink = vattr->va_nlink; 188 ip->i_nlink = vattr->va_nlink;
204 ip->i_blocks = vattr->va_nblocks; 189 ip->i_blocks = vattr->va_nblocks;
205 190
@@ -233,7 +218,8 @@ xfs_init_security(
233 return -error; 218 return -error;
234 } 219 }
235 220
236 error = bhv_vop_attr_set(vp, name, value, length, ATTR_SECURE, NULL); 221 error = xfs_attr_set(XFS_I(ip), name, value,
222 length, ATTR_SECURE);
237 if (!error) 223 if (!error)
238 VMODIFY(vp); 224 VMODIFY(vp);
239 225
@@ -256,7 +242,7 @@ xfs_has_fs_struct(struct task_struct *task)
256 242
257STATIC void 243STATIC void
258xfs_cleanup_inode( 244xfs_cleanup_inode(
259 bhv_vnode_t *dvp, 245 struct inode *dir,
260 bhv_vnode_t *vp, 246 bhv_vnode_t *vp,
261 struct dentry *dentry, 247 struct dentry *dentry,
262 int mode) 248 int mode)
@@ -272,9 +258,9 @@ xfs_cleanup_inode(
272 teardown.d_name = dentry->d_name; 258 teardown.d_name = dentry->d_name;
273 259
274 if (S_ISDIR(mode)) 260 if (S_ISDIR(mode))
275 bhv_vop_rmdir(dvp, &teardown, NULL); 261 xfs_rmdir(XFS_I(dir), &teardown);
276 else 262 else
277 bhv_vop_remove(dvp, &teardown, NULL); 263 xfs_remove(XFS_I(dir), &teardown);
278 VN_RELE(vp); 264 VN_RELE(vp);
279} 265}
280 266
@@ -321,10 +307,10 @@ xfs_vn_mknod(
321 vattr.va_mask |= XFS_AT_RDEV; 307 vattr.va_mask |= XFS_AT_RDEV;
322 /*FALLTHROUGH*/ 308 /*FALLTHROUGH*/
323 case S_IFREG: 309 case S_IFREG:
324 error = bhv_vop_create(dvp, dentry, &vattr, &vp, NULL); 310 error = xfs_create(XFS_I(dir), dentry, &vattr, &vp, NULL);
325 break; 311 break;
326 case S_IFDIR: 312 case S_IFDIR:
327 error = bhv_vop_mkdir(dvp, dentry, &vattr, &vp, NULL); 313 error = xfs_mkdir(XFS_I(dir), dentry, &vattr, &vp, NULL);
328 break; 314 break;
329 default: 315 default:
330 error = EINVAL; 316 error = EINVAL;
@@ -334,7 +320,7 @@ xfs_vn_mknod(
334 if (unlikely(!error)) { 320 if (unlikely(!error)) {
335 error = xfs_init_security(vp, dir); 321 error = xfs_init_security(vp, dir);
336 if (error) 322 if (error)
337 xfs_cleanup_inode(dvp, vp, dentry, mode); 323 xfs_cleanup_inode(dir, vp, dentry, mode);
338 } 324 }
339 325
340 if (unlikely(default_acl)) { 326 if (unlikely(default_acl)) {
@@ -343,7 +329,7 @@ xfs_vn_mknod(
343 if (!error) 329 if (!error)
344 VMODIFY(vp); 330 VMODIFY(vp);
345 else 331 else
346 xfs_cleanup_inode(dvp, vp, dentry, mode); 332 xfs_cleanup_inode(dir, vp, dentry, mode);
347 } 333 }
348 _ACL_FREE(default_acl); 334 _ACL_FREE(default_acl);
349 } 335 }
@@ -387,13 +373,13 @@ xfs_vn_lookup(
387 struct dentry *dentry, 373 struct dentry *dentry,
388 struct nameidata *nd) 374 struct nameidata *nd)
389{ 375{
390 bhv_vnode_t *vp = vn_from_inode(dir), *cvp; 376 bhv_vnode_t *cvp;
391 int error; 377 int error;
392 378
393 if (dentry->d_name.len >= MAXNAMELEN) 379 if (dentry->d_name.len >= MAXNAMELEN)
394 return ERR_PTR(-ENAMETOOLONG); 380 return ERR_PTR(-ENAMETOOLONG);
395 381
396 error = bhv_vop_lookup(vp, dentry, &cvp, 0, NULL, NULL); 382 error = xfs_lookup(XFS_I(dir), dentry, &cvp);
397 if (unlikely(error)) { 383 if (unlikely(error)) {
398 if (unlikely(error != ENOENT)) 384 if (unlikely(error != ENOENT))
399 return ERR_PTR(-error); 385 return ERR_PTR(-error);
@@ -411,21 +397,19 @@ xfs_vn_link(
411 struct dentry *dentry) 397 struct dentry *dentry)
412{ 398{
413 struct inode *ip; /* inode of guy being linked to */ 399 struct inode *ip; /* inode of guy being linked to */
414 bhv_vnode_t *tdvp; /* target directory for new name/link */
415 bhv_vnode_t *vp; /* vp of name being linked */ 400 bhv_vnode_t *vp; /* vp of name being linked */
416 bhv_vattr_t vattr; 401 bhv_vattr_t vattr;
417 int error; 402 int error;
418 403
419 ip = old_dentry->d_inode; /* inode being linked to */ 404 ip = old_dentry->d_inode; /* inode being linked to */
420 tdvp = vn_from_inode(dir);
421 vp = vn_from_inode(ip); 405 vp = vn_from_inode(ip);
422 406
423 VN_HOLD(vp); 407 VN_HOLD(vp);
424 error = bhv_vop_link(tdvp, vp, dentry, NULL); 408 error = xfs_link(XFS_I(dir), vp, dentry);
425 if (unlikely(error)) { 409 if (unlikely(error)) {
426 VN_RELE(vp); 410 VN_RELE(vp);
427 } else { 411 } else {
428 VMODIFY(tdvp); 412 VMODIFY(vn_from_inode(dir));
429 xfs_validate_fields(ip, &vattr); 413 xfs_validate_fields(ip, &vattr);
430 d_instantiate(dentry, ip); 414 d_instantiate(dentry, ip);
431 } 415 }
@@ -438,14 +422,12 @@ xfs_vn_unlink(
438 struct dentry *dentry) 422 struct dentry *dentry)
439{ 423{
440 struct inode *inode; 424 struct inode *inode;
441 bhv_vnode_t *dvp; /* directory containing name to remove */
442 bhv_vattr_t vattr; 425 bhv_vattr_t vattr;
443 int error; 426 int error;
444 427
445 inode = dentry->d_inode; 428 inode = dentry->d_inode;
446 dvp = vn_from_inode(dir);
447 429
448 error = bhv_vop_remove(dvp, dentry, NULL); 430 error = xfs_remove(XFS_I(dir), dentry);
449 if (likely(!error)) { 431 if (likely(!error)) {
450 xfs_validate_fields(dir, &vattr); /* size needs update */ 432 xfs_validate_fields(dir, &vattr); /* size needs update */
451 xfs_validate_fields(inode, &vattr); 433 xfs_validate_fields(inode, &vattr);
@@ -461,18 +443,17 @@ xfs_vn_symlink(
461{ 443{
462 struct inode *ip; 444 struct inode *ip;
463 bhv_vattr_t va = { 0 }; 445 bhv_vattr_t va = { 0 };
464 bhv_vnode_t *dvp; /* directory containing name of symlink */
465 bhv_vnode_t *cvp; /* used to lookup symlink to put in dentry */ 446 bhv_vnode_t *cvp; /* used to lookup symlink to put in dentry */
466 int error; 447 int error;
467 448
468 dvp = vn_from_inode(dir);
469 cvp = NULL; 449 cvp = NULL;
470 450
471 va.va_mode = S_IFLNK | 451 va.va_mode = S_IFLNK |
472 (irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO); 452 (irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO);
473 va.va_mask = XFS_AT_TYPE|XFS_AT_MODE; 453 va.va_mask = XFS_AT_TYPE|XFS_AT_MODE;
474 454
475 error = bhv_vop_symlink(dvp, dentry, &va, (char *)symname, &cvp, NULL); 455 error = xfs_symlink(XFS_I(dir), dentry, &va,
456 (char *)symname, &cvp, NULL);
476 if (likely(!error && cvp)) { 457 if (likely(!error && cvp)) {
477 error = xfs_init_security(cvp, dir); 458 error = xfs_init_security(cvp, dir);
478 if (likely(!error)) { 459 if (likely(!error)) {
@@ -481,7 +462,7 @@ xfs_vn_symlink(
481 xfs_validate_fields(dir, &va); 462 xfs_validate_fields(dir, &va);
482 xfs_validate_fields(ip, &va); 463 xfs_validate_fields(ip, &va);
483 } else { 464 } else {
484 xfs_cleanup_inode(dvp, cvp, dentry, 0); 465 xfs_cleanup_inode(dir, cvp, dentry, 0);
485 } 466 }
486 } 467 }
487 return -error; 468 return -error;
@@ -493,11 +474,10 @@ xfs_vn_rmdir(
493 struct dentry *dentry) 474 struct dentry *dentry)
494{ 475{
495 struct inode *inode = dentry->d_inode; 476 struct inode *inode = dentry->d_inode;
496 bhv_vnode_t *dvp = vn_from_inode(dir);
497 bhv_vattr_t vattr; 477 bhv_vattr_t vattr;
498 int error; 478 int error;
499 479
500 error = bhv_vop_rmdir(dvp, dentry, NULL); 480 error = xfs_rmdir(XFS_I(dir), dentry);
501 if (likely(!error)) { 481 if (likely(!error)) {
502 xfs_validate_fields(inode, &vattr); 482 xfs_validate_fields(inode, &vattr);
503 xfs_validate_fields(dir, &vattr); 483 xfs_validate_fields(dir, &vattr);
@@ -513,15 +493,13 @@ xfs_vn_rename(
513 struct dentry *ndentry) 493 struct dentry *ndentry)
514{ 494{
515 struct inode *new_inode = ndentry->d_inode; 495 struct inode *new_inode = ndentry->d_inode;
516 bhv_vnode_t *fvp; /* from directory */
517 bhv_vnode_t *tvp; /* target directory */ 496 bhv_vnode_t *tvp; /* target directory */
518 bhv_vattr_t vattr; 497 bhv_vattr_t vattr;
519 int error; 498 int error;
520 499
521 fvp = vn_from_inode(odir);
522 tvp = vn_from_inode(ndir); 500 tvp = vn_from_inode(ndir);
523 501
524 error = bhv_vop_rename(fvp, odentry, tvp, ndentry, NULL); 502 error = xfs_rename(XFS_I(odir), odentry, tvp, ndentry);
525 if (likely(!error)) { 503 if (likely(!error)) {
526 if (new_inode) 504 if (new_inode)
527 xfs_validate_fields(new_inode, &vattr); 505 xfs_validate_fields(new_inode, &vattr);
@@ -542,7 +520,6 @@ xfs_vn_follow_link(
542 struct dentry *dentry, 520 struct dentry *dentry,
543 struct nameidata *nd) 521 struct nameidata *nd)
544{ 522{
545 bhv_vnode_t *vp = vn_from_inode(dentry->d_inode);
546 char *link; 523 char *link;
547 int error = -ENOMEM; 524 int error = -ENOMEM;
548 525
@@ -550,7 +527,7 @@ xfs_vn_follow_link(
550 if (!link) 527 if (!link)
551 goto out_err; 528 goto out_err;
552 529
553 error = -bhv_vop_readlink(vp, link); 530 error = -xfs_readlink(XFS_I(dentry->d_inode), link);
554 if (unlikely(error)) 531 if (unlikely(error))
555 goto out_kfree; 532 goto out_kfree;
556 533
@@ -583,7 +560,7 @@ xfs_vn_permission(
583 int mode, 560 int mode,
584 struct nameidata *nd) 561 struct nameidata *nd)
585{ 562{
586 return -bhv_vop_access(vn_from_inode(inode), mode << 6, NULL); 563 return -xfs_access(XFS_I(inode), mode << 6, NULL);
587} 564}
588#else 565#else
589#define xfs_vn_permission NULL 566#define xfs_vn_permission NULL
@@ -596,11 +573,10 @@ xfs_vn_getattr(
596 struct kstat *stat) 573 struct kstat *stat)
597{ 574{
598 struct inode *inode = dentry->d_inode; 575 struct inode *inode = dentry->d_inode;
599 bhv_vnode_t *vp = vn_from_inode(inode);
600 bhv_vattr_t vattr = { .va_mask = XFS_AT_STAT }; 576 bhv_vattr_t vattr = { .va_mask = XFS_AT_STAT };
601 int error; 577 int error;
602 578
603 error = bhv_vop_getattr(vp, &vattr, ATTR_LAZY, NULL); 579 error = xfs_getattr(XFS_I(inode), &vattr, ATTR_LAZY);
604 if (likely(!error)) { 580 if (likely(!error)) {
605 stat->size = i_size_read(inode); 581 stat->size = i_size_read(inode);
606 stat->dev = inode->i_sb->s_dev; 582 stat->dev = inode->i_sb->s_dev;
@@ -628,7 +604,6 @@ xfs_vn_setattr(
628{ 604{
629 struct inode *inode = dentry->d_inode; 605 struct inode *inode = dentry->d_inode;
630 unsigned int ia_valid = attr->ia_valid; 606 unsigned int ia_valid = attr->ia_valid;
631 bhv_vnode_t *vp = vn_from_inode(inode);
632 bhv_vattr_t vattr = { 0 }; 607 bhv_vattr_t vattr = { 0 };
633 int flags = 0; 608 int flags = 0;
634 int error; 609 int error;
@@ -672,9 +647,9 @@ xfs_vn_setattr(
672 flags |= ATTR_NONBLOCK; 647 flags |= ATTR_NONBLOCK;
673#endif 648#endif
674 649
675 error = bhv_vop_setattr(vp, &vattr, flags, NULL); 650 error = xfs_setattr(XFS_I(inode), &vattr, flags, NULL);
676 if (likely(!error)) 651 if (likely(!error))
677 __vn_revalidate(vp, &vattr); 652 __vn_revalidate(vn_from_inode(inode), &vattr);
678 return -error; 653 return -error;
679} 654}
680 655
diff --git a/fs/xfs/linux-2.6/xfs_iops.h b/fs/xfs/linux-2.6/xfs_iops.h
index ce9852e9be00..14d0deb7afff 100644
--- a/fs/xfs/linux-2.6/xfs_iops.h
+++ b/fs/xfs/linux-2.6/xfs_iops.h
@@ -31,4 +31,10 @@ struct xfs_inode;
31extern void xfs_ichgtime(struct xfs_inode *, int); 31extern void xfs_ichgtime(struct xfs_inode *, int);
32extern void xfs_ichgtime_fast(struct xfs_inode *, struct inode *, int); 32extern void xfs_ichgtime_fast(struct xfs_inode *, struct inode *, int);
33 33
34#define xfs_vtoi(vp) \
35 ((struct xfs_inode *)vn_to_inode(vp)->i_private)
36
37#define XFS_I(inode) \
38 ((struct xfs_inode *)(inode)->i_private)
39
34#endif /* __XFS_IOPS_H__ */ 40#endif /* __XFS_IOPS_H__ */
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index 2dc979e3e969..fb04b11bb815 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -257,8 +257,9 @@ xfs_read(
257 257
258 if (unlikely(ioflags & IO_ISDIRECT)) { 258 if (unlikely(ioflags & IO_ISDIRECT)) {
259 if (VN_CACHED(vp)) 259 if (VN_CACHED(vp))
260 ret = bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)), 260 ret = xfs_flushinval_pages(ip,
261 -1, FI_REMAPF_LOCKED); 261 ctooff(offtoct(*offset)),
262 -1, FI_REMAPF_LOCKED);
262 mutex_unlock(&inode->i_mutex); 263 mutex_unlock(&inode->i_mutex);
263 if (ret) { 264 if (ret) {
264 xfs_iunlock(ip, XFS_IOLOCK_SHARED); 265 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
@@ -752,7 +753,8 @@ retry:
752 WARN_ON(need_i_mutex == 0); 753 WARN_ON(need_i_mutex == 0);
753 xfs_inval_cached_trace(io, pos, -1, 754 xfs_inval_cached_trace(io, pos, -1,
754 ctooff(offtoct(pos)), -1); 755 ctooff(offtoct(pos)), -1);
755 error = bhv_vop_flushinval_pages(vp, ctooff(offtoct(pos)), 756 error = xfs_flushinval_pages(xip,
757 ctooff(offtoct(pos)),
756 -1, FI_REMAPF_LOCKED); 758 -1, FI_REMAPF_LOCKED);
757 if (error) 759 if (error)
758 goto out_unlock_internal; 760 goto out_unlock_internal;
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 2fbf24a6cf58..42d6ed1788ff 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -46,6 +46,7 @@
46#include "xfs_attr.h" 46#include "xfs_attr.h"
47#include "xfs_buf_item.h" 47#include "xfs_buf_item.h"
48#include "xfs_utils.h" 48#include "xfs_utils.h"
49#include "xfs_vnodeops.h"
49#include "xfs_version.h" 50#include "xfs_version.h"
50 51
51#include <linux/namei.h> 52#include <linux/namei.h>
@@ -203,16 +204,15 @@ void
203xfs_initialize_vnode( 204xfs_initialize_vnode(
204 bhv_desc_t *bdp, 205 bhv_desc_t *bdp,
205 bhv_vnode_t *vp, 206 bhv_vnode_t *vp,
206 bhv_desc_t *inode_bhv, 207 struct xfs_inode *ip,
207 int unlock) 208 int unlock)
208{ 209{
209 xfs_inode_t *ip = XFS_BHVTOI(inode_bhv);
210 struct inode *inode = vn_to_inode(vp); 210 struct inode *inode = vn_to_inode(vp);
211 211
212 if (!inode_bhv->bd_vobj) { 212 if (!ip->i_vnode) {
213 vp->v_vfsp = bhvtovfs(bdp); 213 vp->v_vfsp = bhvtovfs(bdp);
214 bhv_desc_init(inode_bhv, ip, vp, &xfs_vnodeops); 214 ip->i_vnode = vp;
215 bhv_insert(VN_BHV_HEAD(vp), inode_bhv); 215 inode->i_private = ip;
216 } 216 }
217 217
218 /* 218 /*
@@ -402,19 +402,23 @@ xfs_fs_write_inode(
402 struct inode *inode, 402 struct inode *inode,
403 int sync) 403 int sync)
404{ 404{
405 bhv_vnode_t *vp = vn_from_inode(inode);
406 int error = 0, flags = FLUSH_INODE; 405 int error = 0, flags = FLUSH_INODE;
407 406
408 if (vp) { 407 vn_trace_entry(vn_from_inode(inode), __FUNCTION__,
409 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); 408 (inst_t *)__return_address);
410 if (sync) { 409 if (sync) {
411 filemap_fdatawait(inode->i_mapping); 410 filemap_fdatawait(inode->i_mapping);
412 flags |= FLUSH_SYNC; 411 flags |= FLUSH_SYNC;
413 }
414 error = bhv_vop_iflush(vp, flags);
415 if (error == EAGAIN)
416 error = sync? bhv_vop_iflush(vp, flags | FLUSH_LOG) : 0;
417 } 412 }
413 error = xfs_inode_flush(XFS_I(inode), flags);
414 if (error == EAGAIN) {
415 if (sync)
416 error = xfs_inode_flush(XFS_I(inode),
417 flags | FLUSH_LOG);
418 else
419 error = 0;
420 }
421
418 return -error; 422 return -error;
419} 423}
420 424
@@ -435,18 +439,18 @@ xfs_fs_clear_inode(
435 * This can happen because xfs_iget_core calls xfs_idestroy if we 439 * This can happen because xfs_iget_core calls xfs_idestroy if we
436 * find an inode with di_mode == 0 but without IGET_CREATE set. 440 * find an inode with di_mode == 0 but without IGET_CREATE set.
437 */ 441 */
438 if (VNHEAD(vp)) 442 if (XFS_I(inode))
439 bhv_vop_inactive(vp, NULL); 443 xfs_inactive(XFS_I(inode));
440 444
441 VN_LOCK(vp); 445 VN_LOCK(vp);
442 vp->v_flag &= ~VMODIFIED; 446 vp->v_flag &= ~VMODIFIED;
443 VN_UNLOCK(vp, 0); 447 VN_UNLOCK(vp, 0);
444 448
445 if (VNHEAD(vp)) 449 if (XFS_I(inode))
446 if (bhv_vop_reclaim(vp)) 450 if (xfs_reclaim(XFS_I(inode)))
447 panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, vp); 451 panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, vp);
448 452
449 ASSERT(VNHEAD(vp) == NULL); 453 ASSERT(XFS_I(inode) == NULL);
450 454
451#ifdef XFS_VNODE_TRACE 455#ifdef XFS_VNODE_TRACE
452 ktrace_free(vp->v_trace); 456 ktrace_free(vp->v_trace);
diff --git a/fs/xfs/linux-2.6/xfs_super.h b/fs/xfs/linux-2.6/xfs_super.h
index 201cc3273c84..ea2ee5a92637 100644
--- a/fs/xfs/linux-2.6/xfs_super.h
+++ b/fs/xfs/linux-2.6/xfs_super.h
@@ -107,7 +107,7 @@ struct block_device;
107 107
108extern __uint64_t xfs_max_file_offset(unsigned int); 108extern __uint64_t xfs_max_file_offset(unsigned int);
109 109
110extern void xfs_initialize_vnode(bhv_desc_t *, bhv_vnode_t *, bhv_desc_t *, int); 110extern void xfs_initialize_vnode(bhv_desc_t *, bhv_vnode_t *, struct xfs_inode *, int);
111 111
112extern void xfs_flush_inode(struct xfs_inode *); 112extern void xfs_flush_inode(struct xfs_inode *);
113extern void xfs_flush_device(struct xfs_inode *); 113extern 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 6145e8bd0be2..0dc87cd20229 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.c
+++ b/fs/xfs/linux-2.6/xfs_vfs.c
@@ -187,7 +187,7 @@ void
187vfs_init_vnode( 187vfs_init_vnode(
188 struct bhv_desc *bdp, 188 struct bhv_desc *bdp,
189 struct bhv_vnode *vp, 189 struct bhv_vnode *vp,
190 struct bhv_desc *bp, 190 struct xfs_inode *ip,
191 int unlock) 191 int unlock)
192{ 192{
193 struct bhv_desc *next = bdp; 193 struct bhv_desc *next = bdp;
@@ -195,7 +195,7 @@ vfs_init_vnode(
195 ASSERT(next); 195 ASSERT(next);
196 while (! (bhvtovfsops(next))->vfs_init_vnode) 196 while (! (bhvtovfsops(next))->vfs_init_vnode)
197 next = BHV_NEXT(next); 197 next = BHV_NEXT(next);
198 ((*bhvtovfsops(next)->vfs_init_vnode)(next, vp, bp, unlock)); 198 ((*bhvtovfsops(next)->vfs_init_vnode)(next, vp, ip, unlock));
199} 199}
200 200
201void 201void
diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h
index dca3481aaafa..75994e1318bc 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.h
+++ b/fs/xfs/linux-2.6/xfs_vfs.h
@@ -28,6 +28,7 @@ struct fid;
28struct cred; 28struct cred;
29struct seq_file; 29struct seq_file;
30struct super_block; 30struct super_block;
31struct xfs_inode;
31struct xfs_mount_args; 32struct xfs_mount_args;
32 33
33typedef struct kstatfs bhv_statvfs_t; 34typedef struct kstatfs bhv_statvfs_t;
@@ -131,7 +132,7 @@ typedef int (*vfs_vget_t)(bhv_desc_t *, struct bhv_vnode **, struct fid *);
131typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t); 132typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t);
132typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); 133typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t);
133typedef void (*vfs_init_vnode_t)(bhv_desc_t *, 134typedef void (*vfs_init_vnode_t)(bhv_desc_t *,
134 struct bhv_vnode *, bhv_desc_t *, int); 135 struct bhv_vnode *, struct xfs_inode *, int);
135typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int); 136typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int);
136typedef void (*vfs_freeze_t)(bhv_desc_t *); 137typedef void (*vfs_freeze_t)(bhv_desc_t *);
137 138
@@ -201,7 +202,7 @@ extern int vfs_sync(bhv_desc_t *, int, struct cred *);
201extern int vfs_vget(bhv_desc_t *, struct bhv_vnode **, struct fid *); 202extern int vfs_vget(bhv_desc_t *, struct bhv_vnode **, struct fid *);
202extern int vfs_dmapiops(bhv_desc_t *, caddr_t); 203extern int vfs_dmapiops(bhv_desc_t *, caddr_t);
203extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); 204extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t);
204extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, bhv_desc_t *, int); 205extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, struct xfs_inode *, int);
205extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); 206extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int);
206extern void vfs_freeze(bhv_desc_t *); 207extern void vfs_freeze(bhv_desc_t *);
207 208
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c
index ada24baf88de..ad0494c5c0d1 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.c
+++ b/fs/xfs/linux-2.6/xfs_vnode.c
@@ -16,6 +16,9 @@
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 */ 17 */
18#include "xfs.h" 18#include "xfs.h"
19#include "xfs_vnodeops.h"
20#include "xfs_bmap_btree.h"
21#include "xfs_inode.h"
19 22
20uint64_t vn_generation; /* vnode generation number */ 23uint64_t vn_generation; /* vnode generation number */
21DEFINE_SPINLOCK(vnumber_lock); 24DEFINE_SPINLOCK(vnumber_lock);
@@ -90,9 +93,6 @@ vn_initialize(
90 93
91 ASSERT(VN_CACHED(vp) == 0); 94 ASSERT(VN_CACHED(vp) == 0);
92 95
93 /* Initialize the first behavior and the behavior chain head. */
94 vn_bhv_head_init(VN_BHV_HEAD(vp), "vnode");
95
96 atomic_set(&vp->v_iocount, 0); 96 atomic_set(&vp->v_iocount, 0);
97 97
98#ifdef XFS_VNODE_TRACE 98#ifdef XFS_VNODE_TRACE
@@ -152,7 +152,7 @@ __vn_revalidate(
152 152
153 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); 153 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
154 vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; 154 vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS;
155 error = bhv_vop_getattr(vp, vattr, 0, NULL); 155 error = xfs_getattr(xfs_vtoi(vp), vattr, 0);
156 if (likely(!error)) { 156 if (likely(!error)) {
157 vn_revalidate_core(vp, vattr); 157 vn_revalidate_core(vp, vattr);
158 VUNMODIFY(vp); 158 VUNMODIFY(vp);
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index bddbdb904234..5abcbd198d73 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -41,7 +41,6 @@ typedef struct bhv_vnode {
41 bhv_vflags_t v_flag; /* vnode flags (see above) */ 41 bhv_vflags_t v_flag; /* vnode flags (see above) */
42 bhv_vfs_t *v_vfsp; /* ptr to containing VFS */ 42 bhv_vfs_t *v_vfsp; /* ptr to containing VFS */
43 bhv_vnumber_t v_number; /* in-core vnode number */ 43 bhv_vnumber_t v_number; /* in-core vnode number */
44 bhv_head_t v_bh; /* behavior head */
45 spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */ 44 spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */
46 atomic_t v_iocount; /* outstanding I/O count */ 45 atomic_t v_iocount; /* outstanding I/O count */
47#ifdef XFS_VNODE_TRACE 46#ifdef XFS_VNODE_TRACE
@@ -57,34 +56,6 @@ typedef struct bhv_vnode {
57#define VN_ISCHR(vp) S_ISCHR((vp)->v_inode.i_mode) 56#define VN_ISCHR(vp) S_ISCHR((vp)->v_inode.i_mode)
58#define VN_ISBLK(vp) S_ISBLK((vp)->v_inode.i_mode) 57#define VN_ISBLK(vp) S_ISBLK((vp)->v_inode.i_mode)
59 58
60#define VNODE_POSITION_BASE BHV_POSITION_BASE /* chain bottom */
61#define VNODE_POSITION_TOP BHV_POSITION_TOP /* chain top */
62#define VNODE_POSITION_INVALID BHV_POSITION_INVALID /* invalid pos. num */
63
64typedef enum {
65 VN_BHV_UNKNOWN, /* not specified */
66 VN_BHV_XFS, /* xfs */
67 VN_BHV_DM, /* data migration */
68 VN_BHV_QM, /* quota manager */
69 VN_BHV_IO, /* IO path */
70 VN_BHV_END /* housekeeping end-of-range */
71} vn_bhv_t;
72
73#define VNODE_POSITION_XFS (VNODE_POSITION_BASE)
74#define VNODE_POSITION_DM (VNODE_POSITION_BASE+10)
75#define VNODE_POSITION_QM (VNODE_POSITION_BASE+20)
76#define VNODE_POSITION_IO (VNODE_POSITION_BASE+30)
77
78/*
79 * Macros for dealing with the behavior descriptor inside of the vnode.
80 */
81#define BHV_TO_VNODE(bdp) ((bhv_vnode_t *)BHV_VOBJ(bdp))
82#define BHV_TO_VNODE_NULL(bdp) ((bhv_vnode_t *)BHV_VOBJNULL(bdp))
83
84#define VN_BHV_HEAD(vp) ((bhv_head_t *)(&((vp)->v_bh)))
85#define vn_bhv_head_init(bhp,name) bhv_head_init(bhp,name)
86#define vn_bhv_remove(bhp,bdp) bhv_remove(bhp,bdp)
87
88/* 59/*
89 * Vnode to Linux inode mapping. 60 * Vnode to Linux inode mapping.
90 */ 61 */
@@ -110,7 +81,7 @@ typedef enum bhv_vrwlock {
110} bhv_vrwlock_t; 81} bhv_vrwlock_t;
111 82
112/* 83/*
113 * Return values for bhv_vop_inactive. A return value of 84 * Return values for xfs_inactive. A return value of
114 * VN_INACTIVE_NOCACHE implies that the file system behavior 85 * VN_INACTIVE_NOCACHE implies that the file system behavior
115 * has disassociated its state and bhv_desc_t from the vnode. 86 * has disassociated its state and bhv_desc_t from the vnode.
116 */ 87 */
@@ -118,192 +89,6 @@ typedef enum bhv_vrwlock {
118#define VN_INACTIVE_NOCACHE 1 89#define VN_INACTIVE_NOCACHE 1
119 90
120/* 91/*
121 * Values for the cmd code given to vop_vnode_change.
122 */
123typedef enum bhv_vchange {
124 VCHANGE_FLAGS_FRLOCKS = 0,
125 VCHANGE_FLAGS_ENF_LOCKING = 1,
126 VCHANGE_FLAGS_TRUNCATED = 2,
127 VCHANGE_FLAGS_PAGE_DIRTY = 3,
128 VCHANGE_FLAGS_IOEXCL_COUNT = 4
129} bhv_vchange_t;
130
131typedef int (*vop_open_t)(bhv_desc_t *, struct cred *);
132typedef ssize_t (*vop_read_t)(bhv_desc_t *, struct kiocb *,
133 const struct iovec *, unsigned int,
134 loff_t *, int, struct cred *);
135typedef ssize_t (*vop_write_t)(bhv_desc_t *, struct kiocb *,
136 const struct iovec *, unsigned int,
137 loff_t *, int, struct cred *);
138typedef ssize_t (*vop_splice_read_t)(bhv_desc_t *, struct file *, loff_t *,
139 struct pipe_inode_info *, size_t, int, int,
140 struct cred *);
141typedef ssize_t (*vop_splice_write_t)(bhv_desc_t *, struct pipe_inode_info *,
142 struct file *, loff_t *, size_t, int, int,
143 struct cred *);
144typedef int (*vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *,
145 int, unsigned int, void __user *);
146typedef int (*vop_getattr_t)(bhv_desc_t *, struct bhv_vattr *, int,
147 struct cred *);
148typedef int (*vop_setattr_t)(bhv_desc_t *, struct bhv_vattr *, int,
149 struct cred *);
150typedef int (*vop_access_t)(bhv_desc_t *, int, struct cred *);
151typedef int (*vop_lookup_t)(bhv_desc_t *, bhv_vname_t *, bhv_vnode_t **,
152 int, bhv_vnode_t *, struct cred *);
153typedef int (*vop_create_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr *,
154 bhv_vnode_t **, struct cred *);
155typedef int (*vop_remove_t)(bhv_desc_t *, bhv_vname_t *, struct cred *);
156typedef int (*vop_link_t)(bhv_desc_t *, bhv_vnode_t *, bhv_vname_t *,
157 struct cred *);
158typedef int (*vop_rename_t)(bhv_desc_t *, bhv_vname_t *, bhv_vnode_t *,
159 bhv_vname_t *, struct cred *);
160typedef int (*vop_mkdir_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr *,
161 bhv_vnode_t **, struct cred *);
162typedef int (*vop_rmdir_t)(bhv_desc_t *, bhv_vname_t *, struct cred *);
163typedef int (*vop_readdir_t)(bhv_desc_t *, void *dirent, size_t bufsize,
164 xfs_off_t *offset, filldir_t filldir);
165typedef int (*vop_symlink_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr*,
166 char *, bhv_vnode_t **, struct cred *);
167typedef int (*vop_readlink_t)(bhv_desc_t *, char *);
168typedef int (*vop_fsync_t)(bhv_desc_t *, int, struct cred *,
169 xfs_off_t, xfs_off_t);
170typedef int (*vop_inactive_t)(bhv_desc_t *, struct cred *);
171typedef int (*vop_fid2_t)(bhv_desc_t *, struct fid *);
172typedef int (*vop_release_t)(bhv_desc_t *);
173typedef int (*vop_rwlock_t)(bhv_desc_t *, bhv_vrwlock_t);
174typedef void (*vop_rwunlock_t)(bhv_desc_t *, bhv_vrwlock_t);
175typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int,
176 struct xfs_iomap *, int *);
177typedef int (*vop_reclaim_t)(bhv_desc_t *);
178typedef int (*vop_attr_get_t)(bhv_desc_t *, const char *, char *, int *,
179 int, struct cred *);
180typedef int (*vop_attr_set_t)(bhv_desc_t *, const char *, char *, int,
181 int, struct cred *);
182typedef int (*vop_attr_remove_t)(bhv_desc_t *, const char *,
183 int, struct cred *);
184typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int,
185 struct attrlist_cursor_kern *, struct cred *);
186typedef void (*vop_link_removed_t)(bhv_desc_t *, bhv_vnode_t *, int);
187typedef void (*vop_vnode_change_t)(bhv_desc_t *, bhv_vchange_t, __psint_t);
188typedef void (*vop_ptossvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int);
189typedef int (*vop_pflushinvalvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int);
190typedef int (*vop_pflushvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t,
191 uint64_t, int);
192typedef int (*vop_iflush_t)(bhv_desc_t *, int);
193
194
195typedef struct bhv_vnodeops {
196 bhv_position_t vn_position; /* position within behavior chain */
197 vop_open_t vop_open;
198 vop_read_t vop_read;
199 vop_write_t vop_write;
200 vop_splice_read_t vop_splice_read;
201 vop_splice_write_t vop_splice_write;
202 vop_ioctl_t vop_ioctl;
203 vop_getattr_t vop_getattr;
204 vop_setattr_t vop_setattr;
205 vop_access_t vop_access;
206 vop_lookup_t vop_lookup;
207 vop_create_t vop_create;
208 vop_remove_t vop_remove;
209 vop_link_t vop_link;
210 vop_rename_t vop_rename;
211 vop_mkdir_t vop_mkdir;
212 vop_rmdir_t vop_rmdir;
213 vop_readdir_t vop_readdir;
214 vop_symlink_t vop_symlink;
215 vop_readlink_t vop_readlink;
216 vop_fsync_t vop_fsync;
217 vop_inactive_t vop_inactive;
218 vop_fid2_t vop_fid2;
219 vop_rwlock_t vop_rwlock;
220 vop_rwunlock_t vop_rwunlock;
221 vop_bmap_t vop_bmap;
222 vop_reclaim_t vop_reclaim;
223 vop_attr_get_t vop_attr_get;
224 vop_attr_set_t vop_attr_set;
225 vop_attr_remove_t vop_attr_remove;
226 vop_attr_list_t vop_attr_list;
227 vop_link_removed_t vop_link_removed;
228 vop_vnode_change_t vop_vnode_change;
229 vop_ptossvp_t vop_tosspages;
230 vop_pflushinvalvp_t vop_flushinval_pages;
231 vop_pflushvp_t vop_flush_pages;
232 vop_release_t vop_release;
233 vop_iflush_t vop_iflush;
234} bhv_vnodeops_t;
235
236/*
237 * Virtual node operations, operating from head bhv.
238 */
239#define VNHEAD(vp) ((vp)->v_bh.bh_first)
240#define VOP(op, vp) (*((bhv_vnodeops_t *)VNHEAD(vp)->bd_ops)->op)
241#define bhv_vop_open(vp, cr) VOP(vop_open, vp)(VNHEAD(vp),cr)
242#define bhv_vop_read(vp,file,iov,segs,offset,ioflags,cr) \
243 VOP(vop_read, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr)
244#define bhv_vop_write(vp,file,iov,segs,offset,ioflags,cr) \
245 VOP(vop_write, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr)
246#define bhv_vop_splice_read(vp,f,o,pipe,cnt,fl,iofl,cr) \
247 VOP(vop_splice_read, vp)(VNHEAD(vp),f,o,pipe,cnt,fl,iofl,cr)
248#define bhv_vop_splice_write(vp,f,o,pipe,cnt,fl,iofl,cr) \
249 VOP(vop_splice_write, vp)(VNHEAD(vp),f,o,pipe,cnt,fl,iofl,cr)
250#define bhv_vop_bmap(vp,of,sz,rw,b,n) \
251 VOP(vop_bmap, vp)(VNHEAD(vp),of,sz,rw,b,n)
252#define bhv_vop_getattr(vp, vap,f,cr) \
253 VOP(vop_getattr, vp)(VNHEAD(vp), vap,f,cr)
254#define bhv_vop_setattr(vp, vap,f,cr) \
255 VOP(vop_setattr, vp)(VNHEAD(vp), vap,f,cr)
256#define bhv_vop_access(vp, mode,cr) VOP(vop_access, vp)(VNHEAD(vp), mode,cr)
257#define bhv_vop_lookup(vp,d,vpp,f,rdir,cr) \
258 VOP(vop_lookup, vp)(VNHEAD(vp),d,vpp,f,rdir,cr)
259#define bhv_vop_create(dvp,d,vap,vpp,cr) \
260 VOP(vop_create, dvp)(VNHEAD(dvp),d,vap,vpp,cr)
261#define bhv_vop_remove(dvp,d,cr) VOP(vop_remove, dvp)(VNHEAD(dvp),d,cr)
262#define bhv_vop_link(dvp,fvp,d,cr) VOP(vop_link, dvp)(VNHEAD(dvp),fvp,d,cr)
263#define bhv_vop_rename(fvp,fnm,tdvp,tnm,cr) \
264 VOP(vop_rename, fvp)(VNHEAD(fvp),fnm,tdvp,tnm,cr)
265#define bhv_vop_mkdir(dp,d,vap,vpp,cr) \
266 VOP(vop_mkdir, dp)(VNHEAD(dp),d,vap,vpp,cr)
267#define bhv_vop_rmdir(dp,d,cr) VOP(vop_rmdir, dp)(VNHEAD(dp),d,cr)
268#define bhv_vop_readdir(vp,dirent,bufsize,offset,filldir) \
269 VOP(vop_readdir, vp)(VNHEAD(vp),dirent,bufsize,offset,filldir)
270#define bhv_vop_symlink(dvp,d,vap,tnm,vpp,cr) \
271 VOP(vop_symlink, dvp)(VNHEAD(dvp),d,vap,tnm,vpp,cr)
272#define bhv_vop_readlink(vp,link) \
273 VOP(vop_readlink, vp)(VNHEAD(vp), link)
274#define bhv_vop_fsync(vp,f,cr,b,e) VOP(vop_fsync, vp)(VNHEAD(vp),f,cr,b,e)
275#define bhv_vop_inactive(vp,cr) VOP(vop_inactive, vp)(VNHEAD(vp),cr)
276#define bhv_vop_release(vp) VOP(vop_release, vp)(VNHEAD(vp))
277#define bhv_vop_fid2(vp,fidp) VOP(vop_fid2, vp)(VNHEAD(vp),fidp)
278#define bhv_vop_rwlock(vp,i) VOP(vop_rwlock, vp)(VNHEAD(vp),i)
279#define bhv_vop_rwlock_try(vp,i) VOP(vop_rwlock, vp)(VNHEAD(vp),i)
280#define bhv_vop_rwunlock(vp,i) VOP(vop_rwunlock, vp)(VNHEAD(vp),i)
281#define bhv_vop_frlock(vp,c,fl,flags,offset,fr) \
282 VOP(vop_frlock, vp)(VNHEAD(vp),c,fl,flags,offset,fr)
283#define bhv_vop_reclaim(vp) VOP(vop_reclaim, vp)(VNHEAD(vp))
284#define bhv_vop_attr_get(vp, name, val, vallenp, fl, cred) \
285 VOP(vop_attr_get, vp)(VNHEAD(vp),name,val,vallenp,fl,cred)
286#define bhv_vop_attr_set(vp, name, val, vallen, fl, cred) \
287 VOP(vop_attr_set, vp)(VNHEAD(vp),name,val,vallen,fl,cred)
288#define bhv_vop_attr_remove(vp, name, flags, cred) \
289 VOP(vop_attr_remove, vp)(VNHEAD(vp),name,flags,cred)
290#define bhv_vop_attr_list(vp, buf, buflen, fl, cursor, cred) \
291 VOP(vop_attr_list, vp)(VNHEAD(vp),buf,buflen,fl,cursor,cred)
292#define bhv_vop_link_removed(vp, dvp, linkzero) \
293 VOP(vop_link_removed, vp)(VNHEAD(vp), dvp, linkzero)
294#define bhv_vop_vnode_change(vp, cmd, val) \
295 VOP(vop_vnode_change, vp)(VNHEAD(vp), cmd, val)
296#define bhv_vop_toss_pages(vp, first, last, fiopt) \
297 VOP(vop_tosspages, vp)(VNHEAD(vp), first, last, fiopt)
298#define bhv_vop_flushinval_pages(vp, first, last, fiopt) \
299 VOP(vop_flushinval_pages, vp)(VNHEAD(vp),first,last,fiopt)
300#define bhv_vop_flush_pages(vp, first, last, flags, fiopt) \
301 VOP(vop_flush_pages, vp)(VNHEAD(vp),first,last,flags,fiopt)
302#define bhv_vop_ioctl(vp, inode, filp, fl, cmd, arg) \
303 VOP(vop_ioctl, vp)(VNHEAD(vp),inode,filp,fl,cmd,arg)
304#define bhv_vop_iflush(vp, flags) VOP(vop_iflush, vp)(VNHEAD(vp), flags)
305
306/*
307 * Flags for read/write calls - same values as IRIX 92 * Flags for read/write calls - same values as IRIX
308 */ 93 */
309#define IO_ISAIO 0x00001 /* don't wait for completion */ 94#define IO_ISAIO 0x00001 /* don't wait for completion */
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index 4ca4beb7bb54..034c5ea80dd1 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
@@ -32,6 +32,7 @@
32#include "xfs_btree.h" 32#include "xfs_btree.h"
33#include "xfs_acl.h" 33#include "xfs_acl.h"
34#include "xfs_attr.h" 34#include "xfs_attr.h"
35#include "xfs_vnodeops.h"
35 36
36#include <linux/capability.h> 37#include <linux/capability.h>
37#include <linux/posix_acl_xattr.h> 38#include <linux/posix_acl_xattr.h>
@@ -241,7 +242,7 @@ xfs_acl_vget(
241 bhv_vattr_t va; 242 bhv_vattr_t va;
242 243
243 va.va_mask = XFS_AT_MODE; 244 va.va_mask = XFS_AT_MODE;
244 error = bhv_vop_getattr(vp, &va, 0, sys_cred); 245 error = xfs_getattr(xfs_vtoi(vp), &va, 0);
245 if (error) 246 if (error)
246 goto out; 247 goto out;
247 xfs_acl_sync_mode(va.va_mode, xfs_acl); 248 xfs_acl_sync_mode(va.va_mode, xfs_acl);
@@ -265,9 +266,10 @@ xfs_acl_vremove(
265 VN_HOLD(vp); 266 VN_HOLD(vp);
266 error = xfs_acl_allow_set(vp, kind); 267 error = xfs_acl_allow_set(vp, kind);
267 if (!error) { 268 if (!error) {
268 error = bhv_vop_attr_remove(vp, kind == _ACL_TYPE_DEFAULT? 269 error = xfs_attr_remove(xfs_vtoi(vp),
270 kind == _ACL_TYPE_DEFAULT?
269 SGI_ACL_DEFAULT: SGI_ACL_FILE, 271 SGI_ACL_DEFAULT: SGI_ACL_FILE,
270 ATTR_ROOT, sys_cred); 272 ATTR_ROOT);
271 if (error == ENOATTR) 273 if (error == ENOATTR)
272 error = 0; /* 'scool */ 274 error = 0; /* 'scool */
273 } 275 }
@@ -380,7 +382,7 @@ xfs_acl_allow_set(
380 if (vp->v_vfsp->vfs_flag & VFS_RDONLY) 382 if (vp->v_vfsp->vfs_flag & VFS_RDONLY)
381 return EROFS; 383 return EROFS;
382 va.va_mask = XFS_AT_UID; 384 va.va_mask = XFS_AT_UID;
383 error = bhv_vop_getattr(vp, &va, 0, NULL); 385 error = xfs_getattr(xfs_vtoi(vp), &va, 0);
384 if (error) 386 if (error)
385 return error; 387 return error;
386 if (va.va_uid != current->fsuid && !capable(CAP_FOWNER)) 388 if (va.va_uid != current->fsuid && !capable(CAP_FOWNER))
@@ -613,7 +615,8 @@ xfs_acl_get_attr(
613 615
614 ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1); 616 ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1);
615 flags |= ATTR_ROOT; 617 flags |= ATTR_ROOT;
616 *error = bhv_vop_attr_get(vp, kind == _ACL_TYPE_ACCESS ? 618 *error = xfs_attr_get(xfs_vtoi(vp),
619 kind == _ACL_TYPE_ACCESS ?
617 SGI_ACL_FILE : SGI_ACL_DEFAULT, 620 SGI_ACL_FILE : SGI_ACL_DEFAULT,
618 (char *)aclp, &len, flags, sys_cred); 621 (char *)aclp, &len, flags, sys_cred);
619 if (*error || (flags & ATTR_KERNOVAL)) 622 if (*error || (flags & ATTR_KERNOVAL))
@@ -651,9 +654,10 @@ xfs_acl_set_attr(
651 INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm); 654 INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm);
652 } 655 }
653 INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt); 656 INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt);
654 *error = bhv_vop_attr_set(vp, kind == _ACL_TYPE_ACCESS ? 657 *error = xfs_attr_set(xfs_vtoi(vp),
658 kind == _ACL_TYPE_ACCESS ?
655 SGI_ACL_FILE: SGI_ACL_DEFAULT, 659 SGI_ACL_FILE: SGI_ACL_DEFAULT,
656 (char *)newacl, len, ATTR_ROOT, sys_cred); 660 (char *)newacl, len, ATTR_ROOT);
657 _ACL_FREE(newacl); 661 _ACL_FREE(newacl);
658} 662}
659 663
@@ -675,7 +679,7 @@ xfs_acl_vtoacl(
675 if (!error) { 679 if (!error) {
676 /* Got the ACL, need the mode... */ 680 /* Got the ACL, need the mode... */
677 va.va_mask = XFS_AT_MODE; 681 va.va_mask = XFS_AT_MODE;
678 error = bhv_vop_getattr(vp, &va, 0, sys_cred); 682 error = xfs_getattr(xfs_vtoi(vp), &va, 0);
679 } 683 }
680 684
681 if (error) 685 if (error)
@@ -773,7 +777,7 @@ xfs_acl_setmode(
773 * mode. The m:: bits take precedence over the g:: bits. 777 * mode. The m:: bits take precedence over the g:: bits.
774 */ 778 */
775 va.va_mask = XFS_AT_MODE; 779 va.va_mask = XFS_AT_MODE;
776 error = bhv_vop_getattr(vp, &va, 0, sys_cred); 780 error = xfs_getattr(xfs_vtoi(vp), &va, 0);
777 if (error) 781 if (error)
778 return error; 782 return error;
779 783
@@ -807,7 +811,7 @@ xfs_acl_setmode(
807 if (gap && nomask) 811 if (gap && nomask)
808 va.va_mode |= gap->ae_perm << 3; 812 va.va_mode |= gap->ae_perm << 3;
809 813
810 return bhv_vop_setattr(vp, &va, 0, sys_cred); 814 return xfs_setattr(xfs_vtoi(vp), &va, 0, sys_cred);
811} 815}
812 816
813/* 817/*
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index 1a10bffc7755..93fa64dd1be6 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -49,6 +49,7 @@
49#include "xfs_trans_space.h" 49#include "xfs_trans_space.h"
50#include "xfs_acl.h" 50#include "xfs_acl.h"
51#include "xfs_rw.h" 51#include "xfs_rw.h"
52#include "xfs_vnodeops.h"
52 53
53/* 54/*
54 * xfs_attr.c 55 * xfs_attr.c
@@ -2512,7 +2513,7 @@ STATIC int
2512attr_generic_set( 2513attr_generic_set(
2513 bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) 2514 bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags)
2514{ 2515{
2515 return -bhv_vop_attr_set(vp, name, data, size, xflags, NULL); 2516 return -xfs_attr_set(xfs_vtoi(vp), name, data, size, xflags);
2516} 2517}
2517 2518
2518STATIC int 2519STATIC int
@@ -2521,7 +2522,8 @@ attr_generic_get(
2521{ 2522{
2522 int error, asize = size; 2523 int error, asize = size;
2523 2524
2524 error = bhv_vop_attr_get(vp, name, data, &asize, xflags, NULL); 2525 error = xfs_attr_get(xfs_vtoi(vp), name, data,
2526 &asize, xflags, NULL);
2525 if (!error) 2527 if (!error)
2526 return asize; 2528 return asize;
2527 return -error; 2529 return -error;
@@ -2531,7 +2533,7 @@ STATIC int
2531attr_generic_remove( 2533attr_generic_remove(
2532 bhv_vnode_t *vp, char *name, int xflags) 2534 bhv_vnode_t *vp, char *name, int xflags)
2533{ 2535{
2534 return -bhv_vop_attr_remove(vp, name, xflags, NULL); 2536 return -xfs_attr_remove(xfs_vtoi(vp), name, xflags);
2535} 2537}
2536 2538
2537STATIC int 2539STATIC int
@@ -2586,7 +2588,7 @@ attr_generic_list(
2586 attrlist_cursor_kern_t cursor = { 0 }; 2588 attrlist_cursor_kern_t cursor = { 0 };
2587 int error; 2589 int error;
2588 2590
2589 error = bhv_vop_attr_list(vp, data, size, xflags, &cursor, NULL); 2591 error = xfs_attr_list(xfs_vtoi(vp), data, size, xflags, &cursor);
2590 if (error > 0) 2592 if (error > 0)
2591 return -error; 2593 return -error;
2592 *result = -error; 2594 *result = -error;
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 16b97db4f8aa..2e9b34b7344b 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -53,6 +53,7 @@
53#include "xfs_trans_space.h" 53#include "xfs_trans_space.h"
54#include "xfs_buf_item.h" 54#include "xfs_buf_item.h"
55#include "xfs_filestream.h" 55#include "xfs_filestream.h"
56#include "xfs_vnodeops.h"
56 57
57 58
58#ifdef DEBUG 59#ifdef DEBUG
@@ -5868,7 +5869,8 @@ xfs_getbmap(
5868 if (whichfork == XFS_DATA_FORK && 5869 if (whichfork == XFS_DATA_FORK &&
5869 (ip->i_delayed_blks || ip->i_size > ip->i_d.di_size)) { 5870 (ip->i_delayed_blks || ip->i_size > ip->i_d.di_size)) {
5870 /* xfs_fsize_t last_byte = xfs_file_last_byte(ip); */ 5871 /* xfs_fsize_t last_byte = xfs_file_last_byte(ip); */
5871 error = bhv_vop_flush_pages(vp, (xfs_off_t)0, -1, 0, FI_REMAPF); 5872 error = xfs_flush_pages(ip, (xfs_off_t)0,
5873 -1, 0, FI_REMAPF);
5872 } 5874 }
5873 5875
5874 ASSERT(whichfork == XFS_ATTR_FORK || ip->i_delayed_blks == 0); 5876 ASSERT(whichfork == XFS_ATTR_FORK || ip->i_delayed_blks == 0);
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
index de35d18cc002..584f1ae85cd9 100644
--- a/fs/xfs/xfs_dfrag.c
+++ b/fs/xfs/xfs_dfrag.c
@@ -42,6 +42,7 @@
42#include "xfs_dfrag.h" 42#include "xfs_dfrag.h"
43#include "xfs_error.h" 43#include "xfs_error.h"
44#include "xfs_rw.h" 44#include "xfs_rw.h"
45#include "xfs_vnodeops.h"
45 46
46/* 47/*
47 * Syssgi interface for swapext 48 * Syssgi interface for swapext
@@ -199,7 +200,8 @@ xfs_swap_extents(
199 200
200 if (VN_CACHED(tvp) != 0) { 201 if (VN_CACHED(tvp) != 0) {
201 xfs_inval_cached_trace(&tip->i_iocore, 0, -1, 0, -1); 202 xfs_inval_cached_trace(&tip->i_iocore, 0, -1, 0, -1);
202 error = bhv_vop_flushinval_pages(tvp, 0, -1, FI_REMAPF_LOCKED); 203 error = xfs_flushinval_pages(tip, 0, -1,
204 FI_REMAPF_LOCKED);
203 if (error) 205 if (error)
204 goto error0; 206 goto error0;
205 } 207 }
@@ -265,7 +267,7 @@ xfs_swap_extents(
265 * fields change. 267 * fields change.
266 */ 268 */
267 269
268 bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF); 270 xfs_tosspages(ip, 0, -1, FI_REMAPF);
269 271
270 tp = xfs_trans_alloc(mp, XFS_TRANS_SWAPEXT); 272 tp = xfs_trans_alloc(mp, XFS_TRANS_SWAPEXT);
271 if ((error = xfs_trans_reserve(tp, 0, 273 if ((error = xfs_trans_reserve(tp, 0,
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c
index e07dcc1b70a6..5806597b9ec4 100644
--- a/fs/xfs/xfs_iget.c
+++ b/fs/xfs/xfs_iget.c
@@ -342,7 +342,7 @@ finish_inode:
342 * If we have a real type for an on-disk inode, we can set ops(&unlock) 342 * If we have a real type for an on-disk inode, we can set ops(&unlock)
343 * now. If it's a new inode being created, xfs_ialloc will handle it. 343 * now. If it's a new inode being created, xfs_ialloc will handle it.
344 */ 344 */
345 bhv_vfs_init_vnode(XFS_MTOVFS(mp), vp, XFS_ITOBHV(ip), 1); 345 bhv_vfs_init_vnode(XFS_MTOVFS(mp), vp, ip, 1);
346 346
347 return 0; 347 return 0;
348} 348}
@@ -536,7 +536,8 @@ xfs_ireclaim(xfs_inode_t *ip)
536 */ 536 */
537 vp = XFS_ITOV_NULL(ip); 537 vp = XFS_ITOV_NULL(ip);
538 if (vp) { 538 if (vp) {
539 vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip)); 539 vn_to_inode(vp)->i_private = NULL;
540 ip->i_vnode = NULL;
540 } 541 }
541 542
542 /* 543 /*
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index c1b917bd5951..c2fc4838a5fa 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -49,6 +49,7 @@
49#include "xfs_quota.h" 49#include "xfs_quota.h"
50#include "xfs_acl.h" 50#include "xfs_acl.h"
51#include "xfs_filestream.h" 51#include "xfs_filestream.h"
52#include "xfs_vnodeops.h"
52 53
53kmem_zone_t *xfs_ifork_zone; 54kmem_zone_t *xfs_ifork_zone;
54kmem_zone_t *xfs_inode_zone; 55kmem_zone_t *xfs_inode_zone;
@@ -1267,7 +1268,7 @@ xfs_ialloc(
1267 xfs_trans_log_inode(tp, ip, flags); 1268 xfs_trans_log_inode(tp, ip, flags);
1268 1269
1269 /* now that we have an i_mode we can setup inode ops and unlock */ 1270 /* now that we have an i_mode we can setup inode ops and unlock */
1270 bhv_vfs_init_vnode(XFS_MTOVFS(tp->t_mountp), vp, XFS_ITOBHV(ip), 1); 1271 bhv_vfs_init_vnode(XFS_MTOVFS(tp->t_mountp), vp, ip, 1);
1271 1272
1272 *ipp = ip; 1273 *ipp = ip;
1273 return 0; 1274 return 0;
@@ -1489,9 +1490,11 @@ xfs_itruncate_start(
1489 last_byte); 1490 last_byte);
1490 if (last_byte > toss_start) { 1491 if (last_byte > toss_start) {
1491 if (flags & XFS_ITRUNC_DEFINITE) { 1492 if (flags & XFS_ITRUNC_DEFINITE) {
1492 bhv_vop_toss_pages(vp, toss_start, -1, FI_REMAPF_LOCKED); 1493 xfs_tosspages(ip, toss_start,
1494 -1, FI_REMAPF_LOCKED);
1493 } else { 1495 } else {
1494 error = bhv_vop_flushinval_pages(vp, toss_start, -1, FI_REMAPF_LOCKED); 1496 error = xfs_flushinval_pages(ip, toss_start,
1497 -1, FI_REMAPF_LOCKED);
1495 } 1498 }
1496 } 1499 }
1497 1500
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index b6dd23d9b3d6..6f88ac3b10ae 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -257,7 +257,7 @@ typedef struct xfs_inode {
257 struct xfs_inode *i_mprev; /* ptr to prev inode */ 257 struct xfs_inode *i_mprev; /* ptr to prev inode */
258 struct xfs_mount *i_mount; /* fs mount struct ptr */ 258 struct xfs_mount *i_mount; /* fs mount struct ptr */
259 struct list_head i_reclaim; /* reclaim list */ 259 struct list_head i_reclaim; /* reclaim list */
260 struct bhv_desc i_bhv_desc; /* inode behavior descriptor*/ 260 struct bhv_vnode *i_vnode; /* vnode backpointer */
261 struct xfs_dquot *i_udquot; /* user dquot */ 261 struct xfs_dquot *i_udquot; /* user dquot */
262 struct xfs_dquot *i_gdquot; /* group dquot */ 262 struct xfs_dquot *i_gdquot; /* group dquot */
263 263
@@ -465,12 +465,8 @@ xfs_iflags_test(xfs_inode_t *ip, unsigned short flags)
465#define XFS_ITRUNC_DEFINITE 0x1 465#define XFS_ITRUNC_DEFINITE 0x1
466#define XFS_ITRUNC_MAYBE 0x2 466#define XFS_ITRUNC_MAYBE 0x2
467 467
468#define XFS_ITOV(ip) BHV_TO_VNODE(XFS_ITOBHV(ip)) 468#define XFS_ITOV(ip) ((ip)->i_vnode)
469#define XFS_ITOV_NULL(ip) BHV_TO_VNODE_NULL(XFS_ITOBHV(ip)) 469#define XFS_ITOV_NULL(ip) ((ip)->i_vnode)
470#define XFS_ITOBHV(ip) ((struct bhv_desc *)(&((ip)->i_bhv_desc)))
471#define XFS_BHVTOI(bhvp) ((xfs_inode_t *)((char *)(bhvp) - \
472 (char *)&(((xfs_inode_t *)0)->i_bhv_desc)))
473#define BHV_IS_XFS(bdp) (BHV_OPS(bdp) == &xfs_vnodeops)
474 470
475/* 471/*
476 * For multiple groups support: if S_ISGID bit is set in the parent 472 * For multiple groups support: if S_ISGID bit is set in the parent
@@ -557,8 +553,6 @@ void xfs_ichgtime(xfs_inode_t *, int);
557xfs_fsize_t xfs_file_last_byte(xfs_inode_t *); 553xfs_fsize_t xfs_file_last_byte(xfs_inode_t *);
558void xfs_lock_inodes(xfs_inode_t **, int, int, uint); 554void xfs_lock_inodes(xfs_inode_t **, int, int, uint);
559 555
560xfs_inode_t *xfs_vtoi(struct bhv_vnode *vp);
561
562void xfs_synchronize_atime(xfs_inode_t *); 556void xfs_synchronize_atime(xfs_inode_t *);
563 557
564xfs_bmbt_rec_host_t *xfs_iext_get_ext(xfs_ifork_t *, xfs_extnum_t); 558xfs_bmbt_rec_host_t *xfs_iext_get_ext(xfs_ifork_t *, xfs_extnum_t);
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index bc23cb407701..f5e32f43cd62 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -66,7 +66,6 @@ struct xfs_swapext;
66struct xfs_mru_cache; 66struct xfs_mru_cache;
67 67
68extern struct bhv_vfsops xfs_vfsops; 68extern struct bhv_vfsops xfs_vfsops;
69extern struct bhv_vnodeops xfs_vnodeops;
70 69
71#define AIL_LOCK_T lock_t 70#define AIL_LOCK_T lock_t
72#define AIL_LOCKINIT(x,y) spinlock_init(x,y) 71#define AIL_LOCKINIT(x,y) spinlock_init(x,y)
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c
index b62b8771afcf..2f5c8740b25c 100644
--- a/fs/xfs/xfs_rename.c
+++ b/fs/xfs/xfs_rename.c
@@ -586,11 +586,8 @@ xfs_rename(
586 /* 586 /*
587 * Let interposed file systems know about removed links. 587 * Let interposed file systems know about removed links.
588 */ 588 */
589 if (target_ip_dropped) { 589 if (target_ip_dropped)
590 bhv_vop_link_removed(XFS_ITOV(target_ip), target_dir_vp,
591 target_link_zero);
592 IRELE(target_ip); 590 IRELE(target_ip);
593 }
594 591
595 IRELE(src_ip); 592 IRELE(src_ip);
596 593
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index b4db8a208076..a9cebcb0b33b 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -54,6 +54,8 @@
54#include "xfs_mru_cache.h" 54#include "xfs_mru_cache.h"
55#include "xfs_filestream.h" 55#include "xfs_filestream.h"
56#include "xfs_fsops.h" 56#include "xfs_fsops.h"
57#include "xfs_vnodeops.h"
58
57 59
58STATIC int xfs_sync(bhv_desc_t *, int, cred_t *); 60STATIC int xfs_sync(bhv_desc_t *, int, cred_t *);
59 61
@@ -1191,12 +1193,13 @@ xfs_sync_inodes(
1191 if (flags & SYNC_CLOSE) { 1193 if (flags & SYNC_CLOSE) {
1192 /* Shutdown case. Flush and invalidate. */ 1194 /* Shutdown case. Flush and invalidate. */
1193 if (XFS_FORCED_SHUTDOWN(mp)) 1195 if (XFS_FORCED_SHUTDOWN(mp))
1194 bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF); 1196 xfs_tosspages(ip, 0, -1,
1197 FI_REMAPF);
1195 else 1198 else
1196 error = bhv_vop_flushinval_pages(vp, 0, 1199 error = xfs_flushinval_pages(ip,
1197 -1, FI_REMAPF); 1200 0, -1, FI_REMAPF);
1198 } else if ((flags & SYNC_DELWRI) && VN_DIRTY(vp)) { 1201 } else if ((flags & SYNC_DELWRI) && VN_DIRTY(vp)) {
1199 error = bhv_vop_flush_pages(vp, (xfs_off_t)0, 1202 error = xfs_flush_pages(ip, 0,
1200 -1, fflag, FI_NONE); 1203 -1, fflag, FI_NONE);
1201 } 1204 }
1202 1205
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 2b30fa690b4a..5eb392d06298 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -592,7 +592,7 @@ xfs_setattr(
592 if (!code && 592 if (!code &&
593 (ip->i_size != ip->i_d.di_size) && 593 (ip->i_size != ip->i_d.di_size) &&
594 (vap->va_size > ip->i_d.di_size)) { 594 (vap->va_size > ip->i_d.di_size)) {
595 code = bhv_vop_flush_pages(XFS_ITOV(ip), 595 code = xfs_flush_pages(ip,
596 ip->i_d.di_size, vap->va_size, 596 ip->i_d.di_size, vap->va_size,
597 XFS_B_ASYNC, FI_NONE); 597 XFS_B_ASYNC, FI_NONE);
598 } 598 }
@@ -864,10 +864,6 @@ xfs_setattr(
864 * racing calls to vop_vnode_change. 864 * racing calls to vop_vnode_change.
865 */ 865 */
866 mandlock_after = MANDLOCK(vp, ip->i_d.di_mode); 866 mandlock_after = MANDLOCK(vp, ip->i_d.di_mode);
867 if (mandlock_before != mandlock_after) {
868 bhv_vop_vnode_change(vp, VCHANGE_FLAGS_ENF_LOCKING,
869 mandlock_after);
870 }
871 867
872 xfs_iunlock(ip, lock_flags); 868 xfs_iunlock(ip, lock_flags);
873 869
@@ -1544,7 +1540,7 @@ xfs_release(
1544 * be exposed to that problem. 1540 * be exposed to that problem.
1545 */ 1541 */
1546 if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0) 1542 if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0)
1547 bhv_vop_flush_pages(vp, 0, -1, XFS_B_ASYNC, FI_NONE); 1543 xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE);
1548 } 1544 }
1549 1545
1550#ifdef HAVE_REFCACHE 1546#ifdef HAVE_REFCACHE
@@ -2008,12 +2004,6 @@ xfs_create(
2008 XFS_QM_DQRELE(mp, udqp); 2004 XFS_QM_DQRELE(mp, udqp);
2009 XFS_QM_DQRELE(mp, gdqp); 2005 XFS_QM_DQRELE(mp, gdqp);
2010 2006
2011 /*
2012 * Propagate the fact that the vnode changed after the
2013 * xfs_inode locks have been released.
2014 */
2015 bhv_vop_vnode_change(vp, VCHANGE_FLAGS_TRUNCATED, 3);
2016
2017 *vpp = vp; 2007 *vpp = vp;
2018 2008
2019 /* Fallthrough to std_return with error = 0 */ 2009 /* Fallthrough to std_return with error = 0 */
@@ -2512,11 +2502,6 @@ xfs_remove(
2512 2502
2513 vn_trace_exit(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); 2503 vn_trace_exit(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address);
2514 2504
2515 /*
2516 * Let interposed file systems know about removed links.
2517 */
2518 bhv_vop_link_removed(XFS_ITOV(ip), dir_vp, link_zero);
2519
2520 IRELE(ip); 2505 IRELE(ip);
2521 2506
2522/* Fall through to std_return with error = 0 */ 2507/* Fall through to std_return with error = 0 */
@@ -3146,11 +3131,6 @@ xfs_rmdir(
3146 } 3131 }
3147 3132
3148 3133
3149 /*
3150 * Let interposed file systems know about removed links.
3151 */
3152 bhv_vop_link_removed(XFS_ITOV(cdp), dir_vp, last_cdp_link);
3153
3154 IRELE(cdp); 3134 IRELE(cdp);
3155 3135
3156 /* Fall through to std_return with error = 0 or the errno 3136 /* Fall through to std_return with error = 0 or the errno
@@ -3732,7 +3712,8 @@ xfs_reclaim(
3732 XFS_MOUNT_ILOCK(mp); 3712 XFS_MOUNT_ILOCK(mp);
3733 spin_lock(&ip->i_flags_lock); 3713 spin_lock(&ip->i_flags_lock);
3734 __xfs_iflags_set(ip, XFS_IRECLAIMABLE); 3714 __xfs_iflags_set(ip, XFS_IRECLAIMABLE);
3735 vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip)); 3715 vn_to_inode(vp)->i_private = NULL;
3716 ip->i_vnode = NULL;
3736 spin_unlock(&ip->i_flags_lock); 3717 spin_unlock(&ip->i_flags_lock);
3737 list_add_tail(&ip->i_reclaim, &mp->m_del_inodes); 3718 list_add_tail(&ip->i_reclaim, &mp->m_del_inodes);
3738 XFS_MOUNT_IUNLOCK(mp); 3719 XFS_MOUNT_IUNLOCK(mp);
@@ -4214,7 +4195,8 @@ xfs_free_file_space(
4214 if (VN_CACHED(vp) != 0) { 4195 if (VN_CACHED(vp) != 0) {
4215 xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1, 4196 xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1,
4216 ctooff(offtoct(ioffset)), -1); 4197 ctooff(offtoct(ioffset)), -1);
4217 error = bhv_vop_flushinval_pages(vp, ctooff(offtoct(ioffset)), 4198 error = xfs_flushinval_pages(ip,
4199 ctooff(offtoct(ioffset)),
4218 -1, FI_REMAPF_LOCKED); 4200 -1, FI_REMAPF_LOCKED);
4219 if (error) 4201 if (error)
4220 goto out_unlock_iolock; 4202 goto out_unlock_iolock;
diff --git a/fs/xfs/xfs_vnodeops_bhv.c b/fs/xfs/xfs_vnodeops_bhv.c
deleted file mode 100644
index c61653aed054..000000000000
--- a/fs/xfs/xfs_vnodeops_bhv.c
+++ /dev/null
@@ -1,438 +0,0 @@
1
2#include "xfs_linux.h"
3#include "xfs_vnodeops.h"
4
5#include "xfs_bmap_btree.h"
6#include "xfs_inode.h"
7
8STATIC int
9xfs_bhv_open(
10 bhv_desc_t *bdp,
11 cred_t *credp)
12{
13 return xfs_open(XFS_BHVTOI(bdp));
14}
15
16STATIC int
17xfs_bhv_getattr(
18 bhv_desc_t *bdp,
19 bhv_vattr_t *vap,
20 int flags,
21 cred_t *credp)
22{
23 return xfs_getattr(XFS_BHVTOI(bdp), vap, flags);
24}
25
26int
27xfs_bhv_setattr(
28 bhv_desc_t *bdp,
29 bhv_vattr_t *vap,
30 int flags,
31 cred_t *credp)
32{
33 return xfs_setattr(XFS_BHVTOI(bdp), vap, flags, credp);
34}
35
36STATIC int
37xfs_bhv_access(
38 bhv_desc_t *bdp,
39 int mode,
40 cred_t *credp)
41{
42 return xfs_access(XFS_BHVTOI(bdp), mode, credp);
43}
44
45STATIC int
46xfs_bhv_readlink(
47 bhv_desc_t *bdp,
48 char *link)
49{
50 return xfs_readlink(XFS_BHVTOI(bdp), link);
51}
52
53STATIC int
54xfs_bhv_fsync(
55 bhv_desc_t *bdp,
56 int flag,
57 cred_t *credp,
58 xfs_off_t start,
59 xfs_off_t stop)
60{
61 return xfs_fsync(XFS_BHVTOI(bdp), flag, start, stop);
62}
63
64STATIC int
65xfs_bhv_release(
66 bhv_desc_t *bdp)
67{
68 return xfs_release(XFS_BHVTOI(bdp));
69}
70
71STATIC int
72xfs_bhv_inactive(
73 bhv_desc_t *bdp,
74 cred_t *credp)
75{
76 return xfs_inactive(XFS_BHVTOI(bdp));
77}
78
79STATIC int
80xfs_bhv_lookup(
81 bhv_desc_t *dir_bdp,
82 bhv_vname_t *dentry,
83 bhv_vnode_t **vpp,
84 int flags,
85 bhv_vnode_t *rdir,
86 cred_t *credp)
87{
88 return xfs_lookup(XFS_BHVTOI(dir_bdp), dentry, vpp);
89}
90
91STATIC int
92xfs_bhv_create(
93 bhv_desc_t *dir_bdp,
94 bhv_vname_t *dentry,
95 bhv_vattr_t *vap,
96 bhv_vnode_t **vpp,
97 cred_t *credp)
98{
99 return xfs_create(XFS_BHVTOI(dir_bdp), dentry, vap, vpp, credp);
100}
101
102STATIC int
103xfs_bhv_remove(
104 bhv_desc_t *dir_bdp,
105 bhv_vname_t *dentry,
106 cred_t *credp)
107{
108 return xfs_remove(XFS_BHVTOI(dir_bdp), dentry);
109}
110
111STATIC int
112xfs_bhv_link(
113 bhv_desc_t *target_dir_bdp,
114 bhv_vnode_t *src_vp,
115 bhv_vname_t *dentry,
116 cred_t *credp)
117{
118 return xfs_link(XFS_BHVTOI(target_dir_bdp), src_vp, dentry);
119}
120
121STATIC int
122xfs_bhv_mkdir(
123 bhv_desc_t *dir_bdp,
124 bhv_vname_t *dentry,
125 bhv_vattr_t *vap,
126 bhv_vnode_t **vpp,
127 cred_t *credp)
128{
129 return xfs_mkdir(XFS_BHVTOI(dir_bdp), dentry, vap, vpp, credp);
130}
131
132STATIC int
133xfs_bhv_rmdir(
134 bhv_desc_t *dir_bdp,
135 bhv_vname_t *dentry,
136 cred_t *credp)
137{
138 return xfs_rmdir(XFS_BHVTOI(dir_bdp), dentry);
139}
140
141STATIC int
142xfs_bhv_readdir(
143 bhv_desc_t *dir_bdp,
144 void *dirent,
145 size_t bufsize,
146 xfs_off_t *offset,
147 filldir_t filldir)
148{
149 return xfs_readdir(XFS_BHVTOI(dir_bdp), dirent, bufsize, offset, filldir);
150}
151
152STATIC int
153xfs_bhv_symlink(
154 bhv_desc_t *dir_bdp,
155 bhv_vname_t *dentry,
156 bhv_vattr_t *vap,
157 char *target_path,
158 bhv_vnode_t **vpp,
159 cred_t *credp)
160{
161 return xfs_symlink(XFS_BHVTOI(dir_bdp), dentry, vap, target_path, vpp, credp);
162}
163
164STATIC int
165xfs_bhv_fid2(
166 bhv_desc_t *bdp,
167 fid_t *fidp)
168{
169 return xfs_fid2(XFS_BHVTOI(bdp), fidp);
170}
171
172STATIC int
173xfs_bhv_rwlock(
174 bhv_desc_t *bdp,
175 bhv_vrwlock_t locktype)
176{
177 return xfs_rwlock(XFS_BHVTOI(bdp), locktype);
178}
179
180STATIC void
181xfs_bhv_rwunlock(
182 bhv_desc_t *bdp,
183 bhv_vrwlock_t locktype)
184{
185 xfs_rwunlock(XFS_BHVTOI(bdp), locktype);
186}
187
188STATIC int
189xfs_bhv_inode_flush(
190 bhv_desc_t *bdp,
191 int flags)
192{
193 return xfs_inode_flush(XFS_BHVTOI(bdp), flags);
194}
195
196STATIC int
197xfs_bhv_reclaim(
198 bhv_desc_t *bdp)
199{
200 return xfs_reclaim(XFS_BHVTOI(bdp));
201}
202
203STATIC int
204xfs_bhv_rename(
205 bhv_desc_t *src_dir_bdp,
206 bhv_vname_t *src_vname,
207 bhv_vnode_t *target_dir_vp,
208 bhv_vname_t *target_vname,
209 cred_t *credp)
210{
211 return xfs_rename(XFS_BHVTOI(src_dir_bdp), src_vname,
212 target_dir_vp, target_vname);
213}
214
215STATIC int
216xfs_bhv_attr_get(
217 bhv_desc_t *bdp,
218 const char *name,
219 char *value,
220 int *valuelenp,
221 int flags,
222 cred_t *cred)
223{
224 return xfs_attr_get(XFS_BHVTOI(bdp), name, value, valuelenp,
225 flags, cred);
226}
227
228STATIC int
229xfs_bhv_attr_set(
230 bhv_desc_t *bdp,
231 const char *name,
232 char *value,
233 int valuelen,
234 int flags,
235 cred_t *cred)
236{
237 return xfs_attr_set(XFS_BHVTOI(bdp), name, value, valuelen,
238 flags);
239}
240
241STATIC int
242xfs_bhv_attr_remove(
243 bhv_desc_t *bdp,
244 const char *name,
245 int flags,
246 cred_t *cred)
247{
248 return xfs_attr_remove(XFS_BHVTOI(bdp), name, flags);
249}
250
251STATIC int
252xfs_bhv_attr_list(
253 bhv_desc_t *bdp,
254 char *buffer,
255 int bufsize,
256 int flags,
257 struct attrlist_cursor_kern *cursor,
258 cred_t *cred)
259{
260 return xfs_attr_list(XFS_BHVTOI(bdp), buffer, bufsize, flags,
261 cursor);
262}
263
264STATIC int
265xfs_bhv_ioctl(
266 bhv_desc_t *bdp,
267 struct inode *inode,
268 struct file *filp,
269 int ioflags,
270 unsigned int cmd,
271 void __user *arg)
272{
273 return xfs_ioctl(XFS_BHVTOI(bdp), filp, ioflags, cmd, arg);
274}
275
276STATIC ssize_t
277xfs_bhv_read(
278 bhv_desc_t *bdp,
279 struct kiocb *iocb,
280 const struct iovec *iovp,
281 unsigned int segs,
282 loff_t *offset,
283 int ioflags,
284 cred_t *credp)
285{
286 return xfs_read(XFS_BHVTOI(bdp), iocb, iovp, segs,
287 offset, ioflags);
288}
289
290STATIC ssize_t
291xfs_bhv_sendfile(
292 bhv_desc_t *bdp,
293 struct file *filp,
294 loff_t *offset,
295 int ioflags,
296 size_t count,
297 read_actor_t actor,
298 void *target,
299 cred_t *credp)
300{
301 return xfs_sendfile(XFS_BHVTOI(bdp), filp, offset, ioflags,
302 count, actor, target);
303}
304
305STATIC ssize_t
306xfs_bhv_splice_read(
307 bhv_desc_t *bdp,
308 struct file *infilp,
309 loff_t *ppos,
310 struct pipe_inode_info *pipe,
311 size_t count,
312 int flags,
313 int ioflags,
314 cred_t *credp)
315{
316 return xfs_splice_read(XFS_BHVTOI(bdp), infilp, ppos, pipe,
317 count, flags, ioflags);
318}
319
320STATIC ssize_t
321xfs_bhv_splice_write(
322 bhv_desc_t *bdp,
323 struct pipe_inode_info *pipe,
324 struct file *outfilp,
325 loff_t *ppos,
326 size_t count,
327 int flags,
328 int ioflags,
329 cred_t *credp)
330{
331 return xfs_splice_write(XFS_BHVTOI(bdp), pipe, outfilp, ppos,
332 count, flags, ioflags);
333}
334
335STATIC ssize_t
336xfs_bhv_write(
337 bhv_desc_t *bdp,
338 struct kiocb *iocb,
339 const struct iovec *iovp,
340 unsigned int nsegs,
341 loff_t *offset,
342 int ioflags,
343 cred_t *credp)
344{
345 return xfs_write(XFS_BHVTOI(bdp), iocb, iovp, nsegs, offset,
346 ioflags);
347}
348
349STATIC int
350xfs_bhv_bmap(bhv_desc_t *bdp,
351 xfs_off_t offset,
352 ssize_t count,
353 int flags,
354 struct xfs_iomap *iomapp,
355 int *niomaps)
356{
357 return xfs_bmap(XFS_BHVTOI(bdp), offset, count, flags,
358 iomapp, niomaps);
359}
360
361STATIC void
362fs_tosspages(
363 bhv_desc_t *bdp,
364 xfs_off_t first,
365 xfs_off_t last,
366 int fiopt)
367{
368 xfs_tosspages(XFS_BHVTOI(bdp), first, last, fiopt);
369}
370
371STATIC int
372fs_flushinval_pages(
373 bhv_desc_t *bdp,
374 xfs_off_t first,
375 xfs_off_t last,
376 int fiopt)
377{
378 return xfs_flushinval_pages(XFS_BHVTOI(bdp), first, last,
379 fiopt);
380}
381
382STATIC int
383fs_flush_pages(
384 bhv_desc_t *bdp,
385 xfs_off_t first,
386 xfs_off_t last,
387 uint64_t flags,
388 int fiopt)
389{
390 return xfs_flush_pages(XFS_BHVTOI(bdp), first, last, flags,
391 fiopt);
392}
393
394bhv_vnodeops_t xfs_vnodeops = {
395 BHV_IDENTITY_INIT(VN_BHV_XFS,VNODE_POSITION_XFS),
396 .vop_open = xfs_bhv_open,
397 .vop_read = xfs_bhv_read,
398#ifdef HAVE_SENDFILE
399 .vop_sendfile = xfs_bhv_sendfile,
400#endif
401#ifdef HAVE_SPLICE
402 .vop_splice_read = xfs_bhv_splice_read,
403 .vop_splice_write = xfs_bhv_splice_write,
404#endif
405 .vop_write = xfs_bhv_write,
406 .vop_ioctl = xfs_bhv_ioctl,
407 .vop_getattr = xfs_bhv_getattr,
408 .vop_setattr = xfs_bhv_setattr,
409 .vop_access = xfs_bhv_access,
410 .vop_lookup = xfs_bhv_lookup,
411 .vop_create = xfs_bhv_create,
412 .vop_remove = xfs_bhv_remove,
413 .vop_link = xfs_bhv_link,
414 .vop_rename = xfs_bhv_rename,
415 .vop_mkdir = xfs_bhv_mkdir,
416 .vop_rmdir = xfs_bhv_rmdir,
417 .vop_readdir = xfs_bhv_readdir,
418 .vop_symlink = xfs_bhv_symlink,
419 .vop_readlink = xfs_bhv_readlink,
420 .vop_fsync = xfs_bhv_fsync,
421 .vop_inactive = xfs_bhv_inactive,
422 .vop_fid2 = xfs_bhv_fid2,
423 .vop_rwlock = xfs_bhv_rwlock,
424 .vop_rwunlock = xfs_bhv_rwunlock,
425 .vop_bmap = xfs_bhv_bmap,
426 .vop_reclaim = xfs_bhv_reclaim,
427 .vop_attr_get = xfs_bhv_attr_get,
428 .vop_attr_set = xfs_bhv_attr_set,
429 .vop_attr_remove = xfs_bhv_attr_remove,
430 .vop_attr_list = xfs_bhv_attr_list,
431 .vop_link_removed = (vop_link_removed_t)fs_noval,
432 .vop_vnode_change = (vop_vnode_change_t)fs_noval,
433 .vop_tosspages = fs_tosspages,
434 .vop_flushinval_pages = fs_flushinval_pages,
435 .vop_flush_pages = fs_flush_pages,
436 .vop_release = xfs_bhv_release,
437 .vop_iflush = xfs_bhv_inode_flush,
438};