enum {
OBD_FAIL_LOC = 1, /* control test failures instrumentation */
OBD_TIMEOUT, /* RPC timeout before recovery/intr */
+ OBD_DUMP_ON_TIMEOUT, /* dump kernel debug log upon eviction */
OBD_UPCALL, /* path to recovery upcall */
+ OBD_MEMUSED, /* bytes currently OBD_ALLOCated */
OBD_SYNCFILTER, /* XXX temporary, as we play with sync osts.. */
+ OBD_LDLM_TIMEOUT, /* LDLM timeout for ASTs before client eviction */
};
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
int proc_fail_loc(ctl_table *table, int write, struct file *filp,
void *buffer, size_t *lenp);
-
+#else
+int proc_fail_loc(ctl_table *table, int write, struct file *filp,
+ void *buffer, size_t *lenp, loff_t *ppos);
+#endif
static ctl_table obd_table[] = {
{OBD_FAIL_LOC, "fail_loc", &obd_fail_loc, sizeof(int), 0644, NULL,
&proc_dointvec},
{OBD_TIMEOUT, "timeout", &obd_timeout, sizeof(int), 0644, NULL,
&proc_fail_loc},
+ {OBD_DUMP_ON_TIMEOUT, "dump_on_timeout", &obd_dump_on_timeout,
+ sizeof(int), 0644, NULL, &proc_dointvec},
/* XXX need to lock so we avoid update races with recovery upcall! */
{OBD_UPCALL, "upcall", obd_lustre_upcall, 128, 0644, NULL,
&proc_dostring, &sysctl_string },
+ {OBD_MEMUSED, "memused", (int *)&obd_memory.counter,
+ sizeof(int), 0644, NULL, &proc_dointvec},
{OBD_SYNCFILTER, "filter_sync_on_commit", &obd_sync_filter, sizeof(int),
0644, NULL, &proc_dointvec},
+ {OBD_LDLM_TIMEOUT, "ldlm_timeout", &ldlm_timeout, sizeof(int), 0644,
+ NULL, &proc_dointvec},
{ 0 }
};
obd_table_header = NULL;
#endif
}
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
int proc_fail_loc(ctl_table *table, int write, struct file *filp,
void *buffer, size_t *lenp)
+#else
+int proc_fail_loc(ctl_table *table, int write, struct file *filp,
+ void *buffer, size_t *lenp, loff_t *ppos)
+#endif
{
int rc;
int old_fail_loc = obd_fail_loc;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9))
rc = proc_dointvec(table,write,filp,buffer,lenp);
+#else
+ rc = proc_dointvec(table,write,filp,buffer,lenp, ppos);
+#endif
if (old_fail_loc != obd_fail_loc)
wake_up(&obd_race_waitq);
return rc;