diff options
Diffstat (limited to 'sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch')
-rw-r--r-- | sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch | 239 |
1 files changed, 239 insertions, 0 deletions
diff --git a/sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch b/sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch new file mode 100644 index 000000000000..ed648842b7dd --- /dev/null +++ b/sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch @@ -0,0 +1,239 @@ +Index: src/kernel/linux-2.6/pvfs2-proc.c +=================================================================== +RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-proc.c,v +diff -u -r1.8 -r1.9 +--- src/kernel/linux-2.6/pvfs2-proc.c 19 Aug 2007 18:20:28 -0000 1.8 ++++ src/kernel/linux-2.6/pvfs2-proc.c 11 Jan 2008 15:20:16 -0000 1.9 +@@ -261,10 +261,19 @@ + static int min_debug[] = {0}, max_debug[] = {GOSSIP_MAX_DEBUG}; + static int min_op_timeout_secs[] = {0}, max_op_timeout_secs[] = {INT_MAX}; + ++/* ++ * Modern kernels prefer to number the controls themselves. ++ */ ++#ifdef CTL_UNNUMBERED ++#define UNNUMBERED_OR_VAL(x) CTL_UNNUMBERED ++#else ++#define UNNUMBERED_OR_VAL(x) x ++#endif ++ + static ctl_table pvfs2_acache_table[] = { + /* controls acache timeout */ + { +- .ctl_name = 1, ++ .ctl_name = UNNUMBERED_OR_VAL(1), + .procname = "timeout-msecs", + .maxlen = sizeof(int), + .mode = 0644, +@@ -273,7 +282,7 @@ + }, + /* controls acache hard limit */ + { +- .ctl_name = 2, ++ .ctl_name = UNNUMBERED_OR_VAL(2), + .procname = "hard-limit", + .maxlen = sizeof(int), + .mode = 0644, +@@ -282,7 +291,7 @@ + }, + /* controls acache soft limit */ + { +- .ctl_name = 3, ++ .ctl_name = UNNUMBERED_OR_VAL(3), + .procname = "soft-limit", + .maxlen = sizeof(int), + .mode = 0644, +@@ -291,7 +300,7 @@ + }, + /* controls acache reclaim percentage */ + { +- .ctl_name = 4, ++ .ctl_name = UNNUMBERED_OR_VAL(4), + .procname = "reclaim-percentage", + .maxlen = sizeof(int), + .mode = 0644, +@@ -303,7 +312,7 @@ + static ctl_table pvfs2_ncache_table[] = { + /* controls ncache timeout */ + { +- .ctl_name = 1, ++ .ctl_name = UNNUMBERED_OR_VAL(1), + .procname = "timeout-msecs", + .maxlen = sizeof(int), + .mode = 0644, +@@ -312,7 +321,7 @@ + }, + /* controls ncache hard limit */ + { +- .ctl_name = 2, ++ .ctl_name = UNNUMBERED_OR_VAL(2), + .procname = "hard-limit", + .maxlen = sizeof(int), + .mode = 0644, +@@ -321,7 +330,7 @@ + }, + /* controls ncache soft limit */ + { +- .ctl_name = 3, ++ .ctl_name = UNNUMBERED_OR_VAL(3), + .procname = "soft-limit", + .maxlen = sizeof(int), + .mode = 0644, +@@ -330,7 +339,7 @@ + }, + /* controls ncache reclaim percentage */ + { +- .ctl_name = 4, ++ .ctl_name = UNNUMBERED_OR_VAL(4), + .procname = "reclaim-percentage", + .maxlen = sizeof(int), + .mode = 0644, +@@ -343,15 +352,15 @@ + static int ncache_perf_count = PVFS2_PERF_COUNT_REQUEST_NCACHE; + static ctl_table pvfs2_pc_table[] = { + { +- .ctl_name = 1, ++ .ctl_name = UNNUMBERED_OR_VAL(1), + .procname = "acache", + .maxlen = 4096, + .mode = 0444, + .proc_handler = pvfs2_pc_proc_handler, + .extra1 = &acache_perf_count, + }, + { +- .ctl_name = 2, ++ .ctl_name = UNNUMBERED_OR_VAL(2), + .procname = "ncache", + .maxlen = 4096, + .mode = 0444, +@@ -366,44 +375,44 @@ + static ctl_table pvfs2_stats_table[] = { + /* shows number of hits in cache */ + { +- .ctl_name = 1, ++ .ctl_name = UNNUMBERED_OR_VAL(1), + .procname = "hits", + .data = &g_pvfs2_stats.cache_hits, + .maxlen = sizeof(unsigned long), + .mode = 0444, + .proc_handler = &proc_dointvec, + }, + { +- .ctl_name = 2, ++ .ctl_name = UNNUMBERED_OR_VAL(2), + .procname = "misses", + .data = &g_pvfs2_stats.cache_misses, + .maxlen = sizeof(unsigned long), + .mode = 0444, + .proc_handler = &proc_dointvec, + }, + { +- .ctl_name = 3, ++ .ctl_name = UNNUMBERED_OR_VAL(3), + .procname = "reads", + .data = &g_pvfs2_stats.reads, + .maxlen = sizeof(unsigned long), + .mode = 0444, + .proc_handler = &proc_dointvec, + }, + { +- .ctl_name = 4, ++ .ctl_name = UNNUMBERED_OR_VAL(4), + .procname = "writes", + .data = &g_pvfs2_stats.writes, + .maxlen = sizeof(unsigned long), + .mode = 0444, + .proc_handler = &proc_dointvec, + }, +- {.ctl_name = 0}, ++ {0} + }; + + static ctl_table pvfs2_table[] = { + /* controls debugging level */ + { +- .ctl_name = 1, ++ .ctl_name = UNNUMBERED_OR_VAL(1), + .procname = "debug", + .data = &gossip_debug_mask, + .maxlen = sizeof(int), +@@ -415,7 +424,7 @@ + }, + /* operation timeout */ + { +- .ctl_name = 2, ++ .ctl_name = UNNUMBERED_OR_VAL(2), + .procname = "op-timeout-secs", + .data = &op_timeout_secs, + .maxlen = sizeof(int), +@@ -427,7 +436,7 @@ + }, + /* time interval for client side performance counters */ + { +- .ctl_name = 3, ++ .ctl_name = UNNUMBERED_OR_VAL(3), + .procname = "perf-time-interval-secs", + .maxlen = sizeof(int), + .mode = 0644, +@@ -436,7 +445,7 @@ + }, + /* time interval for client side performance counters */ + { +- .ctl_name = 4, ++ .ctl_name = UNNUMBERED_OR_VAL(4), + .procname = "perf-history-size", + .maxlen = sizeof(int), + .mode = 0644, +@@ -445,7 +454,7 @@ + }, + /* reset performance counters */ + { +- .ctl_name = 5, ++ .ctl_name = UNNUMBERED_OR_VAL(5), + .procname = "perf-counter-reset", + .maxlen = sizeof(int), + .mode = 0644, +@@ -454,30 +463,30 @@ + }, + /* subdir for acache control */ + { +- .ctl_name = 6, ++ .ctl_name = UNNUMBERED_OR_VAL(6), + .procname = "acache", + .maxlen = 0, + .mode = 0555, + .child = pvfs2_acache_table + }, + { +- .ctl_name = 7, ++ .ctl_name = UNNUMBERED_OR_VAL(7), + .procname = "perf-counters", + .maxlen = 0, + .mode = 0555, + .child = pvfs2_pc_table + }, + /* subdir for ncache control */ + { +- .ctl_name = 8, ++ .ctl_name = UNNUMBERED_OR_VAL(8), + .procname = "ncache", + .maxlen = 0, + .mode = 0555, + .child = pvfs2_ncache_table + }, + /* statistics maintained by the kernel module (output only below this) */ + { +- .ctl_name = 9, ++ .ctl_name = UNNUMBERED_OR_VAL(9), + .procname = "stats", + .maxlen = 0, + .mode = 0555, +@@ -487,7 +496,7 @@ + }; + static ctl_table fs_table[] = { + { +- .ctl_name = 1, ++ .ctl_name = UNNUMBERED_OR_VAL(1), + .procname = "pvfs2", + .mode = 0555, + .child = pvfs2_table |