X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Flprocfs_status.h;h=fb6bbfab551f888e65ac4d1e22ba8114a0b30d57;hp=b3eb9d612eb19ebfe717d7c950291329b8755c4f;hb=8c613142f138f809df6b525d134751b3d846ff8e;hpb=17cc912fd5b40965d14a89a268cbf2d63b2fe21b diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index b3eb9d6..fb6bbfa 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -355,7 +356,7 @@ enum lprocfs_extra_opc { #define EXTRA_FIRST_OPC LDLM_GLIMPSE_ENQUEUE /* class_obd.c */ extern struct proc_dir_entry *proc_lustre_root; - +extern struct dentry *debugfs_lustre_root; extern struct kobject *lustre_kobj; struct obd_device; @@ -503,15 +504,26 @@ lprocfs_nid_stats_clear_seq_write(struct file *file, const char __user *buffer, size_t count, loff_t *off); extern int lprocfs_nid_stats_clear_seq_show(struct seq_file *file, void *data); #endif +extern int ldebugfs_register_stats(struct dentry *parent, const char *name, + struct lprocfs_stats *stats); extern int lprocfs_register_stats(struct proc_dir_entry *root, const char *name, struct lprocfs_stats *stats); /* lprocfs_status.c */ +extern int ldebugfs_add_vars(struct dentry *parent, struct lprocfs_vars *var, + void *data); extern int lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *var, void *data); + +extern struct dentry *ldebugfs_register(const char *name, + struct dentry *parent, + struct lprocfs_vars *list, + void *data); extern struct proc_dir_entry * lprocfs_register(const char *name, struct proc_dir_entry *parent, struct lprocfs_vars *list, void *data); + +extern void ldebugfs_remove(struct dentry **entryp); extern void lprocfs_remove(struct proc_dir_entry **root); extern void lprocfs_remove_proc_entry(const char *name, struct proc_dir_entry *parent); @@ -542,6 +554,11 @@ extern int lprocfs_obd_cleanup(struct obd_device *obd); #ifdef HAVE_SERVER_SUPPORT extern const struct file_operations lprocfs_evict_client_fops; #endif + +extern int ldebugfs_seq_create(struct dentry *parent, const char *name, + umode_t mode, + const struct file_operations *seq_fops, + void *data); extern int lprocfs_seq_create(struct proc_dir_entry *parent, const char *name, mode_t mode, const struct file_operations *seq_fops, @@ -664,7 +681,8 @@ static int name##_single_open(struct inode *inode, struct file *file) \ if (rc < 0) \ return rc; \ \ - return single_open(file, name##_seq_show, PDE_DATA(inode)); \ + return single_open(file, name##_seq_show, \ + inode->i_private ? : PDE_DATA(inode)); \ } \ static const struct file_operations name##_fops = { \ .owner = THIS_MODULE, \ @@ -709,7 +727,8 @@ static const struct file_operations name##_fops = { \ } \ static int name##_##type##_open(struct inode *inode, struct file *file)\ { \ - return single_open(file, NULL, PDE_DATA(inode)); \ + return single_open(file, NULL, \ + inode->i_private ? : PDE_DATA(inode));\ } \ static const struct file_operations name##_##type##_fops = { \ .open = name##_##type##_open, \