X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fmgs%2Fmgs_internal.h;h=f62cb298ed1ed891422d718cc74aaf13293d66f5;hb=0885d0e1c86560bdafabf6277646ba4942a322a4;hp=d5d18bddf0d9af7f96742daf6f65400ee3d68cbd;hpb=665e36b780faa2144cecccd29a0d8a8196a76903;p=fs%2Flustre-release.git diff --git a/lustre/mgs/mgs_internal.h b/lustre/mgs/mgs_internal.h index d5d18bd..f62cb29 100644 --- a/lustre/mgs/mgs_internal.h +++ b/lustre/mgs/mgs_internal.h @@ -49,9 +49,11 @@ /* mgs_llog.c */ int class_dentry_readdir(struct obd_device *obd, struct dentry *dir, - struct vfsmount *inmnt, - struct list_head *dentry_list); - + struct vfsmount *inmnt, + cfs_list_t *dentry_list); + +#define MGSSELF_NAME "_mgs" + struct mgs_tgt_srpc_conf { struct mgs_tgt_srpc_conf *mtsc_next; char *mtsc_tgt; @@ -65,16 +67,16 @@ struct mgs_tgt_srpc_conf { struct fs_db { char fsdb_name[9]; - struct list_head fsdb_list; /* list of databases */ - struct semaphore fsdb_sem; + cfs_list_t fsdb_list; /* list of databases */ + cfs_semaphore_t fsdb_sem; void *fsdb_ost_index_map; /* bitmap of used indicies */ void *fsdb_mdt_index_map; /* bitmap of used indicies */ /* COMPAT_146 these items must be recorded out of the old client log */ - char *fsdb_clilov; /* COMPAT_146 client lov name */ + char *fsdb_clilov; /* COMPAT_146 client lov name */ char *fsdb_clilmv; - char *fsdb_mdtlov; /* COMPAT_146 mds lov name */ + char *fsdb_mdtlov; /* COMPAT_146 mds lov name */ char *fsdb_mdtlmv; - char *fsdb_mdc; /* COMPAT_146 mdc name */ + char *fsdb_mdc; /* COMPAT_146 mdc name */ /* end COMPAT_146 */ __u32 fsdb_flags; __u32 fsdb_gen; @@ -82,11 +84,16 @@ 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, + fsdb_fl_oscname_18: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); @@ -99,6 +106,9 @@ 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); @@ -110,7 +120,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;}