Whamcloud - gitweb
minor fix for build error
[fs/lustre-release.git] / lustre / smfs / smfs_internal.h
index 7efefbd..fa8dcd0 100644 (file)
@@ -123,16 +123,14 @@ struct smfs_hook_ops *smfs_alloc_hook_ops(char *name,
                                           smfs_hook_func post_hook);
 
 void smfs_free_hook_ops(struct smfs_hook_ops *hops);
-int smfs_register_hook_ops(struct super_block *sb, 
+int smfs_register_hook_ops(struct smfs_super_info *smb, 
                            struct smfs_hook_ops *smh_ops);
 
-struct smfs_hook_ops *smfs_unregister_hook_ops(struct super_block *sb, 
+struct smfs_hook_ops *smfs_unregister_hook_ops(struct smfs_super_info *smb, 
                                                char *name);
-/*super.c*/
-extern int init_smfs(void);
-extern int cleanup_smfs(void);
-extern void smfs_put_super(struct super_block *sb);
-extern struct super_block *smfs_get_sb_by_path(char *path, int len);
+/*smfs_lib.c*/
+void smfs_put_super(struct super_block *sb);
+int smfs_fill_super(struct super_block *sb, void *data, int silent);
 /*sysctl.c*/
 extern int sm_debug_level;
 extern int sm_inodes;
@@ -159,7 +157,14 @@ extern int smfs_release(struct inode * inode, struct file * filp);
 /*inode.c*/
 struct inode *smfs_get_inode(struct super_block *sb, ino_t hash, 
                              struct inode *dir, int index);
+
 extern struct super_operations smfs_super_ops;
+
+struct smfs_iget_args {
+        struct inode *s_inode;
+        int           s_index;
+        int           s_ino;
+};
 /*symlink.c*/
 extern struct inode_operations smfs_sym_iops;
 extern struct file_operations smfs_sym_fops;
@@ -177,19 +182,21 @@ extern int smfs_post_rec_setattr(struct inode *dir, struct dentry *dentry,
 extern int smfs_post_rec_create(struct inode *dir, struct dentry *dentry,
                                 void   *data1, void   *data2);
 /*kml.c*/
-extern int smfs_kml_init(struct super_block *sb);
-extern int smfs_do_rec(struct inode *inode);
-extern int smfs_rec_cleanup(struct super_block *sb);
-extern int smfs_rec_init(struct super_block *sb);
+int smfs_do_rec(struct inode *inode);
+int smfs_rec_cleanup(struct smfs_super_info *sb);
+int smfs_rec_init(struct super_block *sb);
+
 extern int smfs_rec_unpack(struct smfs_proc_args *args, char *record,
                            char **pbuf, int *opcode);
 extern int smfs_process_rec(struct super_block *sb, int count,
                             char *dir, int flags);
 extern smfs_pack_rec_func smfs_get_rec_pack_type(struct super_block *sb);
 
-extern int ost_rec_pack_init(struct super_block *sb);
+
+/*mds_kml.c*/
+int mds_rec_pack_init(struct super_block *sb);
 /*ost_kml.c*/
-extern int mds_rec_pack_init(struct super_block *sb);
+int ost_rec_pack_init(struct super_block *sb);
 
 /*smfs_llog.c*/
 extern int smfs_llog_setup(struct super_block *sb, struct vfsmount *mnt);
@@ -223,10 +230,10 @@ extern int cache_space_post(int op, void *handle, struct inode *old_dir,
                             struct dentry *old_dentry, struct inode *new_dir,
                             struct dentry *new_dentry);
 
-extern int cache_space_hook_setup(struct super_block *);
-extern int cache_space_hook_cleanup(void);
-extern int cache_space_hook_init(struct super_block *);
-extern int cache_space_hook_exit(struct super_block *);
+int cache_space_hook_setup(struct super_block *);
+int cache_space_hook_cleanup(void);
+int cache_space_hook_init(struct super_block *sb);
+int cache_space_hook_exit(struct smfs_super_info *smfs_info);
 
 #define XATTR_SMFS_HOARD_MARK           "hoard"
 #define XATTR_SMFS_CACHE_LOGCOOKIE      "cache"
@@ -315,11 +322,20 @@ do {                                                                           \
                 GOTO(label, rc);                                               \
 } while(0)                                                                     \
 
+#define SMFS_GET_INODE(sb, cache_inode, dir, inode, rc, label)          \
+do {                                                                    \
+        LASSERT(cache_inode);                                           \
+        inode = smfs_get_inode(sb, cache_inode->i_ino, dir, 0);         \
+        iput(cache_inode);                                              \
+        if (!inode)                                                     \
+                GOTO(label, rc = -ENOENT);                              \
+} while(0)        
+
+
 #if CONFIG_SNAPFS
-extern int smfs_cow_init(struct super_block *sb);
-extern int smfs_cow_cleanup(struct super_block *sb);
-extern int smfs_init_snap_inode_info(struct inode *inode, 
-                                     struct snap_inode_info *sn_info); 
+int smfs_cow_init(struct super_block *sb);
+int smfs_cow_cleanup(struct smfs_super_info *smb);
+int smfs_snap_test_inode(struct inode *inode, void *args);
 #else
 #define SMFS_PRE_COW(dir, dentry, new_dir, new_dentry, op, name, rc, label)                 
 #endif