Definitions of xfs_get_inode for ioops.
Definitions for behaviour module support.
--- /home/chatz/isms/linux-2.6.19/fs/xfs/linux-2.6/xfs_vfs.h 2006-11-30 08:57:37.000000000 +1100
+++ linux-2.6/xfs_vfs.h 2006-12-15 22:52:15.774622459 +1100
@@ -119,6 +119,7 @@
struct bhv_vnode *, bhv_desc_t *, int);
typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int);
typedef void (*vfs_freeze_t)(bhv_desc_t *);
+typedef struct inode * (*vfs_get_inode_t)(bhv_desc_t *, xfs_ino_t, int);
typedef struct bhv_vfsops {
bhv_position_t vf_position; /* behavior chain position */
@@ -133,6 +134,7 @@
vfs_vget_t vfs_vget; /* get vnode from fid */
vfs_dmapiops_t vfs_dmapiops; /* data migration */
vfs_quotactl_t vfs_quotactl; /* disk quota */
+ vfs_get_inode_t vfs_get_inode; /* bhv specific iget */
vfs_init_vnode_t vfs_init_vnode; /* initialize a new vnode */
vfs_force_shutdown_t vfs_force_shutdown; /* crash and burn */
vfs_freeze_t vfs_freeze; /* freeze fs for snapshot */
@@ -153,6 +155,7 @@
#define bhv_vfs_vget(v, vpp,fidp) vfs_vget(VFSHEAD(v), vpp,fidp)
#define bhv_vfs_dmapiops(v, p) vfs_dmapiops(VFSHEAD(v), p)
#define bhv_vfs_quotactl(v, c,id,p) vfs_quotactl(VFSHEAD(v), c,id,p)
+#define bhv_vfs_get_inode(v, ino, fl) vfs_get_inode(VFSHEAD(v), ino,fl)
#define bhv_vfs_init_vnode(v, vp,b,ul) vfs_init_vnode(VFSHEAD(v), vp,b,ul)
#define bhv_vfs_force_shutdown(v,u,f,l) vfs_force_shutdown(VFSHEAD(v), u,f,l)
#define bhv_vfs_freeze(v) vfs_freeze(VFSHEAD(v))
@@ -171,6 +174,7 @@
#define bhv_next_vfs_vget(b, vpp,fidp) vfs_vget(b, vpp,fidp)
#define bhv_next_vfs_dmapiops(b, p) vfs_dmapiops(b, p)
#define bhv_next_vfs_quotactl(b, c,id,p) vfs_quotactl(b, c,id,p)
+#define bhv_next_vfs_get_inode(b, ino,fl) vfs_get_inode(b, ino,fl)
#define bhv_next_vfs_init_vnode(b, vp,b2,ul) vfs_init_vnode(b, vp,b2,ul)
#define bhv_next_force_shutdown(b, fl,f,l) vfs_force_shutdown(b, fl,f,l)
#define bhv_next_vfs_freeze(b) vfs_freeze(b)
@@ -186,18 +190,32 @@
extern int vfs_vget(bhv_desc_t *, struct bhv_vnode **, struct fid *);
extern int vfs_dmapiops(bhv_desc_t *, caddr_t);
extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t);
+extern struct inode *vfs_get_inode(bhv_desc_t *, xfs_ino_t, int);
extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, bhv_desc_t *, int);
extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int);
extern void vfs_freeze(bhv_desc_t *);
#define vfs_test_for_freeze(vfs) ((vfs)->vfs_super->s_frozen)
#define vfs_wait_for_freeze(vfs,l) vfs_check_frozen((vfs)->vfs_super, (l))
-
+
+#define XFS_DMOPS "xfs_dm_operations" /* Data Migration */
+#define XFS_QMOPS "xfs_qm_operations" /* Quota Manager */
+#define XFS_IOOPS "xfs_io_operations" /* I/O subsystem */
+#define XFS_DM_MODULE "xfs_dmapi"
+#define XFS_QM_MODULE "xfs_quota"
+#define XFS_IO_MODULE "xfs_ioops"
+
typedef struct bhv_module_vfsops {
struct bhv_vfsops bhv_common;
void * bhv_custom;
} bhv_module_vfsops_t;
+typedef struct bhv_module {
+ bhv_desc_t bm_desc;
+ const char * bm_name;
+ bhv_module_vfsops_t * bm_ops;
+} bhv_module_t;
+
#define vfs_bhv_lookup(v, id) (bhv_lookup_range(&(v)->vfs_bh, (id), (id)))
#define vfs_bhv_custom(b) (((bhv_module_vfsops_t*)BHV_OPS(b))->bhv_custom)
#define vfs_bhv_set_custom(b,o) ((b)->bhv_custom = (void *)(o))
@@ -208,8 +226,9 @@
extern void vfs_deallocate(bhv_vfs_t *);
extern void vfs_insertbhv(bhv_vfs_t *, bhv_desc_t *, bhv_vfsops_t *, void *);
-extern void vfs_insertops(bhv_vfs_t *, bhv_module_vfsops_t *);
-
+extern void bhv_module_init(const char *, struct module *, const void *);
+extern void bhv_module_exit(const char *);
+extern void bhv_get_vfsops(struct bhv_vfs *, const char *, const char *);
extern void bhv_insert_all_vfsops(struct bhv_vfs *);
extern void bhv_remove_all_vfsops(struct bhv_vfs *, int);
extern void bhv_remove_vfsops(struct bhv_vfs *, int);