aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vfsops_bhv.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-30 03:20:31 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-15 21:43:55 -0400
commit48c872a9f3ec4cdc37801aae9ef16c80026503ea (patch)
tree51d377e7ced7298d96daf9008558e54177e47a30 /fs/xfs/xfs_vfsops_bhv.c
parentb09cc77109dbf33463480952de10511a2b67bba6 (diff)
[XFS] decontaminate vfs operations from behavior details
All vfs ops now take struct xfs_mount pointers and the behaviour related glue is split out into methods of its own. SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29504a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vfsops_bhv.c')
-rw-r--r--fs/xfs/xfs_vfsops_bhv.c145
1 files changed, 145 insertions, 0 deletions
diff --git a/fs/xfs/xfs_vfsops_bhv.c b/fs/xfs/xfs_vfsops_bhv.c
new file mode 100644
index 000000000000..764b2aefb6bc
--- /dev/null
+++ b/fs/xfs/xfs_vfsops_bhv.c
@@ -0,0 +1,145 @@
1
2#include "xfs_linux.h"
3#include "xfs_vfsops.h"
4
5#include "xfs_inum.h"
6#include "xfs_dmapi.h"
7#include "xfs_sb.h"
8#include "xfs_log.h"
9#include "xfs_trans.h"
10#include "xfs_ag.h"
11#include "xfs_mount.h"
12
13
14STATIC int
15xfs_bhv_mount(
16 struct bhv_desc *bhvp,
17 struct xfs_mount_args *args,
18 cred_t *credp)
19{
20 return xfs_mount(XFS_BHVTOM(bhvp), args, credp);
21}
22
23STATIC int
24xfs_bhv_unmount(
25 bhv_desc_t *bdp,
26 int flags,
27 cred_t *credp)
28{
29 return xfs_unmount(XFS_BHVTOM(bdp), flags, credp);
30}
31
32STATIC int
33xfs_bhv_mntupdate(
34 bhv_desc_t *bdp,
35 int *flags,
36 struct xfs_mount_args *args)
37{
38 return xfs_mntupdate(XFS_BHVTOM(bdp), flags, args);
39}
40
41STATIC int
42xfs_bhv_root(
43 bhv_desc_t *bdp,
44 bhv_vnode_t **vpp)
45{
46 return xfs_root(XFS_BHVTOM(bdp), vpp);
47}
48
49STATIC int
50xfs_bhv_statvfs(
51 bhv_desc_t *bdp,
52 bhv_statvfs_t *statp,
53 bhv_vnode_t *vp)
54{
55 return xfs_statvfs(XFS_BHVTOM(bdp), statp, vp);
56}
57
58STATIC int
59xfs_bhv_sync(
60 bhv_desc_t *bdp,
61 int flags,
62 cred_t *credp)
63{
64 return xfs_sync(XFS_BHVTOM(bdp), flags);
65}
66
67STATIC int
68xfs_bhv_vget(
69 bhv_desc_t *bdp,
70 bhv_vnode_t **vpp,
71 fid_t *fidp)
72{
73 return xfs_vget(XFS_BHVTOM(bdp), vpp, fidp);
74}
75
76STATIC int
77xfs_bhv_parseargs(
78 struct bhv_desc *bhv,
79 char *options,
80 struct xfs_mount_args *args,
81 int update)
82{
83 return xfs_parseargs(XFS_BHVTOM(bhv), options, args, update);
84}
85
86STATIC int
87xfs_bhv_showargs(
88 struct bhv_desc *bhv,
89 struct seq_file *m)
90{
91 return xfs_showargs(XFS_BHVTOM(bhv), m);
92}
93
94STATIC void
95xfs_bhv_freeze(
96 bhv_desc_t *bdp)
97{
98 return xfs_freeze(XFS_BHVTOM(bdp));
99}
100
101STATIC void
102xfs_bhv_force_shutdown(
103 bhv_desc_t *bdp,
104 int flags,
105 char *fname,
106 int lnnum)
107{
108 return xfs_do_force_shutdown(XFS_BHVTOM(bdp), flags, fname, lnnum);
109}
110
111STATIC struct inode *
112xfs_bhv_get_inode(
113 bhv_desc_t *bdp,
114 xfs_ino_t ino,
115 int flags)
116{
117 return xfs_get_inode(XFS_BHVTOM(bdp), ino, flags);
118}
119
120STATIC void
121xfs_bhv_initialize_vnode(
122 bhv_desc_t *bdp,
123 bhv_vnode_t *vp,
124 struct xfs_inode *ip,
125 int unlock)
126{
127 return xfs_initialize_vnode(XFS_BHVTOM(bdp), vp, ip, unlock);
128}
129
130bhv_vfsops_t xfs_vfsops = {
131 BHV_IDENTITY_INIT(VFS_BHV_XFS,VFS_POSITION_XFS),
132 .vfs_parseargs = xfs_bhv_parseargs,
133 .vfs_showargs = xfs_bhv_showargs,
134 .vfs_mount = xfs_bhv_mount,
135 .vfs_unmount = xfs_bhv_unmount,
136 .vfs_mntupdate = xfs_bhv_mntupdate,
137 .vfs_root = xfs_bhv_root,
138 .vfs_statvfs = xfs_bhv_statvfs,
139 .vfs_sync = xfs_bhv_sync,
140 .vfs_vget = xfs_bhv_vget,
141 .vfs_get_inode = xfs_bhv_get_inode,
142 .vfs_init_vnode = xfs_bhv_initialize_vnode,
143 .vfs_force_shutdown = xfs_bhv_force_shutdown,
144 .vfs_freeze = xfs_bhv_freeze,
145};