* 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/
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;
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;
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,
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)