Linux 5.6 introduces proc_ops with v5.5-8862-gd56c0d45f0e2
proc: decouple proc from VFS with "struct proc_ops"
Separate debugfs usage and procfs usage to prepare for the divergence
of debugfs using file_operations and procfs using proc_ops
HPE-bug-id: LUS-8589
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I1746e563b55a9e89f90ac01843c304fe6b690d8b
Reviewed-on: https://review.whamcloud.com/37834
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
29 files changed:
extern struct lu_context_key seq_thread_key;
extern struct lu_context_key seq_thread_key;
-extern struct lprocfs_vars seq_server_debugfs_list[];
+extern struct ldebugfs_vars seq_server_debugfs_list[];
/* Store API functions. */
struct dt_device;
/* Store API functions. */
struct dt_device;
extern struct dentry *seq_debugfs_dir;
extern struct dentry *seq_debugfs_dir;
-extern struct lprocfs_vars seq_client_debugfs_list[];
+extern struct ldebugfs_vars seq_client_debugfs_list[];
extern const struct file_operations seq_fld_debugfs_seq_fops;
extern const struct file_operations seq_fld_debugfs_seq_fops;
LDEBUGFS_SEQ_FOPS(ldebugfs_server_fid_width);
LDEBUGFS_SEQ_FOPS_RO(ldebugfs_server_fid_server);
LDEBUGFS_SEQ_FOPS(ldebugfs_server_fid_width);
LDEBUGFS_SEQ_FOPS_RO(ldebugfs_server_fid_server);
-struct lprocfs_vars seq_server_debugfs_list[] = {
+struct ldebugfs_vars seq_server_debugfs_list[] = {
{ .name = "space",
.fops = &ldebugfs_server_fid_space_fops },
{ .name = "width",
{ .name = "space",
.fops = &ldebugfs_server_fid_space_fops },
{ .name = "width",
LDEBUGFS_SEQ_FOPS_RO(ldebugfs_client_fid_server);
LDEBUGFS_SEQ_FOPS_RO(ldebugfs_client_fid_fid);
LDEBUGFS_SEQ_FOPS_RO(ldebugfs_client_fid_server);
LDEBUGFS_SEQ_FOPS_RO(ldebugfs_client_fid_fid);
-struct lprocfs_vars seq_client_debugfs_list[] = {
+struct ldebugfs_vars seq_client_debugfs_list[] = {
{ .name = "space",
.fops = &ldebugfs_client_fid_space_fops },
{ .name = "width",
{ .name = "space",
.fops = &ldebugfs_client_fid_space_fops },
{ .name = "width",
struct lu_seq_range *range, __u32 fld_op,
struct ptlrpc_request **reqp);
struct lu_seq_range *range, __u32 fld_op,
struct ptlrpc_request **reqp);
-extern struct lprocfs_vars fld_client_debugfs_list[];
+extern struct ldebugfs_vars fld_client_debugfs_list[];
struct fld_cache *fld_cache_init(const char *name,
int cache_size, int cache_threshold);
struct fld_cache *fld_cache_init(const char *name,
int cache_size, int cache_threshold);
LDEBUGFS_SEQ_FOPS(fld_debugfs_hash);
LDEBUGFS_FOPS_WR_ONLY(fld, cache_flush);
LDEBUGFS_SEQ_FOPS(fld_debugfs_hash);
LDEBUGFS_FOPS_WR_ONLY(fld, cache_flush);
-struct lprocfs_vars fld_client_debugfs_list[] = {
+struct ldebugfs_vars fld_client_debugfs_list[] = {
{ .name = "targets",
.fops = &fld_debugfs_targets_fops },
{ .name = "hash",
{ .name = "targets",
.fops = &fld_debugfs_targets_fops },
{ .name = "hash",
int dt_global_init(void);
void dt_global_fini(void);
int dt_tunables_init(struct dt_device *dt, struct obd_type *type,
int dt_global_init(void);
void dt_global_fini(void);
int dt_tunables_init(struct dt_device *dt, struct obd_type *type,
- const char *name, struct lprocfs_vars *list);
+ const char *name, struct ldebugfs_vars *list);
int dt_tunables_fini(struct dt_device *dt);
# ifdef CONFIG_PROC_FS
int dt_tunables_fini(struct dt_device *dt);
# ifdef CONFIG_PROC_FS
#include <libcfs/libcfs.h>
#include <uapi/linux/lustre/lustre_idl.h>
#include <libcfs/libcfs.h>
#include <uapi/linux/lustre/lustre_idl.h>
+/*
+ * Liuux 5.6 introduces proc_ops with v5.5-8862-gd56c0d45f0e2
+ * Now that proc and debugfs use separate operation vector types
+ * separate containers are also needed.
+ */
struct lprocfs_vars {
const char *name;
const struct file_operations *fops;
void *data;
struct lprocfs_vars {
const char *name;
const struct file_operations *fops;
void *data;
- /**
- * /proc file mode.
- */
+ /** /proc file mode. */
+ mode_t proc_mode;
+};
+
+/** Provide a debugfs container */
+struct ldebugfs_vars {
+ const char *name;
+ const struct file_operations *fops;
+ void *data;
+ /** debugfs file mode. */
size_t count, loff_t *off);
extern int lprocfs_nid_stats_clear_seq_show(struct seq_file *file, void *data);
#endif
size_t count, loff_t *off);
extern int lprocfs_nid_stats_clear_seq_show(struct seq_file *file, void *data);
#endif
-extern const struct file_operations lprocfs_stats_seq_fops;
extern int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
extern int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
- struct lprocfs_stats *stats);
+ struct lprocfs_stats *stats);
+extern const struct file_operations ldebugfs_stats_seq_fops;
-extern void ldebugfs_add_vars(struct dentry *parent, struct lprocfs_vars *var,
+extern void ldebugfs_add_vars(struct dentry *parent, struct ldebugfs_vars *var,
+extern struct dentry *ldebugfs_register(const char *name,
+ struct dentry *parent,
+ struct ldebugfs_vars *list,
+ void *data);
extern int lprocfs_add_vars(struct proc_dir_entry *root,
struct lprocfs_vars *var, void *data);
extern int lprocfs_add_vars(struct proc_dir_entry *root,
struct lprocfs_vars *var, void *data);
char *buffer);
extern ssize_t
char *buffer);
extern ssize_t
+ldebugfs_import_seq_write(struct file *file, const char __user *buffer,
+ size_t count, loff_t *off);
+static inline ssize_t
lprocfs_import_seq_write(struct file *file, const char __user *buffer,
lprocfs_import_seq_write(struct file *file, const char __user *buffer,
- size_t count, loff_t *off);
+ size_t count, loff_t *off)
+{
+ return ldebugfs_import_seq_write(file, buffer, count, off);
+}
+
extern int lprocfs_pinger_recov_seq_show(struct seq_file *m, void *data);
extern ssize_t
lprocfs_pinger_recov_seq_write(struct file *file, const char __user *buffer,
extern int lprocfs_pinger_recov_seq_show(struct seq_file *m, void *data);
extern ssize_t
lprocfs_pinger_recov_seq_write(struct file *file, const char __user *buffer,
size_t count, loff_t *off)
{ return 0; }
static inline ssize_t
size_t count, loff_t *off)
{ return 0; }
static inline ssize_t
+ldebugfs_import_seq_write(struct file *file, const char __user *buffer,
+ size_t count, loff_t *off)
+{ return 0; }
+static inline ssize_t
lprocfs_import_seq_write(struct file *file, const char __user *buffer,
size_t count, loff_t *off)
{ return 0; }
lprocfs_import_seq_write(struct file *file, const char __user *buffer,
size_t count, loff_t *off)
{ return 0; }
struct lprocfs_stats *obd_svc_stats;
const struct attribute **obd_attrs;
struct lprocfs_vars *obd_vars;
struct lprocfs_stats *obd_svc_stats;
const struct attribute **obd_attrs;
struct lprocfs_vars *obd_vars;
+ struct ldebugfs_vars *obd_debugfs_vars;
atomic_t obd_evict_inprogress;
wait_queue_head_t obd_evict_inprogress_waitq;
struct list_head obd_evict_list; /* protected with pet_lock */
atomic_t obd_evict_inprogress;
wait_queue_head_t obd_evict_inprogress_waitq;
struct list_head obd_evict_list; /* protected with pet_lock */
#endif
int class_register_type(const struct obd_ops *dt_ops,
const struct md_ops *md_ops, bool enable_proc,
#endif
int class_register_type(const struct obd_ops *dt_ops,
const struct md_ops *md_ops, bool enable_proc,
- struct lprocfs_vars *module_vars,
+ struct ldebugfs_vars *module_vars,
const char *nm, struct lu_device_type *ldt);
int class_unregister_type(const char *nm);
const char *nm, struct lu_device_type *ldt);
int class_unregister_type(const char *nm);
struct __##var##__dummy_write {; } /* semicolon catcher */
static inline void
struct __##var##__dummy_write {; } /* semicolon catcher */
static inline void
-ldlm_add_var(struct lprocfs_vars *vars, struct dentry *debugfs_entry,
+ldlm_add_var(struct ldebugfs_vars *vars, struct dentry *debugfs_entry,
const char *name, void *data, const struct file_operations *ops)
{
vars->name = name;
const char *name, void *data, const struct file_operations *ops)
{
vars->name = name;
{
struct ldlm_namespace *ns = ldlm_pl2ns(pl);
struct dentry *debugfs_ns_parent;
{
struct ldlm_namespace *ns = ldlm_pl2ns(pl);
struct dentry *debugfs_ns_parent;
- struct lprocfs_vars pool_vars[2];
+ struct ldebugfs_vars pool_vars[2];
LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
"recalc_timing", "sec");
debugfs_create_file("stats", 0644, pl->pl_debugfs_entry,
LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
"recalc_timing", "sec");
debugfs_create_file("stats", 0644, pl->pl_debugfs_entry,
- pl->pl_stats, &lprocfs_stats_seq_fops);
+ pl->pl_stats, &ldebugfs_stats_seq_fops);
#endif /* HAVE_SERVER_SUPPORT */
#endif /* HAVE_SERVER_SUPPORT */
-static struct lprocfs_vars ldlm_debugfs_list[] = {
+static struct ldebugfs_vars ldlm_debugfs_list[] = {
{ .name = "dump_namespaces",
.fops = &ldlm_dump_ns_fops,
.proc_mode = 0222 },
{ .name = "dump_namespaces",
.fops = &ldlm_dump_ns_fops,
.proc_mode = 0222 },
OBD_FREE(kernbuf, count + 1);
return rc ? rc : count;
}
OBD_FREE(kernbuf, count + 1);
return rc ? rc : count;
}
+LDEBUGFS_SEQ_FOPS(ll_pcc);
-struct lprocfs_vars lprocfs_llite_obd_vars[] = {
+struct ldebugfs_vars lprocfs_llite_obd_vars[] = {
{ .name = "site",
.fops = &ll_site_stats_fops },
{ .name = "max_cached_mb",
{ .name = "site",
.fops = &ll_site_stats_fops },
{ .name = "max_cached_mb",
}
debugfs_create_file("stats", 0644, sbi->ll_debugfs_entry,
}
debugfs_create_file("stats", 0644, sbi->ll_debugfs_entry,
- sbi->ll_stats, &lprocfs_stats_seq_fops);
+ sbi->ll_stats, &ldebugfs_stats_seq_fops);
sbi->ll_ra_stats = lprocfs_alloc_stats(ARRAY_SIZE(ra_stat_string),
LPROCFS_STATS_FLAG_NONE);
sbi->ll_ra_stats = lprocfs_alloc_stats(ARRAY_SIZE(ra_stat_string),
LPROCFS_STATS_FLAG_NONE);
ra_stat_string[id], "pages");
debugfs_create_file("read_ahead_stats", 0644, sbi->ll_debugfs_entry,
ra_stat_string[id], "pages");
debugfs_create_file("read_ahead_stats", 0644, sbi->ll_debugfs_entry,
- sbi->ll_ra_stats, &lprocfs_stats_seq_fops);
+ sbi->ll_ra_stats, &ldebugfs_stats_seq_fops);
out_ll_kset:
/* Yes we also register sysfs mount kset here as well */
out_ll_kset:
/* Yes we also register sysfs mount kset here as well */
*/
int lod_procfs_init(struct lod_device *lod)
{
*/
int lod_procfs_init(struct lod_device *lod)
{
- struct lprocfs_vars ldebugfs_obd_vars[] = { { NULL } };
+ struct ldebugfs_vars ldebugfs_obd_vars[] = { { NULL } };
struct obd_device *obd = lod2obd(lod);
struct obd_type *type;
struct kobject *lov;
struct obd_device *obd = lod2obd(lod);
struct obd_type *type;
struct kobject *lov;
}
LUSTRE_RW_ATTR(append_pool);
}
LUSTRE_RW_ATTR(append_pool);
-static struct lprocfs_vars lprocfs_mdd_obd_vars[] = {
+static struct ldebugfs_vars ldebugfs_mdd_obd_vars[] = {
{ .name = "changelog_mask",
.fops = &mdd_changelog_mask_fops },
{ .name = "changelog_users",
{ .name = "changelog_mask",
.fops = &mdd_changelog_mask_fops },
{ .name = "changelog_users",
return rc;
/* Find the type procroot and add the proc entry for this device */
return rc;
/* Find the type procroot and add the proc entry for this device */
- obd->obd_vars = lprocfs_mdd_obd_vars;
+ obd->obd_debugfs_vars = ldebugfs_mdd_obd_vars;
obd->obd_debugfs_entry = debugfs_create_dir(name,
type->typ_debugfs_entry);
obd->obd_debugfs_entry = debugfs_create_dir(name,
type->typ_debugfs_entry);
- ldebugfs_add_vars(obd->obd_debugfs_entry, obd->obd_vars, mdd);
+ ldebugfs_add_vars(obd->obd_debugfs_entry, obd->obd_debugfs_vars, mdd);
#include <lustre_kernelcomm.h>
#include "mdt_internal.h"
#include <lustre_kernelcomm.h>
#include "mdt_internal.h"
-static struct lprocfs_vars lprocfs_mdt_hsm_vars[];
-
/**
* get obj and HSM attributes on a fid
* \param mti [IN] context
/**
* get obj and HSM attributes on a fid
* \param mti [IN] context
}
LUSTRE_RO_ATTR(remove_count);
}
LUSTRE_RO_ATTR(remove_count);
-static struct lprocfs_vars lprocfs_mdt_hsm_vars[] = {
+static struct ldebugfs_vars ldebugfs_mdt_hsm_vars[] = {
{ .name = "agents",
.fops = &mdt_hsm_agent_fops },
{ .name = "actions",
{ .name = "agents",
.fops = &mdt_hsm_agent_fops },
{ .name = "actions",
/* init debugfs entries, failure is not critical */
cdt->cdt_debugfs_dir = debugfs_create_dir("hsm",
obd->obd_debugfs_entry);
/* init debugfs entries, failure is not critical */
cdt->cdt_debugfs_dir = debugfs_create_dir("hsm",
obd->obd_debugfs_entry);
- ldebugfs_add_vars(cdt->cdt_debugfs_dir, lprocfs_mdt_hsm_vars, mdt);
+ ldebugfs_add_vars(cdt->cdt_debugfs_dir, ldebugfs_mdt_hsm_vars, mdt);
LDEBUGFS_SEQ_FOPS_RO(mgc_ir_state);
LDEBUGFS_SEQ_FOPS_RO(mgc_ir_state);
-struct lprocfs_vars lprocfs_mgc_obd_vars[] = {
+struct ldebugfs_vars ldebugfs_mgc_obd_vars[] = {
{ .name = "connect_flags",
.fops = &mgc_connect_flags_fops },
{ .name = "mgs_server_uuid",
{ .name = "connect_flags",
.fops = &mgc_connect_flags_fops },
{ .name = "mgs_server_uuid",
int rc;
obd->obd_ktype.default_attrs = mgc_attrs;
int rc;
obd->obd_ktype.default_attrs = mgc_attrs;
- obd->obd_vars = lprocfs_mgc_obd_vars;
+ obd->obd_debugfs_vars = ldebugfs_mgc_obd_vars;
rc = lprocfs_obd_setup(obd, true);
if (rc)
return rc;
rc = lprocfs_obd_setup(obd, true);
if (rc)
return rc;
EXPORT_SYMBOL(dt_tunables_fini);
int dt_tunables_init(struct dt_device *dt, struct obd_type *type,
EXPORT_SYMBOL(dt_tunables_fini);
int dt_tunables_init(struct dt_device *dt, struct obd_type *type,
- const char *name, struct lprocfs_vars *list)
+ const char *name, struct ldebugfs_vars *list)
int class_register_type(const struct obd_ops *dt_ops,
const struct md_ops *md_ops,
int class_register_type(const struct obd_ops *dt_ops,
const struct md_ops *md_ops,
- bool enable_proc, struct lprocfs_vars *vars,
+ bool enable_proc, struct ldebugfs_vars *vars,
const char *name, struct lu_device_type *ldt)
{
struct obd_type *type;
const char *name, struct lu_device_type *ldt)
{
struct obd_type *type;
}
EXPORT_SYMBOL(lprocfs_add_symlink);
}
EXPORT_SYMBOL(lprocfs_add_symlink);
-static const struct file_operations lprocfs_generic_fops = { };
+static const struct file_operations ldebugfs_empty_ops = { };
-void ldebugfs_add_vars(struct dentry *parent, struct lprocfs_vars *list,
+void ldebugfs_add_vars(struct dentry *parent, struct ldebugfs_vars *list,
void *data)
{
if (IS_ERR_OR_NULL(parent) || IS_ERR_OR_NULL(list))
void *data)
{
if (IS_ERR_OR_NULL(parent) || IS_ERR_OR_NULL(list))
}
debugfs_create_file(list->name, mode, parent,
list->data ? : data,
}
debugfs_create_file(list->name, mode, parent,
list->data ? : data,
- list->fops ? : &lprocfs_generic_fops);
+ list->fops ? : &ldebugfs_empty_ops);
list++;
}
}
EXPORT_SYMBOL_GPL(ldebugfs_add_vars);
list++;
}
}
EXPORT_SYMBOL_GPL(ldebugfs_add_vars);
+static const struct file_operations lprocfs_empty_ops = { };
+
/**
* Add /proc entries.
*
/**
* Add /proc entries.
*
mode |= 0200;
}
proc = proc_create_data(list->name, mode, root,
mode |= 0200;
}
proc = proc_create_data(list->name, mode, root,
- list->fops ?: &lprocfs_generic_fops,
+ list->fops ?: &lprocfs_empty_ops,
list->data ?: data);
if (!proc)
return -ENOMEM;
list->data ?: data);
if (!proc)
return -ENOMEM;
int lprocfs_obd_setup(struct obd_device *obd, bool uuid_only)
{
int lprocfs_obd_setup(struct obd_device *obd, bool uuid_only)
{
- struct lprocfs_vars *debugfs_vars = NULL;
+ struct ldebugfs_vars *debugfs_vars = NULL;
int rc;
if (!obd || obd->obd_magic != OBD_DEVICE_MAGIC)
int rc;
if (!obd || obd->obd_magic != OBD_DEVICE_MAGIC)
}
if (!obd->obd_type->typ_procroot)
}
if (!obd->obd_type->typ_procroot)
- debugfs_vars = obd->obd_vars;
+ debugfs_vars = obd->obd_debugfs_vars;
obd->obd_debugfs_entry = debugfs_create_dir(
obd->obd_name, obd->obd_type->typ_debugfs_entry);
ldebugfs_add_vars(obd->obd_debugfs_entry, debugfs_vars, obd);
obd->obd_debugfs_entry = debugfs_create_dir(
obd->obd_name, obd->obd_type->typ_debugfs_entry);
ldebugfs_add_vars(obd->obd_debugfs_entry, debugfs_vars, obd);
-const struct file_operations lprocfs_stats_seq_fops = {
+const struct file_operations ldebugfs_stats_seq_fops = {
+ .owner = THIS_MODULE,
+ .open = lprocfs_stats_seq_open,
+ .read = seq_read,
+ .write = lprocfs_stats_seq_write,
+ .llseek = seq_lseek,
+ .release = lprocfs_seq_release,
+};
+EXPORT_SYMBOL(ldebugfs_stats_seq_fops);
+
+static const struct file_operations lprocfs_stats_seq_fops = {
.owner = THIS_MODULE,
.open = lprocfs_stats_seq_open,
.read = seq_read,
.owner = THIS_MODULE,
.open = lprocfs_stats_seq_open,
.read = seq_read,
.llseek = seq_lseek,
.release = lprocfs_seq_release,
};
.llseek = seq_lseek,
.release = lprocfs_seq_release,
};
-EXPORT_SYMBOL(lprocfs_stats_seq_fops);
int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
struct lprocfs_stats *stats)
int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
struct lprocfs_stats *stats)
}
LUSTRE_RW_ATTR(index_backup);
}
LUSTRE_RW_ATTR(index_backup);
-struct lprocfs_vars lprocfs_osd_obd_vars[] = {
+struct ldebugfs_vars ldebugfs_osd_obd_vars[] = {
{ .name = "oi_scrub",
.fops = &ldiskfs_osd_oi_scrub_fops },
{ .name = "readcache_max_filesize",
{ .name = "oi_scrub",
.fops = &ldiskfs_osd_oi_scrub_fops },
{ .name = "readcache_max_filesize",
osd->od_dt_dev.dd_ktype.default_attrs = ldiskfs_attrs;
rc = dt_tunables_init(&osd->od_dt_dev, type, name,
osd->od_dt_dev.dd_ktype.default_attrs = ldiskfs_attrs;
rc = dt_tunables_init(&osd->od_dt_dev, type, name,
+ ldebugfs_osd_obd_vars);
if (rc) {
CERROR("%s: cannot setup sysfs / debugfs entry: %d\n",
name, rc);
if (rc) {
CERROR("%s: cannot setup sysfs / debugfs entry: %d\n",
name, rc);
-struct lprocfs_vars lprocfs_osd_obd_vars[] = {
+struct ldebugfs_vars ldebugfs_osd_obd_vars[] = {
{ .name = "oi_scrub",
.fops = &zfs_osd_oi_scrub_fops },
{ .name = "readcache_max_filesize",
{ .name = "oi_scrub",
.fops = &zfs_osd_oi_scrub_fops },
{ .name = "readcache_max_filesize",
osd->od_dt_dev.dd_ktype.default_attrs = zfs_attrs;
rc = dt_tunables_init(&osd->od_dt_dev, type, name,
osd->od_dt_dev.dd_ktype.default_attrs = zfs_attrs;
rc = dt_tunables_init(&osd->od_dt_dev, type, name,
+ ldebugfs_osd_obd_vars);
if (rc) {
CERROR("%s: cannot setup sysfs / debugfs entry: %d\n",
name, rc);
if (rc) {
CERROR("%s: cannot setup sysfs / debugfs entry: %d\n",
name, rc);
LDEBUGFS_SEQ_FOPS_RO_TYPE(osp, server_uuid);
LDEBUGFS_SEQ_FOPS_RO_TYPE(osp, timeouts);
LDEBUGFS_SEQ_FOPS_RO_TYPE(osp, server_uuid);
LDEBUGFS_SEQ_FOPS_RO_TYPE(osp, timeouts);
-LPROC_SEQ_FOPS_RW_TYPE(osp, import);
+LDEBUGFS_SEQ_FOPS_RW_TYPE(osp, import);
LDEBUGFS_SEQ_FOPS_RO_TYPE(osp, state);
/**
LDEBUGFS_SEQ_FOPS_RO_TYPE(osp, state);
/**
}
LUSTRE_WO_ATTR(force_sync);
}
LUSTRE_WO_ATTR(force_sync);
-static struct lprocfs_vars lprocfs_osp_obd_vars[] = {
+static struct ldebugfs_vars ldebugfs_osp_obd_vars[] = {
{ .name = "connect_flags",
.fops = &osp_connect_flags_fops },
{ .name = "ost_server_uuid",
{ .name = "connect_flags",
.fops = &osp_connect_flags_fops },
{ .name = "ost_server_uuid",
-static struct lprocfs_vars lprocfs_osp_md_vars[] = {
+static struct ldebugfs_vars ldebugfs_osp_md_vars[] = {
{ .name = "connect_flags",
.fops = &osp_connect_flags_fops },
{ .name = "mdt_server_uuid",
{ .name = "connect_flags",
.fops = &osp_connect_flags_fops },
{ .name = "mdt_server_uuid",
if (osp->opd_connect_mdt) {
osp->opd_dt_dev.dd_ktype.default_attrs = osp_md_attrs;
if (osp->opd_connect_mdt) {
osp->opd_dt_dev.dd_ktype.default_attrs = osp_md_attrs;
- obd->obd_vars = lprocfs_osp_md_vars;
+ obd->obd_debugfs_vars = ldebugfs_osp_md_vars;
} else {
osp->opd_dt_dev.dd_ktype.default_attrs = osp_obd_attrs;
} else {
osp->opd_dt_dev.dd_ktype.default_attrs = osp_obd_attrs;
- obd->obd_vars = lprocfs_osp_obd_vars;
+ obd->obd_debugfs_vars = ldebugfs_osp_obd_vars;
}
rc = dt_tunables_init(&osp->opd_dt_dev, obd->obd_type, obd->obd_name,
}
rc = dt_tunables_init(&osp->opd_dt_dev, obd->obd_type, obd->obd_name,
*/
obd->obd_debugfs_entry = debugfs_create_dir(
obd->obd_name, obd->obd_type->typ_debugfs_entry);
*/
obd->obd_debugfs_entry = debugfs_create_dir(
obd->obd_name, obd->obd_type->typ_debugfs_entry);
- ldebugfs_add_vars(obd->obd_debugfs_entry, obd->obd_vars, obd);
+ ldebugfs_add_vars(obd->obd_debugfs_entry, obd->obd_debugfs_vars, obd);
sptlrpc_lprocfs_cliobd_attach(obd);
ptlrpc_lprocfs_register_obd(obd);
sptlrpc_lprocfs_cliobd_attach(obd);
ptlrpc_lprocfs_register_obd(obd);
}
LPROC_SEQ_FOPS(sptlrpc_krb5_allow_old_client_csum);
}
LPROC_SEQ_FOPS(sptlrpc_krb5_allow_old_client_csum);
-static struct lprocfs_vars gss_debugfs_vars[] = {
+static struct ldebugfs_vars gss_debugfs_vars[] = {
{ .name = "replays",
.fops = &gss_proc_oos_fops },
{ .name = "init_channel",
{ .name = "replays",
.fops = &gss_proc_oos_fops },
{ .name = "init_channel",
}
LDEBUGFS_SEQ_FOPS(gss_lk_proc_dl);
}
LDEBUGFS_SEQ_FOPS(gss_lk_proc_dl);
-static struct lprocfs_vars gss_lk_debugfs_vars[] = {
+static struct ldebugfs_vars gss_lk_debugfs_vars[] = {
{ .name = "debug_level",
.fops = &gss_lk_proc_dl_fops },
{ NULL }
{ .name = "debug_level",
.fops = &gss_lk_proc_dl_fops },
{ NULL }
}
debugfs_create_file(name, 0644, svc_debugfs_entry, svc_stats,
}
debugfs_create_file(name, 0644, svc_debugfs_entry, svc_stats,
- &lprocfs_stats_seq_fops);
+ &ldebugfs_stats_seq_fops);
if (dir)
*debugfs_root_ret = svc_debugfs_entry;
if (dir)
*debugfs_root_ret = svc_debugfs_entry;
void ptlrpc_ldebugfs_register_service(struct dentry *entry,
struct ptlrpc_service *svc)
{
void ptlrpc_ldebugfs_register_service(struct dentry *entry,
struct ptlrpc_service *svc)
{
- struct lprocfs_vars lproc_vars[] = {
+ struct ldebugfs_vars ldebugfs_vars[] = {
{ .name = "req_buffer_history_len",
.fops = &ptlrpc_lprocfs_req_history_len_fops,
.data = svc },
{ .name = "req_buffer_history_len",
.fops = &ptlrpc_lprocfs_req_history_len_fops,
.data = svc },
if (!svc->srv_debugfs_entry)
return;
if (!svc->srv_debugfs_entry)
return;
- ldebugfs_add_vars(svc->srv_debugfs_entry, lproc_vars, NULL);
+ ldebugfs_add_vars(svc->srv_debugfs_entry, ldebugfs_vars, NULL);
debugfs_create_file("req_history", 0400, svc->srv_debugfs_entry, svc,
&req_history_fops);
debugfs_create_file("req_history", 0400, svc->srv_debugfs_entry, svc,
&req_history_fops);
* "echo connection=192.168.0.1@tcp0::instance > .../import".
*/
ssize_t
* "echo connection=192.168.0.1@tcp0::instance > .../import".
*/
ssize_t
-lprocfs_import_seq_write(struct file *file, const char __user *buffer,
- size_t count, loff_t *off)
+ldebugfs_import_seq_write(struct file *file, const char __user *buffer,
+ size_t count, loff_t *off)
{
struct seq_file *m = file->private_data;
struct obd_device *obd = m->private;
{
struct seq_file *m = file->private_data;
struct obd_device *obd = m->private;
OBD_FREE(kbuf, count + 1);
return rc ?: count;
}
OBD_FREE(kbuf, count + 1);
return rc ?: count;
}
-EXPORT_SYMBOL(lprocfs_import_seq_write);
+EXPORT_SYMBOL(ldebugfs_import_seq_write);
int lprocfs_pinger_recov_seq_show(struct seq_file *m, void *n)
{
int lprocfs_pinger_recov_seq_show(struct seq_file *m, void *n)
{
*/
static int nrs_crrn_lprocfs_init(struct ptlrpc_service *svc)
{
*/
static int nrs_crrn_lprocfs_init(struct ptlrpc_service *svc)
{
- struct lprocfs_vars nrs_crrn_lprocfs_vars[] = {
+ struct ldebugfs_vars nrs_crrn_lprocfs_vars[] = {
{ .name = "nrs_crrn_quantum",
.fops = &ptlrpc_lprocfs_nrs_crrn_quantum_fops,
.data = svc },
{ .name = "nrs_crrn_quantum",
.fops = &ptlrpc_lprocfs_nrs_crrn_quantum_fops,
.data = svc },
static int nrs_delay_lprocfs_init(struct ptlrpc_service *svc)
{
static int nrs_delay_lprocfs_init(struct ptlrpc_service *svc)
{
- struct lprocfs_vars nrs_delay_lprocfs_vars[] = {
+ struct ldebugfs_vars nrs_delay_lprocfs_vars[] = {
{ .name = "nrs_delay_min",
.fops = &ptlrpc_lprocfs_nrs_delay_min_fops,
.data = svc },
{ .name = "nrs_delay_min",
.fops = &ptlrpc_lprocfs_nrs_delay_min_fops,
.data = svc },
- struct lprocfs_vars nrs_orr_lprocfs_vars[] = {
+ struct ldebugfs_vars nrs_orr_lprocfs_vars[] = {
{ .name = "nrs_orr_quantum",
.fops = &ptlrpc_lprocfs_nrs_orr_quantum_fops },
{ .name = "nrs_orr_offset_type",
{ .name = "nrs_orr_quantum",
.fops = &ptlrpc_lprocfs_nrs_orr_quantum_fops },
{ .name = "nrs_orr_offset_type",
- struct lprocfs_vars nrs_trr_lprocfs_vars[] = {
+ struct ldebugfs_vars nrs_trr_lprocfs_vars[] = {
{ .name = "nrs_trr_quantum",
.fops = &ptlrpc_lprocfs_nrs_orr_quantum_fops },
{ .name = "nrs_trr_offset_type",
{ .name = "nrs_trr_quantum",
.fops = &ptlrpc_lprocfs_nrs_orr_quantum_fops },
{ .name = "nrs_trr_offset_type",
*/
static int nrs_tbf_lprocfs_init(struct ptlrpc_service *svc)
{
*/
static int nrs_tbf_lprocfs_init(struct ptlrpc_service *svc)
{
- struct lprocfs_vars nrs_tbf_lprocfs_vars[] = {
+ struct ldebugfs_vars nrs_tbf_lprocfs_vars[] = {
{ .name = "nrs_tbf_rule",
.fops = &ptlrpc_lprocfs_nrs_tbf_rule_fops,
.data = svc },
{ .name = "nrs_tbf_rule",
.fops = &ptlrpc_lprocfs_nrs_tbf_rule_fops,
.data = svc },
-LPROC_SEQ_FOPS_RO(sptlrpc_info_lprocfs);
+LDEBUGFS_SEQ_FOPS_RO(sptlrpc_info_lprocfs);
static int sptlrpc_ctxs_lprocfs_seq_show(struct seq_file *seq, void *v)
{
static int sptlrpc_ctxs_lprocfs_seq_show(struct seq_file *seq, void *v)
{
-LPROC_SEQ_FOPS_RO(sptlrpc_ctxs_lprocfs);
+LDEBUGFS_SEQ_FOPS_RO(sptlrpc_ctxs_lprocfs);
#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 16, 53, 0)
static ssize_t sepol_seq_write_old(struct obd_device *obd,
#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 16, 53, 0)
static ssize_t sepol_seq_write_old(struct obd_device *obd,
-lprocfs_sptlrpc_sepol_seq_write(struct file *file, const char __user *buffer,
- size_t count, void *data)
+ldebugfs_sptlrpc_sepol_seq_write(struct file *file, const char __user *buffer,
+ size_t count, void *data)
{
struct seq_file *seq = file->private_data;
struct obd_device *obd = seq->private;
{
struct seq_file *seq = file->private_data;
struct obd_device *obd = seq->private;
return rc ? rc : count;
}
return rc ? rc : count;
}
-LPROC_SEQ_FOPS_WR_ONLY(srpc, sptlrpc_sepol);
+LDEBUGFS_FOPS_WR_ONLY(srpc, sptlrpc_sepol);
int sptlrpc_lprocfs_cliobd_attach(struct obd_device *obd)
{
int sptlrpc_lprocfs_cliobd_attach(struct obd_device *obd)
{
LDEBUGFS_SEQ_FOPS_RO(sptlrpc_proc_enc_pool);
LDEBUGFS_SEQ_FOPS_RO(sptlrpc_proc_enc_pool);
-static struct lprocfs_vars sptlrpc_lprocfs_vars[] = {
+static struct ldebugfs_vars sptlrpc_lprocfs_vars[] = {
{ .name = "encrypt_page_pools",
.fops = &sptlrpc_proc_enc_pool_fops },
{ NULL }
{ .name = "encrypt_page_pools",
.fops = &sptlrpc_proc_enc_pool_fops },
{ NULL }