On Tue, Aug 21, 2007 at 01:11:20PM +0200, Papp Tamas wrote:
>On Tue, Aug 21, 2007 at 06:42:01AM -0400, Robin Humble wrote:
>> On Sun, Aug 19, 2007 at 10:57:52AM +0200, Papp Tamas wrote:
>> >On Sat, Aug 18, 2007 at 03:08:54AM -0400, Aaron Knister wrote:
>> >> Can you post anything in dmesg or /var/log/messages relative to lustre?
>> >LustreError: 22171:0:(linux-proc.c:249:insert_proc()) couldn't register
>> >dump_kernel
>> >LustreError: 22171:0:(module.c:378:init_libcfs_module()) insert_proc: error
>> >-1
>> you have hit this:
>> https://bugzilla.lustre.org/show_bug.cgi?id=12782
>But now I cannot build it at all.
>/usr/src/lustre/lustre-1.6.1/lnet/libcfs/linux/linux-proc.c:163:
>error: static declaration of .top_table. follows non-static
>declaration
ah, my bad. looks like your gcc4 is pickier than my gcc3.
just delete the line:
extern struct ctl_table top_table[2];
alternatively, updated patch attached.
cheers,
robin
diff -ru lustre-1.6.1.orig/lnet/libcfs/linux/linux-proc.c
lustre-1.6.1/lnet/libcfs/linux/linux-proc.c
--- lustre-1.6.1.orig/lnet/libcfs/linux/linux-proc.c 2007-06-14
19:16:49.000000000 +1000
+++ lustre-1.6.1/lnet/libcfs/linux/linux-proc.c 2007-08-21 21:31:25.000000000
+1000
@@ -239,10 +239,24 @@
{
struct proc_dir_entry *ent;
+ ent = proc_mkdir("sys/lnet", NULL);
+ if (ent == NULL) {
+ CERROR("couldn't create /proc/sys/lnet \n");
+ return -1;
+ }
+
#ifdef CONFIG_SYSCTL
if (!lnet_table_header)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+ lnet_table_header = register_sysctl_table(top_table);
+#else
lnet_table_header = cfs_register_sysctl_table(top_table, 0);
#endif
+ if (!lnet_table_header) {
+ CERROR("registering top_table failed\n");
+ return -1;
+ }
+#endif
ent = create_proc_entry("sys/lnet/dump_kernel", 0, NULL);
if (ent == NULL) {
diff -ru lustre-1.6.1.orig/lustre/obdclass/linux/linux-sysctl.c
lustre-1.6.1/lustre/obdclass/linux/linux-sysctl.c
--- lustre-1.6.1.orig/lustre/obdclass/linux/linux-sysctl.c 2007-07-06
09:42:32.000000000 +1000
+++ lustre-1.6.1/lustre/obdclass/linux/linux-sysctl.c 2007-08-21
20:18:21.000000000 +1000
@@ -83,6 +83,26 @@
return rc;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+static ctl_table obd_table[] = {
+ {OBD_FAIL_LOC, "fail_loc", &obd_fail_loc, sizeof(int), 0644, NULL,
+ NULL, &proc_fail_loc},
+ {OBD_TIMEOUT, "timeout", &obd_timeout, sizeof(int), 0644, NULL,
+ NULL, &proc_set_timeout},
+ {OBD_DEBUG_PEER_ON_TIMEOUT, "debug_peer_on_timeout",
+ &obd_debug_peer_on_timeout,
+ sizeof(int), 0644, NULL, NULL, &proc_dointvec},
+ {OBD_DUMP_ON_TIMEOUT, "dump_on_timeout", &obd_dump_on_timeout,
+ sizeof(int), 0644, NULL, NULL, &proc_dointvec},
+ {OBD_DUMP_ON_EVICTION, "dump_on_eviction", &obd_dump_on_eviction,
+ sizeof(int), 0644, NULL, NULL, &proc_dointvec},
+ {OBD_MEMUSED, "memused", (int *)&obd_memory.counter,
+ sizeof(int), 0644, NULL, NULL, &proc_dointvec},
+ {OBD_LDLM_TIMEOUT, "ldlm_timeout", &ldlm_timeout, sizeof(int), 0644,
+ NULL, NULL, &proc_set_timeout},
+ { 0 }
+};
+#else
static ctl_table obd_table[] = {
{OBD_FAIL_LOC, "fail_loc", &obd_fail_loc, sizeof(int), 0644, NULL,
&proc_fail_loc},
@@ -103,6 +123,7 @@
NULL, &proc_set_timeout},
{ 0 }
};
+#endif
static ctl_table parent_table[] = {
{OBD_SYSCTL, "lustre", NULL, 0, 0555, obd_table},
@@ -113,8 +134,12 @@
{
#ifdef CONFIG_SYSCTL
if ( !obd_table_header )
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+ obd_table_header = register_sysctl_table(parent_table);
+#else
obd_table_header = cfs_register_sysctl_table(parent_table, 0);
#endif
+#endif
}
void obd_sysctl_clean (void)
_______________________________________________
Lustre-discuss mailing list
[email protected]
https://mail.clusterfs.com/mailman/listinfo/lustre-discuss