diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/fid/lproc_fid.c')
-rw-r--r-- | drivers/staging/lustre/lustre/fid/lproc_fid.c | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/drivers/staging/lustre/lustre/fid/lproc_fid.c b/drivers/staging/lustre/lustre/fid/lproc_fid.c index 783939dbd4db..cc2201c25339 100644 --- a/drivers/staging/lustre/lustre/fid/lproc_fid.c +++ b/drivers/staging/lustre/lustre/fid/lproc_fid.c @@ -59,8 +59,9 @@ * Note: this function is only used for testing, it is no safe for production * use. */ -static int lprocfs_fid_write_common(const char __user *buffer, size_t count, - struct lu_seq_range *range) +static int +ldebugfs_fid_write_common(const char __user *buffer, size_t count, + struct lu_seq_range *range) { struct lu_seq_range tmp; int rc; @@ -92,10 +93,11 @@ static int lprocfs_fid_write_common(const char __user *buffer, size_t count, return count; } -/* Client side procfs stuff */ -static ssize_t lprocfs_fid_space_seq_write(struct file *file, - const char __user *buffer, - size_t count, loff_t *off) +/* Client side debugfs stuff */ +static ssize_t +ldebugfs_fid_space_seq_write(struct file *file, + const char __user *buffer, + size_t count, loff_t *off) { struct lu_client_seq *seq; int rc; @@ -104,7 +106,7 @@ static ssize_t lprocfs_fid_space_seq_write(struct file *file, LASSERT(seq != NULL); mutex_lock(&seq->lcs_mutex); - rc = lprocfs_fid_write_common(buffer, count, &seq->lcs_space); + rc = ldebugfs_fid_write_common(buffer, count, &seq->lcs_space); if (rc == 0) { CDEBUG(D_INFO, "%s: Space: "DRANGE"\n", @@ -117,7 +119,7 @@ static ssize_t lprocfs_fid_space_seq_write(struct file *file, } static int -lprocfs_fid_space_seq_show(struct seq_file *m, void *unused) +ldebugfs_fid_space_seq_show(struct seq_file *m, void *unused) { struct lu_client_seq *seq = (struct lu_client_seq *)m->private; @@ -130,9 +132,10 @@ lprocfs_fid_space_seq_show(struct seq_file *m, void *unused) return 0; } -static ssize_t lprocfs_fid_width_seq_write(struct file *file, - const char __user *buffer, - size_t count, loff_t *off) +static ssize_t +ldebugfs_fid_width_seq_write(struct file *file, + const char __user *buffer, + size_t count, loff_t *off) { struct lu_client_seq *seq; __u64 max; @@ -154,10 +157,8 @@ static ssize_t lprocfs_fid_width_seq_write(struct file *file, if (val <= max && val > 0) { seq->lcs_width = val; - if (rc == 0) { - CDEBUG(D_INFO, "%s: Sequence size: %llu\n", - seq->lcs_name, seq->lcs_width); - } + CDEBUG(D_INFO, "%s: Sequence size: %llu\n", seq->lcs_name, + seq->lcs_width); } mutex_unlock(&seq->lcs_mutex); @@ -166,7 +167,7 @@ static ssize_t lprocfs_fid_width_seq_write(struct file *file, } static int -lprocfs_fid_width_seq_show(struct seq_file *m, void *unused) +ldebugfs_fid_width_seq_show(struct seq_file *m, void *unused) { struct lu_client_seq *seq = (struct lu_client_seq *)m->private; @@ -180,7 +181,7 @@ lprocfs_fid_width_seq_show(struct seq_file *m, void *unused) } static int -lprocfs_fid_fid_seq_show(struct seq_file *m, void *unused) +ldebugfs_fid_fid_seq_show(struct seq_file *m, void *unused) { struct lu_client_seq *seq = (struct lu_client_seq *)m->private; @@ -194,7 +195,7 @@ lprocfs_fid_fid_seq_show(struct seq_file *m, void *unused) } static int -lprocfs_fid_server_seq_show(struct seq_file *m, void *unused) +ldebugfs_fid_server_seq_show(struct seq_file *m, void *unused) { struct lu_client_seq *seq = (struct lu_client_seq *)m->private; struct client_obd *cli; @@ -211,15 +212,15 @@ lprocfs_fid_server_seq_show(struct seq_file *m, void *unused) return 0; } -LPROC_SEQ_FOPS(lprocfs_fid_space); -LPROC_SEQ_FOPS(lprocfs_fid_width); -LPROC_SEQ_FOPS_RO(lprocfs_fid_server); -LPROC_SEQ_FOPS_RO(lprocfs_fid_fid); +LPROC_SEQ_FOPS(ldebugfs_fid_space); +LPROC_SEQ_FOPS(ldebugfs_fid_width); +LPROC_SEQ_FOPS_RO(ldebugfs_fid_server); +LPROC_SEQ_FOPS_RO(ldebugfs_fid_fid); -struct lprocfs_vars seq_client_proc_list[] = { - { "space", &lprocfs_fid_space_fops }, - { "width", &lprocfs_fid_width_fops }, - { "server", &lprocfs_fid_server_fops }, - { "fid", &lprocfs_fid_fid_fops }, +struct lprocfs_vars seq_client_debugfs_list[] = { + { "space", &ldebugfs_fid_space_fops }, + { "width", &ldebugfs_fid_width_fops }, + { "server", &ldebugfs_fid_server_fops }, + { "fid", &ldebugfs_fid_fid_fops }, { NULL } }; |