OPC_RANGE(LDLM) +
OPC_RANGE(MDS) +
OPC_RANGE(OST));
- } else if (opc < UPDATE_LAST_OPC) {
+ } else if (opc < OUT_UPDATE_LAST_OPC) {
/* update opcode */
- return (opc - UPDATE_FIRST_OPC +
+ return (opc - OUT_UPDATE_FIRST_OPC +
+ OPC_RANGE(FLD) +
+ OPC_RANGE(SEC) +
+ OPC_RANGE(SEQ) +
+ OPC_RANGE(QUOTA) +
+ OPC_RANGE(LLOG) +
+ OPC_RANGE(OBD) +
+ OPC_RANGE(MGS) +
+ OPC_RANGE(LDLM) +
+ OPC_RANGE(MDS) +
+ OPC_RANGE(OST));
+ } else if (opc < LFSCK_LAST_OPC) {
+ /* LFSCK opcode */
+ return (opc - LFSCK_FIRST_OPC +
+ OPC_RANGE(OUT_UPDATE) +
OPC_RANGE(FLD) +
OPC_RANGE(SEC) +
OPC_RANGE(SEQ) +
OPC_RANGE(MDS) +
OPC_RANGE(OST));
} else {
- /* Unknown Opcode */
- return -1;
- }
+ /* Unknown Opcode */
+ return -1;
+ }
}
OPC_RANGE(SEQ) + \
OPC_RANGE(SEC) + \
OPC_RANGE(FLD) + \
- OPC_RANGE(UPDATE))
+ OPC_RANGE(OUT_UPDATE) + \
+ OPC_RANGE(LFSCK))
#define EXTRA_MAX_OPCODES ((PTLRPC_LAST_CNTR - PTLRPC_FIRST_CNTR) + \
OPC_RANGE(EXTRA))
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
lprocfs_obd_max_pages_per_rpc_seq_write(struct file *file, const char *buffer,
size_t count, loff_t *off);
+struct root_squash_info;
+int lprocfs_wr_root_squash(const char *buffer, unsigned long count,
+ struct root_squash_info *squash, char *name);
+int lprocfs_wr_nosquash_nids(const char *buffer, unsigned long count,
+ struct root_squash_info *squash, char *name);
+
/* all quota proc functions */
extern int lprocfs_quota_rd_bunit(char *page, char **start,
off_t off, int count,
#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,
struct lprocfs_seq_vars *var,
void *data)
{ return 0; }
-#ifndef HAVE_ONLY_PROCFS_SEQ
static inline cfs_proc_dir_entry_t *
lprocfs_seq_register(const char *name, cfs_proc_dir_entry_t *parent,
- struct lprocfs_vars *list, void *data)
+ struct lprocfs_seq_vars *list, void *data)
{ return NULL; }
-#endif
static inline void lprocfs_remove(cfs_proc_dir_entry_t **root)
{ return; }
static inline void lprocfs_remove_proc_entry(const char *name,