Whamcloud - gitweb
b=16893,18503
[fs/lustre-release.git] / lustre / mgs / mgs_internal.h
index c0620a1..8ae2d68 100644 (file)
 
 /* mgs_llog.c */
 int class_dentry_readdir(struct obd_device *obd, struct dentry *dir,
-                         struct vfsmount *inmnt, 
+                         struct vfsmount *inmnt,
                          struct list_head *dentry_list);
+
+#define MGSSELF_NAME    "_mgs"
+
 struct mgs_tgt_srpc_conf {
         struct mgs_tgt_srpc_conf  *mtsc_next;
         char                      *mtsc_tgt;
@@ -82,11 +84,15 @@ struct fs_db {
         /* in-memory copy of the srpc rules, guarded by fsdb_sem */
         struct sptlrpc_rule_set   fsdb_srpc_gen;
         struct mgs_tgt_srpc_conf *fsdb_srpc_tgt;
-        unsigned int              fsdb_srpc_fl_udesc:1;
+        unsigned int              fsdb_fl_udesc:1,
+                                  fsdb_fl_mgsself:1;
 };
 
 int mgs_init_fsdb_list(struct obd_device *obd);
 int mgs_cleanup_fsdb_list(struct obd_device *obd);
+int mgs_find_or_make_fsdb(struct obd_device *obd, char *name, 
+                          struct fs_db **dbh);
+int mgs_get_fsdb_srpc_from_llog(struct obd_device *obd, struct fs_db *fsdb);
 int mgs_check_index(struct obd_device *obd, struct mgs_target_info *mti);
 int mgs_check_failnid(struct obd_device *obd, struct mgs_target_info *mti);
 int mgs_write_log_target(struct obd_device *obd, struct mgs_target_info *mti);
@@ -95,7 +101,13 @@ int mgs_erase_log(struct obd_device *obd, char *name);
 int mgs_erase_logs(struct obd_device *obd, char *fsname);
 int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname);
 
+int mgs_pool_cmd(struct obd_device *obd, enum lcfg_command_type cmd,
+                 char *poolname, char *fsname, char *ostname);
+
 /* mgs_fs.c */
+int mgs_client_add(struct obd_device *obd, struct obd_export *exp,
+                   void *localdata);
+int mgs_client_free(struct obd_export *exp);
 int mgs_fs_setup(struct obd_device *obd, struct vfsmount *mnt);
 int mgs_fs_cleanup(struct obd_device *obddev);
 
@@ -107,7 +119,7 @@ int lproc_mgs_add_live(struct obd_device *obd, struct fs_db *fsdb);
 int lproc_mgs_del_live(struct obd_device *obd, struct fs_db *fsdb);
 void lprocfs_mgs_init_vars(struct lprocfs_static_vars *lvars);
 #else
-static inline int lproc_mgs_setup(struct obd_device *dev) 
+static inline int lproc_mgs_setup(struct obd_device *dev)
 {return 0;}
 static inline int lproc_mgs_cleanup(struct obd_device *obd)
 {return 0;}