typedef void (*cntr_init_callback)(struct lprocfs_stats *stats);
struct obd_job_stats {
- cfs_hash_t *ojs_hash;
- cfs_list_t ojs_list;
- rwlock_t ojs_lock; /* protect the obj_list */
- cntr_init_callback ojs_cntr_init_fn;
- int ojs_cntr_num;
- int ojs_cleanup_interval;
- time_t ojs_last_cleanup;
+ cfs_hash_t *ojs_hash;
+ struct list_head ojs_list;
+ rwlock_t ojs_lock; /* protect the obj_list */
+ cntr_init_callback ojs_cntr_init_fn;
+ int ojs_cntr_num;
+ int ojs_cleanup_interval;
+ time_t ojs_last_cleanup;
};
#ifdef LPROCFS
#ifdef HAVE_SERVER_SUPPORT
extern int lprocfs_exp_setup(struct obd_export *exp,
lnet_nid_t *peer_nid, int *newnid);
-#endif
extern int lprocfs_exp_cleanup(struct obd_export *exp);
-extern cfs_proc_dir_entry_t *lprocfs_add_simple(struct proc_dir_entry *root,
- char *name,
+#else
+static inline int lprocfs_exp_cleanup(struct obd_export *exp)
+{ return 0; }
+#endif
+extern struct proc_dir_entry *
+lprocfs_add_simple(struct proc_dir_entry *root, char *name,
#ifndef HAVE_ONLY_PROCFS_SEQ
- read_proc_t *read_proc,
- write_proc_t *write_proc,
+ read_proc_t *read_proc, write_proc_t *write_proc,
#endif
- void *data,
- struct file_operations *fops);
+ void *data, const struct file_operations *fops);
extern struct proc_dir_entry *
lprocfs_add_symlink(const char *name, struct proc_dir_entry *parent,
const char *format, ...);
extern int lprocfs_seq_obd_setup(struct obd_device *dev);
extern int lprocfs_obd_cleanup(struct obd_device *obd);
#ifdef HAVE_SERVER_SUPPORT
-extern struct file_operations lprocfs_evict_client_fops;
+extern const struct file_operations lprocfs_evict_client_fops;
#endif
-extern int lprocfs_seq_create(cfs_proc_dir_entry_t *parent, const char *name,
+extern int lprocfs_seq_create(struct proc_dir_entry *parent, const char *name,
mode_t mode,
const struct file_operations *seq_fops,
void *data);
size_t count, loff_t *off);
#ifndef HAVE_ONLY_PROCFS_SEQ
#ifdef HAVE_SERVER_SUPPORT
+extern ssize_t lprocfs_fops_read(struct file *f, char __user *buf,
+ size_t size, loff_t *ppos);
+extern ssize_t lprocfs_fops_write(struct file *f, const char __user *buf,
+ size_t size, loff_t *ppos);
extern int lprocfs_wr_evict_client(struct file *file, const char *buffer,
unsigned long count, void *data);
#endif
#endif
static inline int lprocfs_exp_cleanup(struct obd_export *exp)
{ return 0; }
-static inline cfs_proc_dir_entry_t *
+static inline struct proc_dir_entry *
lprocfs_add_simple(struct proc_dir_entry *root, char *name,
#ifndef HAVE_ONLY_PROCFS_SEQ
read_proc_t *read_proc, write_proc_t *write_proc,
#endif
- void *data, struct file_operations *fops)
+ void *data, const struct file_operations *fops)
{return 0; }
static inline struct proc_dir_entry *
lprocfs_add_symlink(const char *name, struct proc_dir_entry *parent,