Commit 80595b74 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre: remove alloc_fail_rate sysctl

It was used to control allocation failure rate, but there is
in-kernel way of doing that that's more versatile too.

This is going to remove just the sysctl, the underlying variable
will be removed once all OBD_ALLOC* macros removal patchseries land.
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3c4872f9
...@@ -203,37 +203,6 @@ static int proc_max_dirty_pages_in_mb(struct ctl_table *table, int write, ...@@ -203,37 +203,6 @@ static int proc_max_dirty_pages_in_mb(struct ctl_table *table, int write,
return rc; return rc;
} }
static int proc_alloc_fail_rate(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
int rc = 0;
if (!table->data || !table->maxlen || !*lenp || (*ppos && !write)) {
*lenp = 0;
return 0;
}
if (write) {
rc = lprocfs_write_frac_helper(buffer, *lenp,
(unsigned int *)table->data,
OBD_ALLOC_FAIL_MULT);
} else {
char buf[21];
int len;
len = lprocfs_read_frac_helper(buf, 21,
*(unsigned int *)table->data,
OBD_ALLOC_FAIL_MULT);
if (len > *lenp)
len = *lenp;
buf[len] = '\0';
if (copy_to_user(buffer, buf, len))
return -EFAULT;
*lenp = len;
}
*ppos += *lenp;
return rc;
}
static struct ctl_table obd_table[] = { static struct ctl_table obd_table[] = {
{ {
.procname = "timeout", .procname = "timeout",
...@@ -298,13 +267,6 @@ static struct ctl_table obd_table[] = { ...@@ -298,13 +267,6 @@ static struct ctl_table obd_table[] = {
.mode = 0644, .mode = 0644,
.proc_handler = &proc_set_timeout .proc_handler = &proc_set_timeout
}, },
{
.procname = "alloc_fail_rate",
.data = &obd_alloc_fail_rate,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_alloc_fail_rate
},
{ {
.procname = "max_dirty_mb", .procname = "max_dirty_mb",
.data = &obd_max_dirty_pages, .data = &obd_max_dirty_pages,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment