home *** CD-ROM | disk | FTP | other *** search
/ ftp.parl.clemson.edu / 2015-02-07.ftp.parl.clemson.edu.tar / ftp.parl.clemson.edu / pub / pvfs2 / patches / 2.6.3 / pvfs-lkv21.patch
Text File  |  2007-05-10  |  21KB  |  639 lines

  1. Index: pvfs2/configure
  2. diff -c pvfs2/configure:1.323.6.13 pvfs2/configure:1.323.6.15
  3. *** pvfs2/configure:1.323.6.13    Thu Mar 15 11:52:04 2007
  4. --- pvfs2/configure    Fri May 11 14:22:43 2007
  5. ***************
  6. *** 7850,7856 ****
  7.   
  8.       NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`"
  9.   
  10. !     CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src/include -I$lk_src/include/asm-i386/mach-generic -I$lk_src/include/asm-i386/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty)  -DKBUILD_MODNAME=KBUILD_STR(empty) -imacros $lk_src/include/linux/autoconf.h"
  11.   
  12.   
  13.       { echo "$as_me:$LINENO: checking for i_size_write in kernel" >&5
  14. --- 7850,7856 ----
  15.   
  16.       NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`"
  17.   
  18. !     CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src/include -I$lk_src/include/asm/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty)  -DKBUILD_MODNAME=KBUILD_STR(empty) -imacros $lk_src/include/linux/autoconf.h"
  19.   
  20.   
  21.       { echo "$as_me:$LINENO: checking for i_size_write in kernel" >&5
  22. ***************
  23. *** 9136,9143 ****
  24.   rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  25.       fi
  26.   
  27. !                     tmp_cflags=$CFLAGS
  28. !     CFLAGS="$CFLAGS -Werror -Wno-pointer-sign"
  29.           { echo "$as_me:$LINENO: checking if statfs callbacks' arguments in kernel has struct dentry argument" >&5
  30.   echo $ECHO_N "checking if statfs callbacks' arguments in kernel has struct dentry argument... $ECHO_C" >&6; }
  31.               cat >conftest.$ac_ext <<_ACEOF
  32. --- 9136,9153 ----
  33.   rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  34.       fi
  35.   
  36. !                 if test "x$GCC" = "xyes" ; then
  37. !         { echo "$as_me:$LINENO: checking for gcc major version" >&5
  38. ! echo $ECHO_N "checking for gcc major version... $ECHO_C" >&6; }
  39. !         gcc_version=`$CC --version| head -1 | tr . ' ' | cut -d ' ' -f 3`
  40. !         { echo "$as_me:$LINENO: result: $gcc_version" >&5
  41. ! echo "${ECHO_T}$gcc_version" >&6; }
  42. !         if test $gcc_version -gt 3 ; then
  43. !             extra_gcc_flags="-Wno-pointer-sign -Wno-strict-aliasing -Wno-strict-aliasing=2"
  44. !         fi
  45. !     fi
  46. !         tmp_cflags=$CFLAGS
  47. !     CFLAGS="$CFLAGS -Werror $extra_gcc_flags"
  48.           { echo "$as_me:$LINENO: checking if statfs callbacks' arguments in kernel has struct dentry argument" >&5
  49.   echo $ECHO_N "checking if statfs callbacks' arguments in kernel has struct dentry argument... $ECHO_C" >&6; }
  50.               cat >conftest.$ac_ext <<_ACEOF
  51. ***************
  52. *** 10698,10703 ****
  53. --- 10708,10771 ----
  54.   
  55.   rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  56.   
  57. +         { echo "$as_me:$LINENO: checking for two arguments to register_sysctl_table" >&5
  58. + echo $ECHO_N "checking for two arguments to register_sysctl_table... $ECHO_C" >&6; }
  59. +     cat >conftest.$ac_ext <<_ACEOF
  60. + /* confdefs.h.  */
  61. + _ACEOF
  62. + cat confdefs.h >>conftest.$ac_ext
  63. + cat >>conftest.$ac_ext <<_ACEOF
  64. + /* end confdefs.h.  */
  65. +         #define __KERNEL__
  66. +         #include <linux/sysctl.h>
  67. +         #include <linux/proc_fs.h>
  68. + int
  69. + main ()
  70. + {
  71. +         register_sysctl_table(NULL, 0);
  72. +   ;
  73. +   return 0;
  74. + }
  75. + _ACEOF
  76. + rm -f conftest.$ac_objext
  77. + if { (ac_try="$ac_compile"
  78. + case "(($ac_try" in
  79. +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  80. +   *) ac_try_echo=$ac_try;;
  81. + esac
  82. + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  83. +   (eval "$ac_compile") 2>conftest.er1
  84. +   ac_status=$?
  85. +   grep -v '^ *+' conftest.er1 >conftest.err
  86. +   rm -f conftest.er1
  87. +   cat conftest.err >&5
  88. +   echo "$as_me:$LINENO: \$? = $ac_status" >&5
  89. +   (exit $ac_status); } && {
  90. +      test -z "$ac_c_werror_flag" ||
  91. +      test ! -s conftest.err
  92. +        } && test -s conftest.$ac_objext; then
  93. +   { echo "$as_me:$LINENO: result: yes" >&5
  94. + echo "${ECHO_T}yes" >&6; }
  95. + cat >>confdefs.h <<\_ACEOF
  96. + #define HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE 1
  97. + _ACEOF
  98. + else
  99. +   echo "$as_me: failed program was:" >&5
  100. + sed 's/^/| /' conftest.$ac_ext >&5
  101. +     { echo "$as_me:$LINENO: result: no" >&5
  102. + echo "${ECHO_T}no" >&6; }
  103. + fi
  104. + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  105.       CFLAGS=$oldcflags
  106.   
  107.   
  108. ***************
  109. *** 11759,11764 ****
  110. --- 11827,11891 ----
  111.   
  112.   rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  113.   
  114. +         { echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5
  115. + echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6; }
  116. +     cat >conftest.$ac_ext <<_ACEOF
  117. + /* confdefs.h.  */
  118. + _ACEOF
  119. + cat confdefs.h >>conftest.$ac_ext
  120. + cat >>conftest.$ac_ext <<_ACEOF
  121. + /* end confdefs.h.  */
  122. +     #include <db.h>
  123. + int
  124. + main ()
  125. + {
  126. +     int ret = 0;
  127. +     DB *db = NULL;
  128. +     int pagesize;
  129. +     ret = db->get_pagesize(db, &pagesize);
  130. +   ;
  131. +   return 0;
  132. + }
  133. + _ACEOF
  134. + rm -f conftest.$ac_objext
  135. + if { (ac_try="$ac_compile"
  136. + case "(($ac_try" in
  137. +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  138. +   *) ac_try_echo=$ac_try;;
  139. + esac
  140. + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  141. +   (eval "$ac_compile") 2>conftest.er1
  142. +   ac_status=$?
  143. +   grep -v '^ *+' conftest.er1 >conftest.err
  144. +   rm -f conftest.er1
  145. +   cat conftest.err >&5
  146. +   echo "$as_me:$LINENO: \$? = $ac_status" >&5
  147. +   (exit $ac_status); } && {
  148. +      test -z "$ac_c_werror_flag" ||
  149. +      test ! -s conftest.err
  150. +        } && test -s conftest.$ac_objext; then
  151. +   { echo "$as_me:$LINENO: result: yes" >&5
  152. + echo "${ECHO_T}yes" >&6; }
  153. + cat >>confdefs.h <<\_ACEOF
  154. + #define HAVE_DB_GET_PAGESIZE 1
  155. + _ACEOF
  156. + else
  157. +   echo "$as_me: failed program was:" >&5
  158. + sed 's/^/| /' conftest.$ac_ext >&5
  159. +     { echo "$as_me:$LINENO: result: no" >&5
  160. + echo "${ECHO_T}no" >&6; }
  161. + fi
  162. + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  163.       CFLAGS="$oldcflags"
  164.   
  165.   else
  166. ***************
  167. *** 12383,12388 ****
  168. --- 12510,12574 ----
  169.   
  170.   cat >>confdefs.h <<\_ACEOF
  171.   #define HAVE_DB_BUFFER_SMALL 1
  172. + _ACEOF
  173. + else
  174. +   echo "$as_me: failed program was:" >&5
  175. + sed 's/^/| /' conftest.$ac_ext >&5
  176. +     { echo "$as_me:$LINENO: result: no" >&5
  177. + echo "${ECHO_T}no" >&6; }
  178. + fi
  179. + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  180. +         { echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5
  181. + echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6; }
  182. +     cat >conftest.$ac_ext <<_ACEOF
  183. + /* confdefs.h.  */
  184. + _ACEOF
  185. + cat confdefs.h >>conftest.$ac_ext
  186. + cat >>conftest.$ac_ext <<_ACEOF
  187. + /* end confdefs.h.  */
  188. +     #include <db.h>
  189. + int
  190. + main ()
  191. + {
  192. +     int ret = 0;
  193. +     DB *db = NULL;
  194. +     int pagesize;
  195. +     ret = db->get_pagesize(db, &pagesize);
  196. +   ;
  197. +   return 0;
  198. + }
  199. + _ACEOF
  200. + rm -f conftest.$ac_objext
  201. + if { (ac_try="$ac_compile"
  202. + case "(($ac_try" in
  203. +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  204. +   *) ac_try_echo=$ac_try;;
  205. + esac
  206. + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  207. +   (eval "$ac_compile") 2>conftest.er1
  208. +   ac_status=$?
  209. +   grep -v '^ *+' conftest.er1 >conftest.err
  210. +   rm -f conftest.er1
  211. +   cat conftest.err >&5
  212. +   echo "$as_me:$LINENO: \$? = $ac_status" >&5
  213. +   (exit $ac_status); } && {
  214. +      test -z "$ac_c_werror_flag" ||
  215. +      test ! -s conftest.err
  216. +        } && test -s conftest.$ac_objext; then
  217. +   { echo "$as_me:$LINENO: result: yes" >&5
  218. + echo "${ECHO_T}yes" >&6; }
  219. + cat >>confdefs.h <<\_ACEOF
  220. + #define HAVE_DB_GET_PAGESIZE 1
  221.   _ACEOF
  222.   
  223.   else
  224. Index: pvfs2/pvfs2-config.h.in
  225. diff -c pvfs2/pvfs2-config.h.in:1.88.6.9 pvfs2/pvfs2-config.h.in:1.88.6.10
  226. *** pvfs2/pvfs2-config.h.in:1.88.6.9    Thu Apr  5 11:49:34 2007
  227. --- pvfs2/pvfs2-config.h.in    Fri May 11 12:26:56 2007
  228. ***************
  229. *** 183,191 ****
  230.   /* Define to 1 if you have the <mntent.h,> header file. */
  231.   #undef HAVE_MNTENT_H_
  232.   
  233. - /* Define to 1 if you have the <mntent.h,> header file. */
  234. - #undef HAVE_MNTENT_H_
  235.   /* Use the MPE profiling library */
  236.   #undef HAVE_MPE
  237.   
  238. --- 183,188 ----
  239. ***************
  240. *** 290,295 ****
  241. --- 287,295 ----
  242.   
  243.   /* Define to 1 if you have the <sys/xattr.h> header file. */
  244.   #undef HAVE_SYS_XATTR_H
  245. + /* Define if register_sysctl_table takes two arguments */
  246. + #undef HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE
  247.   
  248.   /* Define if DB open function takes a txnid parameter */
  249.   #undef HAVE_TXNID_PARAMETER_TO_DB_OPEN
  250. Index: pvfs2/maint/config/kernel.m4
  251. diff -c pvfs2/maint/config/kernel.m4:1.21.6.10 pvfs2/maint/config/kernel.m4:1.21.6.13
  252. *** pvfs2/maint/config/kernel.m4:1.21.6.10    Thu Mar 15 11:52:14 2007
  253. --- pvfs2/maint/config/kernel.m4    Fri May 11 14:22:51 2007
  254. ***************
  255. *** 15,21 ****
  256.   
  257.       NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`"
  258.   
  259. !     CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src/include -I$lk_src/include/asm-i386/mach-generic -I$lk_src/include/asm-i386/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty)  -DKBUILD_MODNAME=KBUILD_STR(empty) -imacros $lk_src/include/linux/autoconf.h"
  260.   
  261.   
  262.       AC_MSG_CHECKING(for i_size_write in kernel)
  263. --- 15,21 ----
  264.   
  265.       NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`"
  266.   
  267. !     CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src/include -I$lk_src/include/asm/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty)  -DKBUILD_MODNAME=KBUILD_STR(empty) -imacros $lk_src/include/linux/autoconf.h"
  268.   
  269.   
  270.       AC_MSG_CHECKING(for i_size_write in kernel)
  271. ***************
  272. *** 351,358 ****
  273.       dnl we need the compiler to error on warnings about prototypes, but
  274.       dnl certain Fedora FC5 kernel header files throw extra (spurious)
  275.       dnl warnings, which -Wno-pointer-sign silences.    
  276.           tmp_cflags=$CFLAGS
  277. !     CFLAGS="$CFLAGS -Werror -Wno-pointer-sign"
  278.       dnl if this test passes, there is a struct dentry* argument
  279.       AC_MSG_CHECKING(if statfs callbacks' arguments in kernel has struct dentry argument)
  280.       dnl if this test passes, the kernel has it
  281. --- 351,366 ----
  282.       dnl we need the compiler to error on warnings about prototypes, but
  283.       dnl certain Fedora FC5 kernel header files throw extra (spurious)
  284.       dnl warnings, which -Wno-pointer-sign silences.    
  285. +     if test "x$GCC" = "xyes" ; then
  286. +         AC_MSG_CHECKING(for gcc major version)
  287. +         gcc_version=`$CC --version| head -1 | tr . ' ' | cut -d ' ' -f 3`
  288. +         AC_MSG_RESULT($gcc_version)
  289. +         if test $gcc_version -gt 3 ; then
  290. +             extra_gcc_flags="-Wno-pointer-sign -Wno-strict-aliasing -Wno-strict-aliasing=2"
  291. +         fi
  292. +     fi
  293.           tmp_cflags=$CFLAGS
  294. !     CFLAGS="$CFLAGS -Werror $extra_gcc_flags"
  295.       dnl if this test passes, there is a struct dentry* argument
  296.       AC_MSG_CHECKING(if statfs callbacks' arguments in kernel has struct dentry argument)
  297.       dnl if this test passes, the kernel has it
  298. ***************
  299. *** 703,708 ****
  300. --- 711,730 ----
  301.       ],
  302.       AC_MSG_RESULT(yes)
  303.       AC_DEFINE(HAVE_KZALLOC, 1, Define if kzalloc exists),
  304. +     AC_MSG_RESULT(no)
  305. +     )
  306. +     dnl Check for two arg register_sysctl_table()
  307. +     AC_MSG_CHECKING(for two arguments to register_sysctl_table)
  308. +     AC_TRY_COMPILE([
  309. +         #define __KERNEL__
  310. +         #include <linux/sysctl.h>
  311. +         #include <linux/proc_fs.h>
  312. +     ], [
  313. +         register_sysctl_table(NULL, 0);
  314. +     ],
  315. +     AC_MSG_RESULT(yes)
  316. +     AC_DEFINE(HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE, 1, Define if register_sysctl_table takes two arguments),
  317.       AC_MSG_RESULT(no)
  318.       )
  319.   
  320. Index: pvfs2/src/kernel/linux-2.6/pvfs2-proc.c
  321. diff -c pvfs2/src/kernel/linux-2.6/pvfs2-proc.c:1.6 pvfs2/src/kernel/linux-2.6/pvfs2-proc.c:1.6.20.1
  322. *** pvfs2/src/kernel/linux-2.6/pvfs2-proc.c:1.6    Thu Aug 10 15:02:24 2006
  323. --- pvfs2/src/kernel/linux-2.6/pvfs2-proc.c    Fri May 11 12:26:59 2007
  324. ***************
  325. *** 260,333 ****
  326.   };
  327.   static int min_debug[] = {0}, max_debug[] = {GOSSIP_MAX_DEBUG};
  328.   static int min_op_timeout_secs[] = {0}, max_op_timeout_secs[] = {INT_MAX};
  329.   static ctl_table pvfs2_acache_table[] = {
  330.       /* controls acache timeout */
  331. !     {1, "timeout-msecs", NULL, sizeof(int), 0644, NULL,
  332. !         &pvfs2_param_proc_handler, NULL, NULL, &acache_timeout_extra, NULL},
  333.       /* controls acache hard limit */
  334. !     {2, "hard-limit", NULL, sizeof(int), 0644, NULL,
  335. !         &pvfs2_param_proc_handler, NULL, NULL, &acache_hard_extra, NULL},
  336.       /* controls acache soft limit */
  337. !     {3, "soft-limit", NULL, sizeof(int), 0644, NULL,
  338. !         &pvfs2_param_proc_handler, NULL, NULL, &acache_soft_extra, NULL},
  339.       /* controls acache reclaim percentage */
  340. !     {4, "reclaim-percentage", NULL, sizeof(int), 
  341. !         0644, NULL,
  342. !         &pvfs2_param_proc_handler, NULL, NULL, &acache_rec_extra, NULL},
  343.       {0}
  344.   };
  345.   static ctl_table pvfs2_ncache_table[] = {
  346.       /* controls ncache timeout */
  347. !     {1, "timeout-msecs", NULL, sizeof(int), 0644, NULL,
  348. !         &pvfs2_param_proc_handler, NULL, NULL, &ncache_timeout_extra, NULL},
  349.       /* controls ncache hard limit */
  350. !     {2, "hard-limit", NULL, sizeof(int), 0644, NULL,
  351. !         &pvfs2_param_proc_handler, NULL, NULL, &ncache_hard_extra, NULL},
  352.       /* controls ncache soft limit */
  353. !     {3, "soft-limit", NULL, sizeof(int), 0644, NULL,
  354. !         &pvfs2_param_proc_handler, NULL, NULL, &ncache_soft_extra, NULL},
  355.       /* controls ncache reclaim percentage */
  356. !     {4, "reclaim-percentage", NULL, sizeof(int), 
  357. !         0644, NULL,
  358. !         &pvfs2_param_proc_handler, NULL, NULL, &ncache_rec_extra, NULL},
  359.       {0}
  360.   };
  361.   static int acache_perf_count = PVFS2_PERF_COUNT_REQUEST_ACACHE;
  362.   static int ncache_perf_count = PVFS2_PERF_COUNT_REQUEST_NCACHE;
  363.   static ctl_table pvfs2_pc_table[] = {
  364. !     {1, "acache", NULL, 4096, 0444, NULL,
  365. !         pvfs2_pc_proc_handler, NULL, NULL, &acache_perf_count, NULL},
  366. !     {2, "ncache", NULL, 4096, 0444, NULL,
  367. !         pvfs2_pc_proc_handler, NULL, NULL, &ncache_perf_count, NULL},
  368.       {0}
  369.   };
  370.   static ctl_table pvfs2_table[] = {
  371.       /* controls debugging level */
  372. !     {1, "debug", &gossip_debug_mask, sizeof(int), 0644, NULL,
  373. !         &proc_dointvec_minmax, &sysctl_intvec,
  374. !         NULL, &min_debug, &max_debug},
  375.       /* operation timeout */
  376. !     {2, "op-timeout-secs", &op_timeout_secs, sizeof(int), 0644, NULL,
  377. !         &proc_dointvec_minmax, &sysctl_intvec,
  378. !         NULL, &min_op_timeout_secs, &max_op_timeout_secs},
  379.       /* time interval for client side performance counters */
  380. !     {3, "perf-time-interval-secs", NULL, sizeof(int), 0644, NULL,
  381. !         &pvfs2_param_proc_handler, NULL, NULL, &perf_time_interval_extra, NULL},
  382.       /* time interval for client side performance counters */
  383. !     {4, "perf-history-size", NULL, sizeof(int), 0644, NULL,
  384. !         &pvfs2_param_proc_handler, NULL, NULL, &perf_history_size_extra, NULL},
  385.       /* reset performance counters */
  386. !     {5, "perf-counter-reset", NULL, sizeof(int), 0644, NULL,
  387. !         &pvfs2_param_proc_handler, NULL, NULL, &perf_reset_extra, NULL},
  388.       /* subdir for acache control */
  389. !     {6, "acache", NULL, 0, 0555, pvfs2_acache_table},
  390. !     {7, "perf-counters", NULL, 0, 0555, pvfs2_pc_table},
  391.       /* subdir for ncache control */
  392. !     {8, "ncache", NULL, 0, 0555, pvfs2_ncache_table},
  393.       {0}
  394.   };
  395.   static ctl_table fs_table[] = {
  396. !     {1, "pvfs2", NULL, 0, 0555, pvfs2_table},
  397.       {0}
  398.   };
  399.   #endif
  400. --- 260,449 ----
  401.   };
  402.   static int min_debug[] = {0}, max_debug[] = {GOSSIP_MAX_DEBUG};
  403.   static int min_op_timeout_secs[] = {0}, max_op_timeout_secs[] = {INT_MAX};
  404.   static ctl_table pvfs2_acache_table[] = {
  405.       /* controls acache timeout */
  406. !     {
  407. !         .ctl_name = 1,
  408. !         .procname = "timeout-msecs",
  409. !         .maxlen = sizeof(int),
  410. !         .mode = 0644,
  411. !         .proc_handler = &pvfs2_param_proc_handler,
  412. !         .extra1 = &acache_timeout_extra
  413. !     },
  414.       /* controls acache hard limit */
  415. !     {
  416. !         .ctl_name = 2,
  417. !         .procname = "hard-limit",
  418. !         .maxlen = sizeof(int),
  419. !         .mode = 0644,
  420. !         .proc_handler = &pvfs2_param_proc_handler,
  421. !         .extra1 = &acache_hard_extra
  422. !     },
  423.       /* controls acache soft limit */
  424. !     {
  425. !         .ctl_name = 3,
  426. !         .procname = "soft-limit",
  427. !         .maxlen = sizeof(int),
  428. !         .mode = 0644,
  429. !         .proc_handler = &pvfs2_param_proc_handler,
  430. !         .extra1 = &acache_soft_extra
  431. !     },
  432.       /* controls acache reclaim percentage */
  433. !     {
  434. !         .ctl_name = 4,
  435. !         .procname = "reclaim-percentage",
  436. !         .maxlen = sizeof(int),
  437. !         .mode = 0644,
  438. !         .proc_handler = &pvfs2_param_proc_handler,
  439. !         .extra1 = &acache_rec_extra,
  440. !     },
  441.       {0}
  442.   };
  443.   static ctl_table pvfs2_ncache_table[] = {
  444.       /* controls ncache timeout */
  445. !     {
  446. !         .ctl_name = 1,
  447. !         .procname = "timeout-msecs",
  448. !         .maxlen = sizeof(int),
  449. !         .mode = 0644,
  450. !         .proc_handler = &pvfs2_param_proc_handler,
  451. !         .extra1 = &ncache_timeout_extra
  452. !     },
  453.       /* controls ncache hard limit */
  454. !     {
  455. !         .ctl_name = 2,
  456. !         .procname = "hard-limit",
  457. !         .maxlen = sizeof(int),
  458. !         .mode = 0644,
  459. !         .proc_handler = &pvfs2_param_proc_handler,
  460. !         .extra1 = &ncache_hard_extra
  461. !     },
  462.       /* controls ncache soft limit */
  463. !     {
  464. !         .ctl_name = 3,
  465. !         .procname = "soft-limit",
  466. !         .maxlen = sizeof(int),
  467. !         .mode = 0644,
  468. !         .proc_handler = &pvfs2_param_proc_handler,
  469. !         .extra1 = &ncache_soft_extra
  470. !     },
  471.       /* controls ncache reclaim percentage */
  472. !     {
  473. !         .ctl_name = 4,
  474. !         .procname = "reclaim-percentage",
  475. !         .maxlen = sizeof(int),
  476. !         .mode = 0644,
  477. !         .proc_handler = &pvfs2_param_proc_handler,
  478. !         .extra1 = &ncache_rec_extra
  479. !     },
  480.       {0}
  481.   };
  482.   static int acache_perf_count = PVFS2_PERF_COUNT_REQUEST_ACACHE;
  483.   static int ncache_perf_count = PVFS2_PERF_COUNT_REQUEST_NCACHE;
  484.   static ctl_table pvfs2_pc_table[] = {
  485. !     {
  486. !         .ctl_name = 1,
  487. !         .procname = "acache",
  488. !         .maxlen = 4096,
  489. !         .mode = 0444,
  490. !         .proc_handler = pvfs2_pc_proc_handler,
  491. !         .extra1 = &acache_perf_count,
  492. !     },
  493. !     {
  494. !         .ctl_name = 2,
  495. !         .procname = "ncache",
  496. !         .maxlen = 4096,
  497. !         .mode = 0444,
  498. !         .proc_handler = pvfs2_pc_proc_handler,
  499. !         .extra1 = &ncache_perf_count
  500. !     },
  501.       {0}
  502.   };
  503.   static ctl_table pvfs2_table[] = {
  504.       /* controls debugging level */
  505. !     {
  506. !         .ctl_name = 1,
  507. !         .procname = "debug",
  508. !         .data = &gossip_debug_mask,
  509. !         .maxlen = sizeof(int),
  510. !         .mode = 0644,
  511. !         .proc_handler = &proc_dointvec_minmax, 
  512. !         .strategy = &sysctl_intvec,
  513. !         .extra1 = &min_debug,
  514. !         .extra2 = &max_debug
  515. !     },
  516.       /* operation timeout */
  517. !     {
  518. !         .ctl_name = 2,
  519. !         .procname = "op-timeout-secs",
  520. !         .data = &op_timeout_secs,
  521. !         .maxlen = sizeof(int),
  522. !         .mode = 0644,
  523. !         .proc_handler = &proc_dointvec_minmax,
  524. !         .strategy = &sysctl_intvec,
  525. !         .extra1 = &min_op_timeout_secs,
  526. !         .extra2 = &max_op_timeout_secs
  527. !     },
  528.       /* time interval for client side performance counters */
  529. !     {
  530. !         .ctl_name = 3,
  531. !         .procname = "perf-time-interval-secs",
  532. !         .maxlen = sizeof(int), 
  533. !         .mode = 0644,
  534. !         .proc_handler = &pvfs2_param_proc_handler,
  535. !         .extra1 = &perf_time_interval_extra
  536. !     },
  537.       /* time interval for client side performance counters */
  538. !     {
  539. !         .ctl_name = 4,
  540. !         .procname = "perf-history-size",
  541. !         .maxlen = sizeof(int),
  542. !         .mode = 0644,
  543. !         .proc_handler = &pvfs2_param_proc_handler,
  544. !         .extra1 = &perf_history_size_extra
  545. !     },
  546.       /* reset performance counters */
  547. !     {
  548. !         .ctl_name = 5,
  549. !         .procname = "perf-counter-reset",
  550. !         .maxlen = sizeof(int),
  551. !         .mode = 0644,
  552. !         .proc_handler = &pvfs2_param_proc_handler,
  553. !         .extra1 = &perf_reset_extra,
  554. !     },
  555.       /* subdir for acache control */
  556. !     {
  557. !         .ctl_name = 6,
  558. !         .procname = "acache",
  559. !         .maxlen = 0,
  560. !         .mode = 0555,
  561. !         .child = pvfs2_acache_table
  562. !     },
  563. !     {
  564. !         .ctl_name = 7,
  565. !         .procname = "perf-counters",
  566. !         .maxlen = 0,
  567. !         .mode = 0555,
  568. !         .child = pvfs2_pc_table
  569. !     },
  570.       /* subdir for ncache control */
  571. !     {
  572. !         .ctl_name = 8,
  573. !         .procname = "ncache",
  574. !         .maxlen = 0,
  575. !         .mode = 0555,
  576. !         .child = pvfs2_ncache_table
  577. !     },
  578.       {0}
  579.   };
  580.   static ctl_table fs_table[] = {
  581. !     {
  582. !         .ctl_name = 1,
  583. !         .procname = "pvfs2",
  584. !         .mode = 0555,
  585. !         .child = pvfs2_table
  586. !     },
  587.       {0}
  588.   };
  589.   #endif
  590. ***************
  591. *** 337,343 ****
  592. --- 453,463 ----
  593.   #ifdef CONFIG_SYSCTL
  594.       if (!fs_table_header)
  595.       {
  596. + #ifdef HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE
  597.           fs_table_header = register_sysctl_table(fs_table, 0);
  598. + #else
  599. +         fs_table_header = register_sysctl_table(fs_table);
  600. + #endif
  601.       }
  602.   #endif
  603.   
  604.  
  605.