Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 2 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 3 | * All Rights Reserved. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License as |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * published by the Free Software Foundation. |
| 8 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 9 | * This program is distributed in the hope that it would be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 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, |
| 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | */ |
| 18 | #ifndef __XFS_VFS_H__ |
| 19 | #define __XFS_VFS_H__ |
| 20 | |
| 21 | #include <linux/vfs.h> |
| 22 | #include "xfs_fs.h" |
| 23 | |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 24 | struct bhv_vfs; |
Nathan Scott | 67fcaa7 | 2006-06-09 17:00:52 +1000 | [diff] [blame] | 25 | struct bhv_vnode; |
Nathan Scott | 8285fb5 | 2006-06-09 17:07:12 +1000 | [diff] [blame] | 26 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | struct fid; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | struct cred; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | struct seq_file; |
| 30 | struct super_block; |
Christoph Hellwig | 739bfb2 | 2007-08-29 10:58:01 +1000 | [diff] [blame^] | 31 | struct xfs_inode; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | struct xfs_mount_args; |
| 33 | |
Nathan Scott | 8285fb5 | 2006-06-09 17:07:12 +1000 | [diff] [blame] | 34 | typedef struct kstatfs bhv_statvfs_t; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 36 | typedef struct bhv_vfs_sync_work { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | struct list_head w_list; |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 38 | struct bhv_vfs *w_vfs; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | void *w_data; /* syncer routine argument */ |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 40 | void (*w_syncer)(struct bhv_vfs *, void *); |
| 41 | } bhv_vfs_sync_work_t; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 43 | typedef struct bhv_vfs { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | u_int vfs_flag; /* flags */ |
| 45 | xfs_fsid_t vfs_fsid; /* file system ID */ |
| 46 | xfs_fsid_t *vfs_altfsid; /* An ID fixed for life of FS */ |
| 47 | bhv_head_t vfs_bh; /* head of vfs behavior chain */ |
| 48 | struct super_block *vfs_super; /* generic superblock pointer */ |
| 49 | struct task_struct *vfs_sync_task; /* generalised sync thread */ |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 50 | bhv_vfs_sync_work_t vfs_sync_work; /* work item for VFS_SYNC */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | struct list_head vfs_sync_list; /* sync thread work item list */ |
| 52 | spinlock_t vfs_sync_lock; /* work item list lock */ |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 53 | int vfs_sync_seq; /* sync thread generation no. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | wait_queue_head_t vfs_wait_single_sync_task; |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 55 | } bhv_vfs_t; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 57 | #define bhvtovfs(bdp) ( (struct bhv_vfs *)BHV_VOBJ(bdp) ) |
| 58 | #define bhvtovfsops(bdp) ( (struct bhv_vfsops *)BHV_OPS(bdp) ) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | #define VFS_BHVHEAD(vfs) ( &(vfs)->vfs_bh ) |
| 60 | #define VFS_REMOVEBHV(vfs, bdp) ( bhv_remove(VFS_BHVHEAD(vfs), bdp) ) |
| 61 | |
| 62 | #define VFS_POSITION_BASE BHV_POSITION_BASE /* chain bottom */ |
| 63 | #define VFS_POSITION_TOP BHV_POSITION_TOP /* chain top */ |
| 64 | #define VFS_POSITION_INVALID BHV_POSITION_INVALID /* invalid pos. num */ |
| 65 | |
| 66 | typedef enum { |
| 67 | VFS_BHV_UNKNOWN, /* not specified */ |
| 68 | VFS_BHV_XFS, /* xfs */ |
| 69 | VFS_BHV_DM, /* data migration */ |
| 70 | VFS_BHV_QM, /* quota manager */ |
| 71 | VFS_BHV_IO, /* IO path */ |
| 72 | VFS_BHV_END /* housekeeping end-of-range */ |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 73 | } bhv_vfs_type_t; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 74 | |
| 75 | #define VFS_POSITION_XFS (BHV_POSITION_BASE) |
| 76 | #define VFS_POSITION_DM (VFS_POSITION_BASE+10) |
| 77 | #define VFS_POSITION_QM (VFS_POSITION_BASE+20) |
| 78 | #define VFS_POSITION_IO (VFS_POSITION_BASE+30) |
| 79 | |
| 80 | #define VFS_RDONLY 0x0001 /* read-only vfs */ |
| 81 | #define VFS_GRPID 0x0002 /* group-ID assigned from directory */ |
| 82 | #define VFS_DMI 0x0004 /* filesystem has the DMI enabled */ |
Nathan Scott | 29b6d22 | 2006-09-28 10:59:06 +1000 | [diff] [blame] | 83 | /* ---- VFS_UMOUNT ---- 0x0008 -- unneeded, fixed via kthread APIs */ |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 84 | #define VFS_32BITINODES 0x0010 /* do not use inums above 32 bits */ |
| 85 | #define VFS_END 0x0010 /* max flag */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 | |
| 87 | #define SYNC_ATTR 0x0001 /* sync attributes */ |
| 88 | #define SYNC_CLOSE 0x0002 /* close file system down */ |
| 89 | #define SYNC_DELWRI 0x0004 /* look at delayed writes */ |
| 90 | #define SYNC_WAIT 0x0008 /* wait for i/o to complete */ |
| 91 | #define SYNC_BDFLUSH 0x0010 /* BDFLUSH is calling -- don't block */ |
| 92 | #define SYNC_FSDATA 0x0020 /* flush fs data (e.g. superblocks) */ |
| 93 | #define SYNC_REFCACHE 0x0040 /* prune some of the nfs ref cache */ |
| 94 | #define SYNC_REMOUNT 0x0080 /* remount readonly, no dummy LRs */ |
David Chinner | 3c0dc77 | 2007-02-10 18:37:22 +1100 | [diff] [blame] | 95 | #define SYNC_IOWAIT 0x0100 /* wait for all I/O to complete */ |
David Chinner | 92821e2 | 2007-05-24 15:26:31 +1000 | [diff] [blame] | 96 | #define SYNC_SUPER 0x0200 /* flush superblock to disk */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | |
David Chinner | 516b2e7 | 2007-06-18 16:50:48 +1000 | [diff] [blame] | 98 | /* |
| 99 | * When remounting a filesystem read-only or freezing the filesystem, |
| 100 | * we have two phases to execute. This first phase is syncing the data |
| 101 | * before we quiesce the fielsystem, and the second is flushing all the |
| 102 | * inodes out after we've waited for all the transactions created by |
| 103 | * the first phase to complete. The second phase uses SYNC_INODE_QUIESCE |
| 104 | * to ensure that the inodes are written to their location on disk |
| 105 | * rather than just existing in transactions in the log. This means |
| 106 | * after a quiesce there is no log replay required to write the inodes |
| 107 | * to disk (this is the main difference between a sync and a quiesce). |
| 108 | */ |
| 109 | #define SYNC_DATA_QUIESCE (SYNC_DELWRI|SYNC_FSDATA|SYNC_WAIT|SYNC_IOWAIT) |
| 110 | #define SYNC_INODE_QUIESCE (SYNC_REMOUNT|SYNC_ATTR|SYNC_WAIT) |
| 111 | |
Nathan Scott | 7d04a33 | 2006-06-09 14:58:38 +1000 | [diff] [blame] | 112 | #define SHUTDOWN_META_IO_ERROR 0x0001 /* write attempt to metadata failed */ |
| 113 | #define SHUTDOWN_LOG_IO_ERROR 0x0002 /* write attempt to the log failed */ |
| 114 | #define SHUTDOWN_FORCE_UMOUNT 0x0004 /* shutdown from a forced unmount */ |
| 115 | #define SHUTDOWN_CORRUPT_INCORE 0x0008 /* corrupt in-memory data structures */ |
| 116 | #define SHUTDOWN_REMOTE_REQ 0x0010 /* shutdown came from remote cell */ |
| 117 | #define SHUTDOWN_DEVICE_REQ 0x0020 /* failed all paths to the device */ |
| 118 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | typedef int (*vfs_mount_t)(bhv_desc_t *, |
| 120 | struct xfs_mount_args *, struct cred *); |
| 121 | typedef int (*vfs_parseargs_t)(bhv_desc_t *, char *, |
| 122 | struct xfs_mount_args *, int); |
| 123 | typedef int (*vfs_showargs_t)(bhv_desc_t *, struct seq_file *); |
| 124 | typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *); |
| 125 | typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *, |
| 126 | struct xfs_mount_args *); |
Nathan Scott | 67fcaa7 | 2006-06-09 17:00:52 +1000 | [diff] [blame] | 127 | typedef int (*vfs_root_t)(bhv_desc_t *, struct bhv_vnode **); |
Nathan Scott | 8285fb5 | 2006-06-09 17:07:12 +1000 | [diff] [blame] | 128 | typedef int (*vfs_statvfs_t)(bhv_desc_t *, bhv_statvfs_t *, |
Nathan Scott | 67fcaa7 | 2006-06-09 17:00:52 +1000 | [diff] [blame] | 129 | struct bhv_vnode *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 130 | typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); |
Nathan Scott | 67fcaa7 | 2006-06-09 17:00:52 +1000 | [diff] [blame] | 131 | typedef int (*vfs_vget_t)(bhv_desc_t *, struct bhv_vnode **, struct fid *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 132 | typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t); |
| 133 | typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); |
| 134 | typedef void (*vfs_init_vnode_t)(bhv_desc_t *, |
Christoph Hellwig | 739bfb2 | 2007-08-29 10:58:01 +1000 | [diff] [blame^] | 135 | struct bhv_vnode *, struct xfs_inode *, int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 136 | typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int); |
| 137 | typedef void (*vfs_freeze_t)(bhv_desc_t *); |
| 138 | |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 139 | typedef struct bhv_vfsops { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | bhv_position_t vf_position; /* behavior chain position */ |
| 141 | vfs_mount_t vfs_mount; /* mount file system */ |
| 142 | vfs_parseargs_t vfs_parseargs; /* parse mount options */ |
| 143 | vfs_showargs_t vfs_showargs; /* unparse mount options */ |
| 144 | vfs_unmount_t vfs_unmount; /* unmount file system */ |
| 145 | vfs_mntupdate_t vfs_mntupdate; /* update file system options */ |
| 146 | vfs_root_t vfs_root; /* get root vnode */ |
| 147 | vfs_statvfs_t vfs_statvfs; /* file system statistics */ |
| 148 | vfs_sync_t vfs_sync; /* flush files */ |
| 149 | vfs_vget_t vfs_vget; /* get vnode from fid */ |
| 150 | vfs_dmapiops_t vfs_dmapiops; /* data migration */ |
| 151 | vfs_quotactl_t vfs_quotactl; /* disk quota */ |
| 152 | vfs_init_vnode_t vfs_init_vnode; /* initialize a new vnode */ |
| 153 | vfs_force_shutdown_t vfs_force_shutdown; /* crash and burn */ |
| 154 | vfs_freeze_t vfs_freeze; /* freeze fs for snapshot */ |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 155 | } bhv_vfsops_t; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | |
| 157 | /* |
Nathan Scott | 67fcaa7 | 2006-06-09 17:00:52 +1000 | [diff] [blame] | 158 | * Virtual filesystem operations, operating from head bhv. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 159 | */ |
Nathan Scott | 67fcaa7 | 2006-06-09 17:00:52 +1000 | [diff] [blame] | 160 | #define VFSHEAD(v) ((v)->vfs_bh.bh_first) |
| 161 | #define bhv_vfs_mount(v, ma,cr) vfs_mount(VFSHEAD(v), ma,cr) |
| 162 | #define bhv_vfs_parseargs(v, o,ma,f) vfs_parseargs(VFSHEAD(v), o,ma,f) |
| 163 | #define bhv_vfs_showargs(v, m) vfs_showargs(VFSHEAD(v), m) |
| 164 | #define bhv_vfs_unmount(v, f,cr) vfs_unmount(VFSHEAD(v), f,cr) |
| 165 | #define bhv_vfs_mntupdate(v, fl,args) vfs_mntupdate(VFSHEAD(v), fl,args) |
| 166 | #define bhv_vfs_root(v, vpp) vfs_root(VFSHEAD(v), vpp) |
| 167 | #define bhv_vfs_statvfs(v, sp,vp) vfs_statvfs(VFSHEAD(v), sp,vp) |
| 168 | #define bhv_vfs_sync(v, flag,cr) vfs_sync(VFSHEAD(v), flag,cr) |
| 169 | #define bhv_vfs_vget(v, vpp,fidp) vfs_vget(VFSHEAD(v), vpp,fidp) |
| 170 | #define bhv_vfs_dmapiops(v, p) vfs_dmapiops(VFSHEAD(v), p) |
| 171 | #define bhv_vfs_quotactl(v, c,id,p) vfs_quotactl(VFSHEAD(v), c,id,p) |
| 172 | #define bhv_vfs_init_vnode(v, vp,b,ul) vfs_init_vnode(VFSHEAD(v), vp,b,ul) |
| 173 | #define bhv_vfs_force_shutdown(v,u,f,l) vfs_force_shutdown(VFSHEAD(v), u,f,l) |
| 174 | #define bhv_vfs_freeze(v) vfs_freeze(VFSHEAD(v)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 175 | |
| 176 | /* |
Nathan Scott | 67fcaa7 | 2006-06-09 17:00:52 +1000 | [diff] [blame] | 177 | * Virtual filesystem operations, operating from next bhv. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 178 | */ |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 179 | #define bhv_next_vfs_mount(b, ma,cr) vfs_mount(b, ma,cr) |
| 180 | #define bhv_next_vfs_parseargs(b, o,ma,f) vfs_parseargs(b, o,ma,f) |
| 181 | #define bhv_next_vfs_showargs(b, m) vfs_showargs(b, m) |
| 182 | #define bhv_next_vfs_unmount(b, f,cr) vfs_unmount(b, f,cr) |
| 183 | #define bhv_next_vfs_mntupdate(b, fl,args) vfs_mntupdate(b, fl, args) |
| 184 | #define bhv_next_vfs_root(b, vpp) vfs_root(b, vpp) |
| 185 | #define bhv_next_vfs_statvfs(b, sp,vp) vfs_statvfs(b, sp,vp) |
| 186 | #define bhv_next_vfs_sync(b, flag,cr) vfs_sync(b, flag,cr) |
| 187 | #define bhv_next_vfs_vget(b, vpp,fidp) vfs_vget(b, vpp,fidp) |
| 188 | #define bhv_next_vfs_dmapiops(b, p) vfs_dmapiops(b, p) |
| 189 | #define bhv_next_vfs_quotactl(b, c,id,p) vfs_quotactl(b, c,id,p) |
| 190 | #define bhv_next_vfs_init_vnode(b, vp,b2,ul) vfs_init_vnode(b, vp,b2,ul) |
| 191 | #define bhv_next_force_shutdown(b, fl,f,l) vfs_force_shutdown(b, fl,f,l) |
| 192 | #define bhv_next_vfs_freeze(b) vfs_freeze(b) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 193 | |
| 194 | extern int vfs_mount(bhv_desc_t *, struct xfs_mount_args *, struct cred *); |
| 195 | extern int vfs_parseargs(bhv_desc_t *, char *, struct xfs_mount_args *, int); |
| 196 | extern int vfs_showargs(bhv_desc_t *, struct seq_file *); |
| 197 | extern int vfs_unmount(bhv_desc_t *, int, struct cred *); |
| 198 | extern int vfs_mntupdate(bhv_desc_t *, int *, struct xfs_mount_args *); |
Nathan Scott | 67fcaa7 | 2006-06-09 17:00:52 +1000 | [diff] [blame] | 199 | extern int vfs_root(bhv_desc_t *, struct bhv_vnode **); |
Nathan Scott | 8285fb5 | 2006-06-09 17:07:12 +1000 | [diff] [blame] | 200 | extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct bhv_vnode *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 201 | extern int vfs_sync(bhv_desc_t *, int, struct cred *); |
Nathan Scott | 67fcaa7 | 2006-06-09 17:00:52 +1000 | [diff] [blame] | 202 | extern int vfs_vget(bhv_desc_t *, struct bhv_vnode **, struct fid *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | extern int vfs_dmapiops(bhv_desc_t *, caddr_t); |
| 204 | extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); |
Christoph Hellwig | 739bfb2 | 2007-08-29 10:58:01 +1000 | [diff] [blame^] | 205 | extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, struct xfs_inode *, int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 206 | extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); |
| 207 | extern void vfs_freeze(bhv_desc_t *); |
| 208 | |
Nathan Scott | 34327e1 | 2006-06-09 17:11:55 +1000 | [diff] [blame] | 209 | #define vfs_test_for_freeze(vfs) ((vfs)->vfs_super->s_frozen) |
| 210 | #define vfs_wait_for_freeze(vfs,l) vfs_check_frozen((vfs)->vfs_super, (l)) |
| 211 | |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 212 | typedef struct bhv_module_vfsops { |
| 213 | struct bhv_vfsops bhv_common; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 214 | void * bhv_custom; |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 215 | } bhv_module_vfsops_t; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 216 | |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 217 | #define vfs_bhv_lookup(v, id) (bhv_lookup_range(&(v)->vfs_bh, (id), (id))) |
| 218 | #define vfs_bhv_custom(b) (((bhv_module_vfsops_t*)BHV_OPS(b))->bhv_custom) |
| 219 | #define vfs_bhv_set_custom(b,o) ((b)->bhv_custom = (void *)(o)) |
| 220 | #define vfs_bhv_clr_custom(b) ((b)->bhv_custom = NULL) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 221 | |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 222 | extern bhv_vfs_t *vfs_allocate(struct super_block *); |
| 223 | extern bhv_vfs_t *vfs_from_sb(struct super_block *); |
| 224 | extern void vfs_deallocate(bhv_vfs_t *); |
| 225 | extern void vfs_insertbhv(bhv_vfs_t *, bhv_desc_t *, bhv_vfsops_t *, void *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | |
Nathan Scott | b83bd13 | 2006-06-09 16:48:30 +1000 | [diff] [blame] | 227 | extern void vfs_insertops(bhv_vfs_t *, bhv_module_vfsops_t *); |
| 228 | |
| 229 | extern void bhv_insert_all_vfsops(struct bhv_vfs *); |
| 230 | extern void bhv_remove_all_vfsops(struct bhv_vfs *, int); |
| 231 | extern void bhv_remove_vfsops(struct bhv_vfs *, int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 232 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 233 | #endif /* __XFS_VFS_H__ */ |