Whamcloud - gitweb
Need to replace the nfs-utils-lustre that was installed with CMD2.
[fs/lustre-release.git] / lustre / include / linux / lprocfs_status.h
index 2712136..2e61e82 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/proc_fs.h>
 #include <linux/version.h>
 #include <linux/smp.h>
-#include <linux/kp30.h>
+#include <libcfs/kp30.h>
 
 # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
 #  include <linux/statfs.h>
@@ -173,35 +173,39 @@ static inline void lprocfs_counter_incr(struct lprocfs_stats *stats, int idx)
 
 extern struct lprocfs_stats *lprocfs_alloc_stats(unsigned int num);
 extern void lprocfs_free_stats(struct lprocfs_stats *stats);
-extern int lprocfs_alloc_obd_stats(struct obd_device *obddev,
-                                   unsigned int num_private_stats);
 extern void lprocfs_counter_init(struct lprocfs_stats *stats, int index,
                                  unsigned conf, const char *name,
                                  const char *units);
+extern int lprocfs_alloc_obd_stats(struct obd_device *obddev,
+                                   unsigned int num_private_stats);
 extern void lprocfs_free_obd_stats(struct obd_device *obddev);
-extern int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
+extern int lprocfs_alloc_md_stats(struct obd_device *obddev,
+                                  unsigned int num_private_stats);
+extern void lprocfs_free_md_stats(struct obd_device *obddev);
+extern int lprocfs_register_stats(struct proc_dir_entry *root, 
+                                 const char *name,
                                   struct lprocfs_stats *stats);
 
-#define LPROCFS_INIT_MULTI_VARS(array, size)                              \
-void lprocfs_init_multi_vars(unsigned int idx,                            \
-                             struct lprocfs_static_vars *x)               \
-{                                                                         \
-   struct lprocfs_static_vars *glob = (struct lprocfs_static_vars*)array; \
-   LASSERT(glob != 0);                                                    \
-   LASSERT(idx < (unsigned int)(size));                                   \
-   x->module_vars = glob[idx].module_vars;                                \
-   x->obd_vars = glob[idx].obd_vars;                                      \
-}                                                                         \
-
-#define LPROCFS_INIT_VARS(name, vclass, vinstance)           \
-void lprocfs_##name##_init_vars(struct lprocfs_static_vars *x)  \
-{                                                      \
-        x->module_vars = vclass;                       \
-        x->obd_vars = vinstance;                       \
-}                                                      \
-
-#define lprocfs_init_vars(NAME, VAR)     \
-do {      \
+#define LPROCFS_INIT_MULTI_VARS(array, size)                                   \
+void lprocfs_init_multi_vars(unsigned int idx,                                 \
+                             struct lprocfs_static_vars *x)                    \
+{                                                                              \
+       struct lprocfs_static_vars *glob = (struct lprocfs_static_vars*)array; \
+       LASSERT(glob != 0);                                                    \
+       LASSERT(idx < (unsigned int)(size));                                   \
+       x->module_vars = glob[idx].module_vars;                                \
+       x->obd_vars = glob[idx].obd_vars;                                      \
+}                                                                              \
+
+#define LPROCFS_INIT_VARS(name, vclass, vinstance)                            \
+void lprocfs_##name##_init_vars(struct lprocfs_static_vars *x)                \
+{                                                                                     \
+        x->module_vars = vclass;                                                      \
+        x->obd_vars = vinstance;                                                      \
+}                                                                                     \
+
+#define lprocfs_init_vars(NAME, VAR)                                          \
+do {                                                                          \
         extern void lprocfs_##NAME##_init_vars(struct lprocfs_static_vars *);  \
         lprocfs_##NAME##_init_vars(VAR);                                       \
 } while (0)
@@ -273,11 +277,22 @@ void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value);
 void lprocfs_oh_clear(struct obd_histogram *oh);
 unsigned long lprocfs_oh_sum(struct obd_histogram *oh);
 
+struct obd_service_time;
+void lprocfs_stime_record(struct obd_service_time *stime,
+                          struct timeval *large, struct timeval *small);
+unsigned long lprocfs_stime_avg_ms(struct obd_service_time *stime);
+unsigned long lprocfs_stime_avg_us(struct obd_service_time *stime);
+
 /* lprocfs_status.c: counter read/write functions */
 extern int lprocfs_counter_read(char *page, char **start, off_t off,
                                 int count, int *eof, void *data);
 extern int lprocfs_counter_write(struct file *file, const char *buffer,
                                  unsigned long count, void *data);
+
+/* lprocfs_status.c: recovery status */
+int lprocfs_obd_rd_recovery_status(char *page, char **start, off_t off,
+                                   int count, int *eof, void *data);
+
 #else
 /* LPROCFS is not defined */
 static inline void lprocfs_counter_add(struct lprocfs_stats *stats,
@@ -288,6 +303,11 @@ static inline void lprocfs_counter_init(struct lprocfs_stats *stats,
                                         int index, unsigned conf,
                                         const char *name, const char *units)
 { return; }
+struct obd_service_time;
+static inline void lprocfs_stime_record(struct obd_service_time *stime,
+                          struct timeval *large, struct timeval *small)
+{ return; }
+
 
 static inline struct lprocfs_stats* lprocfs_alloc_stats(unsigned int num)
 { return NULL; }