|
@@ -56,7 +56,7 @@
|
|
|
#include "fld_internal.h"
|
|
|
|
|
|
static int
|
|
|
-fld_proc_targets_seq_show(struct seq_file *m, void *unused)
|
|
|
+fld_debugfs_targets_seq_show(struct seq_file *m, void *unused)
|
|
|
{
|
|
|
struct lu_client_fld *fld = (struct lu_client_fld *)m->private;
|
|
|
struct lu_fld_target *target;
|
|
@@ -73,7 +73,7 @@ fld_proc_targets_seq_show(struct seq_file *m, void *unused)
|
|
|
}
|
|
|
|
|
|
static int
|
|
|
-fld_proc_hash_seq_show(struct seq_file *m, void *unused)
|
|
|
+fld_debugfs_hash_seq_show(struct seq_file *m, void *unused)
|
|
|
{
|
|
|
struct lu_client_fld *fld = (struct lu_client_fld *)m->private;
|
|
|
|
|
@@ -87,9 +87,9 @@ fld_proc_hash_seq_show(struct seq_file *m, void *unused)
|
|
|
}
|
|
|
|
|
|
static ssize_t
|
|
|
-fld_proc_hash_seq_write(struct file *file,
|
|
|
- const char __user *buffer,
|
|
|
- size_t count, loff_t *off)
|
|
|
+fld_debugfs_hash_seq_write(struct file *file,
|
|
|
+ const char __user *buffer,
|
|
|
+ size_t count, loff_t *off)
|
|
|
{
|
|
|
struct lu_client_fld *fld;
|
|
|
struct lu_fld_hash *hash = NULL;
|
|
@@ -128,8 +128,8 @@ fld_proc_hash_seq_write(struct file *file,
|
|
|
}
|
|
|
|
|
|
static ssize_t
|
|
|
-fld_proc_cache_flush_write(struct file *file, const char __user *buffer,
|
|
|
- size_t count, loff_t *pos)
|
|
|
+fld_debugfs_cache_flush_write(struct file *file, const char __user *buffer,
|
|
|
+ size_t count, loff_t *pos)
|
|
|
{
|
|
|
struct lu_client_fld *fld = file->private_data;
|
|
|
|
|
@@ -142,31 +142,33 @@ fld_proc_cache_flush_write(struct file *file, const char __user *buffer,
|
|
|
return count;
|
|
|
}
|
|
|
|
|
|
-static int fld_proc_cache_flush_open(struct inode *inode, struct file *file)
|
|
|
+static int
|
|
|
+fld_debugfs_cache_flush_open(struct inode *inode, struct file *file)
|
|
|
{
|
|
|
- file->private_data = PDE_DATA(inode);
|
|
|
+ file->private_data = inode->i_private;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int fld_proc_cache_flush_release(struct inode *inode, struct file *file)
|
|
|
+static int
|
|
|
+fld_debugfs_cache_flush_release(struct inode *inode, struct file *file)
|
|
|
{
|
|
|
file->private_data = NULL;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static struct file_operations fld_proc_cache_flush_fops = {
|
|
|
+static struct file_operations fld_debugfs_cache_flush_fops = {
|
|
|
.owner = THIS_MODULE,
|
|
|
- .open = fld_proc_cache_flush_open,
|
|
|
- .write = fld_proc_cache_flush_write,
|
|
|
- .release = fld_proc_cache_flush_release,
|
|
|
+ .open = fld_debugfs_cache_flush_open,
|
|
|
+ .write = fld_debugfs_cache_flush_write,
|
|
|
+ .release = fld_debugfs_cache_flush_release,
|
|
|
};
|
|
|
|
|
|
-LPROC_SEQ_FOPS_RO(fld_proc_targets);
|
|
|
-LPROC_SEQ_FOPS(fld_proc_hash);
|
|
|
+LPROC_SEQ_FOPS_RO(fld_debugfs_targets);
|
|
|
+LPROC_SEQ_FOPS(fld_debugfs_hash);
|
|
|
|
|
|
-struct lprocfs_vars fld_client_proc_list[] = {
|
|
|
- { "targets", &fld_proc_targets_fops },
|
|
|
- { "hash", &fld_proc_hash_fops },
|
|
|
- { "cache_flush", &fld_proc_cache_flush_fops },
|
|
|
+struct lprocfs_vars fld_client_debugfs_list[] = {
|
|
|
+ { "targets", &fld_debugfs_targets_fops },
|
|
|
+ { "hash", &fld_debugfs_hash_fops },
|
|
|
+ { "cache_flush", &fld_debugfs_cache_flush_fops },
|
|
|
{ NULL }
|
|
|
};
|