Whamcloud - gitweb
LU-2743 mgs: Add a missing rc reset
[fs/lustre-release.git] / lustre / mgs / mgs_internal.h
index 89a9261..73e4eef 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -148,7 +148,7 @@ struct fs_db {
        struct completion       fsdb_notify_comp;
         cfs_time_t           fsdb_notify_start;
         cfs_atomic_t         fsdb_notify_phase;
-        volatile int         fsdb_notify_async:1,
+       volatile unsigned int fsdb_notify_async:1,
                              fsdb_notify_stop:1;
         /* statistic data */
         unsigned int         fsdb_notify_total;
@@ -166,6 +166,8 @@ struct mgs_device {
        cfs_list_t                       mgs_fs_db_list;
        spinlock_t                       mgs_lock; /* covers mgs_fs_db_list */
        cfs_proc_dir_entry_t            *mgs_proc_live;
+       cfs_proc_dir_entry_t            *mgs_proc_osd;
+       cfs_proc_dir_entry_t            *mgs_proc_fstype;
        cfs_proc_dir_entry_t            *mgs_proc_mntdev;
        cfs_time_t                       mgs_start_time;
        struct obd_device               *mgs_obd;
@@ -190,7 +192,8 @@ int mgs_get_fsdb_srpc_from_llog(const struct lu_env *env, struct mgs_device *mgs
 int mgs_check_index(const struct lu_env *env, struct mgs_device *mgs, struct mgs_target_info *mti);
 int mgs_check_failnid(const struct lu_env *env, struct mgs_device *mgs, struct mgs_target_info *mti);
 int mgs_write_log_target(const struct lu_env *env, struct mgs_device *mgs, struct mgs_target_info *mti,
-                         struct fs_db *fsdb);
+                        struct fs_db *fsdb);
+int mgs_replace_nids(const struct lu_env *env, struct mgs_device *mgs, char *devname, char *nids);
 int mgs_erase_log(const struct lu_env *env, struct mgs_device *mgs,
                  char *name);
 int mgs_erase_logs(const struct lu_env *env, struct mgs_device *mgs,
@@ -236,18 +239,17 @@ int mgs_client_free(struct obd_export *exp);
 int mgs_fs_setup(const struct lu_env *env, struct mgs_device *m);
 int mgs_fs_cleanup(const struct lu_env *env, struct mgs_device *m);
 
-#define strsuf(buf, suffix) (strcmp((buf)+strlen(buf)-strlen(suffix), (suffix)))
 #ifdef LPROCFS
-int lproc_mgs_setup(struct mgs_device *mgs, char *osd_name);
-int lproc_mgs_cleanup(struct mgs_device *mgs);
+int lproc_mgs_setup(struct mgs_device *mgs, const char *osd_name);
+void lproc_mgs_cleanup(struct mgs_device *mgs);
 int lproc_mgs_add_live(struct mgs_device *mgs, struct fs_db *fsdb);
 int lproc_mgs_del_live(struct mgs_device *mgs, struct fs_db *fsdb);
 void lprocfs_mgs_init_vars(struct lprocfs_static_vars *lvars);
 #else
-static inline int lproc_mgs_setup(struct mgs_device *mgs)
-{return 0;}
-static inline int lproc_mgs_cleanup(struct mgs_device *mgs)
+static inline int lproc_mgs_setup(struct mgs_device *mgs, const char *osd_name)
 {return 0;}
+static inline void lproc_mgs_cleanup(struct mgs_device *mgs)
+{}
 static inline int lproc_mgs_add_live(struct mgs_device *mgs, struct fs_db *fsdb)
 {return 0;}
 static inline int lproc_mgs_del_live(struct mgs_device *mgs, struct fs_db *fsdb)