|
@@ -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;
|
|
@@ -166,7 +169,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 +183,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 +197,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 +214,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 }
|
|
|
};
|