extern void lprocfs_##NAME##_init_vars(struct lprocfs_static_vars *); \
lprocfs_##NAME##_init_vars(VAR); \
} while (0)
+
extern void lprocfs_init_multi_vars(unsigned int idx,
struct lprocfs_static_vars *var);
/* lprocfs_status.c */
extern struct proc_dir_entry *lprocfs_srch(struct proc_dir_entry *root,
const char *name);
-extern int lprocfs_obd_attach(struct obd_device *dev, struct lprocfs_vars *list);
-extern int lprocfs_obd_detach(struct obd_device *dev);
+extern int lprocfs_obd_attach(struct obd_device *obd, struct lprocfs_vars *list);
+extern int lprocfs_obd_detach(struct obd_device *obd);
/* Generic callbacks */
int count, int *eof, void *data);
extern int lprocfs_rd_conn_uuid(char *page, char **start, off_t off,
int count, int *eof, void *data);
+extern int lprocfs_rd_num_exports(char *page, char **start, off_t off,
+ int count, int *eof, void *data);
extern int lprocfs_rd_numrefs(char *page, char **start, off_t off,
int count, int *eof, void *data);
int count, int *eof, void *data);
extern int lprocfs_rd_kbytesfree(char *page, char **start, off_t off,
int count, int *eof, void *data);
+extern int lprocfs_rd_kbytesavail(char *page, char **start, off_t off,
+ int count, int *eof, void *data);
extern int lprocfs_rd_filestotal(char *page, char **start, off_t off,
int count, int *eof, void *data);
extern int lprocfs_rd_filesfree(char *page, char **start, off_t off,
extern int lprocfs_rd_filegroups(char *page, char **start, off_t off,
int count, int *eof, void *data);
-extern int lprocfs_write_helper(const char *buffer, unsigned long count,
+extern int lprocfs_write_helper(const char *buffer, unsigned long count,
int *val);
+extern int lprocfs_write_u64_helper(const char *buffer, unsigned long count,
+ __u64 *val);
+int lprocfs_obd_seq_create(struct obd_device *dev, char *name, mode_t mode,
+ struct file_operations *seq_fops, void *data);
+struct obd_histogram;
+void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value);
+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,
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; }
static inline int lprocfs_rd_name(char *page, char **start, off_t off,
int count, int *eof, void *data) { return 0; }
static inline int lprocfs_rd_server_uuid(char *page, char **start, off_t off,
- int count, int *eof, void *data) { return 0; }
+ int count, int *eof, void *data)
+{ return 0; }
static inline int lprocfs_rd_conn_uuid(char *page, char **start, off_t off,
- int count, int *eof, void *data) { return 0; }
+ int count, int *eof, void *data)
+{ return 0; }
+static inline int lprocfs_rd_num_exports(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{ return 0; }
static inline int lprocfs_rd_numrefs(char *page, char **start, off_t off,
int count, int *eof, void *data) { return 0; }
int lprocfs_rd_kbytesfree(char *page, char **start, off_t off,
int count, int *eof, void *data) { return 0; }
static inline
+int lprocfs_rd_kbytesavail(char *page, char **start, off_t off,
+ int count, int *eof, void *data) { return 0; }
+static inline
int lprocfs_rd_filestotal(char *page, char **start, off_t off,
int count, int *eof, void *data) { return 0; }
static inline