[Pkg-lustre-svn-commit] updated: [922bd75] Removed not longer used patches from debian/patches
Patrick Winnertz
winnie at debian.org
Tue Mar 17 11:05:17 UTC 2009
The following commit has been merged in the master branch:
commit 922bd753e9fcbc540e4d3240b439732768f3b25e
Author: Patrick Winnertz <winnie at debian.org>
Date: Fri Mar 13 10:56:26 2009 +0100
Removed not longer used patches from debian/patches
Signed-off-by: Patrick Winnertz <winnie at debian.org>
diff --git a/debian/patches/bug16906_FULL_state_server_in_recovery.dpatch b/debian/patches/bug16906_FULL_state_server_in_recovery.dpatch
deleted file mode 100755
index 111d2f8..0000000
--- a/debian/patches/bug16906_FULL_state_server_in_recovery.dpatch
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## bug16906_FULL_state_server_in_recovery.dpatch by Patrick Winnertz <winnie at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch from bug 16906 (is closed in 1.6.6)
-
- at DPATCH@
-Index: lustre+chaos4/lustre/ptlrpc/import.c
-===================================================================
---- lustre+chaos4.orig/lustre/ptlrpc/import.c
-+++ lustre+chaos4/lustre/ptlrpc/import.c
-@@ -676,7 +676,17 @@ static int ptlrpc_connect_interpret(stru
- imp->imp_remote_handle =
- *lustre_msg_get_handle(request->rq_repmsg);
-
-- IMPORT_SET_STATE(imp, LUSTRE_IMP_FULL);
-+ /* Initial connects are allowed for clients with non-random
-+ * uuids when servers are in recovery. Simply signal the
-+ * servers replay is complete and wait in REPLAY_WAIT. */
-+ if (msg_flags & MSG_CONNECT_RECOVERING) {
-+ CDEBUG(D_HA, "connect to %s during recovery\n",
-+ obd2cli_tgt(imp->imp_obd));
-+ IMPORT_SET_STATE(imp, LUSTRE_IMP_REPLAY_LOCKS);
-+ } else {
-+ IMPORT_SET_STATE(imp, LUSTRE_IMP_FULL);
-+ }
-+
- spin_lock(&imp->imp_lock);
- if (imp->imp_invalid) {
- spin_unlock(&imp->imp_lock);
diff --git a/debian/patches/fix_late_release_pa_structure.dpatch b/debian/patches/fix_late_release_pa_structure.dpatch
deleted file mode 100755
index f1a7107..0000000
--- a/debian/patches/fix_late_release_pa_structure.dpatch
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## posix_acl.patch by Patrick Winnertz <winnie at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch to possibility fix the crash of the osts if the disk is to ~70% percent full
-
- at DPATCH@
---- ./ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch 30 Jun 2008 04:45:58 -0000 1.16
-+++ ./ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch 14 Jul 2008 10:41:08 -0000
-@@ -3624,7 +3624,7 @@ Index: linux-2.6.18-53.1.14/fs/ext3/mbal
- +
- + /* in this short window concurrent discard can set pa_deleted */
- + spin_lock(&pa->pa_lock);
--+ if (pa->pa_deleted == 0) {
-++ if (pa->pa_deleted == 1) {
- + spin_unlock(&pa->pa_lock);
- + return;
- + }
diff --git a/debian/patches/no-m64.dpatch b/debian/patches/no-m64.dpatch
deleted file mode 100755
index c33be2c..0000000
--- a/debian/patches/no-m64.dpatch
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## no-m64.dpatch by Goswin von Brederlow <goswin-v-b at web.de>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Remove test for -m64 and always use native mode for now
-## DP: FIXME: we need to test the kernel we build for and use -m32/64
-## DP: for modules if needed but not for userspace
-
- at DPATCH@
-diff -urNad lustre-1.6.5-rc2~/build/autoconf/lustre-build.m4 lustre-1.6.5-rc2/build/autoconf/lustre-build.m4
---- lustre-1.6.5-rc2~/build/autoconf/lustre-build.m4 2008-05-09 13:55:51.000000000 +0200
-+++ lustre-1.6.5-rc2/build/autoconf/lustre-build.m4 2008-05-09 13:55:59.000000000 +0200
-@@ -543,21 +543,21 @@
- fi
-
- # FIXME
--AC_CHECK_DECL([__i386__], [], [
--
--if test x$enable_bgl != xyes; then
--AC_MSG_CHECKING([if $CC accepts -m64])
--CC_save="$CC"
--CC="$CC -m64"
--AC_TRY_COMPILE([],[],[
-- AC_MSG_RESULT([yes])
--],[
-- AC_MSG_RESULT([no])
-- CC="$CC_save"
--])
--fi
--
--])
-+#AC_CHECK_DECL([__i386__], [], [
-+#
-+#if test x$enable_bgl != xyes; then
-+#AC_MSG_CHECKING([if $CC accepts -m64])
-+#CC_save="$CC"
-+#CC="$CC -m64"
-+#AC_TRY_COMPILE([],[],[
-+# AC_MSG_RESULT([yes])
-+#],[
-+# AC_MSG_RESULT([no])
-+# CC="$CC_save"
-+#])
-+#fi
-+#
-+#])
-
- CPPFLAGS="-I\$(top_builddir)/lnet/include -I\$(top_srcdir)/lnet/include -I\$(top_builddir)/lustre/include -I\$(top_srcdir)/lustre/include $CPPFLAGS"
-
diff --git a/debian/patches/operation_101_unconnected_mgs.dpatch b/debian/patches/operation_101_unconnected_mgs.dpatch
deleted file mode 100755
index a851de3..0000000
--- a/debian/patches/operation_101_unconnected_mgs.dpatch
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## remove-set_tunables.dpatch by Patrick Winnertz <winnie at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: patch from bugzilla (#16237) to fix lustre_mgs: operation 101 on
-## DP: unconnected MGS problem
-
- at DPATCH@
---- lustre+chaos4.orig/lustre/mgs/mgs_handler.c
-+++ lustre+chaos4/lustre/mgs/mgs_handler.c
-@@ -83,6 +83,25 @@ static int mgs_connect(struct lustre_han
- RETURN(rc);
- }
-
-+static int mgs_reconnect(struct obd_export *exp, struct obd_device *obd,
-+ struct obd_uuid *cluuid, struct obd_connect_data *data)
-+{
-+ ENTRY;
-+
-+ if (exp == NULL || obd == NULL || cluuid == NULL)
-+ RETURN(-EINVAL);
-+
-+ mgs_counter_incr(exp, LPROC_MGS_CONNECT);
-+
-+ if (data != NULL) {
-+ data->ocd_connect_flags &= MGS_CONNECT_SUPPORTED;
-+ exp->exp_connect_flags = data->ocd_connect_flags;
-+ data->ocd_version = LUSTRE_VERSION_CODE;
-+ }
-+
-+ RETURN(0);
-+}
-+
- static int mgs_disconnect(struct obd_export *exp)
- {
- int rc;
-@@ -702,6 +721,7 @@ out_free:
- static struct obd_ops mgs_obd_ops = {
- .o_owner = THIS_MODULE,
- .o_connect = mgs_connect,
-+ .o_reconnect = mgs_reconnect,
- .o_disconnect = mgs_disconnect,
- .o_setup = mgs_setup,
- .o_precleanup = mgs_precleanup,
diff --git a/debian/patches/patchless_support_2.6.24_configure_part.dpatch b/debian/patches/patchless_support_2.6.24_configure_part.dpatch
deleted file mode 100755
index 8cce361..0000000
--- a/debian/patches/patchless_support_2.6.24_configure_part.dpatch
+++ /dev/null
@@ -1,394 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## posix_acl.patch by Patrick Winnertz <winnie at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch which will enable 2.6.24 patchless support for lustre, taken from #14250
-
- at DPATCH@
-diff -urNad lustre-1.6.6~/lustre/autoconf/lustre-core.m4 lustre-1.6.6/lustre/autoconf/lustre-core.m4
---- lustre-1.6.6~/lustre/autoconf/lustre-core.m4 2008-11-26 12:46:12.000000000 +0100
-+++ lustre-1.6.6/lustre/autoconf/lustre-core.m4 2008-11-26 12:46:28.000000000 +0100
-@@ -1109,15 +1109,20 @@
- AC_DEFUN([LC_PAGE_CHECKED],
- [AC_MSG_CHECKING([kernel has PageChecked and SetPageChecked])
- LB_LINUX_TRY_COMPILE([
-- #include <linux/mm.h>
-- #include <linux/page-flags.h>
-+ #include <linux/autoconf.h>
-+#ifdef HAVE_LINUX_MMTYPES_H
-+ #include <linux/mm_types.h>
-+#endif
-+ #include <linux/page-flags.h>
- ],[
-- #ifndef PageChecked
-- #error PageChecked not defined in kernel
-- #endif
-- #ifndef SetPageChecked
-- #error SetPageChecked not defined in kernel
-- #endif
-+ struct page *p;
-+
-+ /* before 2.6.26 this define*/
-+ #ifndef PageChecked
-+ /* 2.6.26 use function instead of define for it */
-+ SetPageChecked(p);
-+ PageChecked(p);
-+ #endif
- ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_PAGE_CHECKED, 1,
-@@ -1271,11 +1276,149 @@
-
- # 2.6.23 extract nfs export related data into exportfs.h
- AC_DEFUN([LC_HAVE_EXPORTFS_H],
--[
--tmpfl="$CFLAGS"
--CFLAGS="$CFLAGS -I$LINUX_OBJ/include"
--AC_CHECK_HEADERS([linux/exportfs.h])
--CFLAGS="$tmpfl"
-+[LB_CHECK_FILE([$LINUX/include/linux/exportfs.h], [
-+ AC_DEFINE(HAVE_LINUX_EXPORTFS_H, 1,
-+ [kernel has include/exportfs.h])
-+],[
-+ AC_MSG_RESULT([no])
-+])
-+])
-+
-+# 2.6.23 have new page fault handling API
-+AC_DEFUN([LC_VM_OP_FAULT],
-+[AC_MSG_CHECKING([if kernel has .fault in vm_operation_struct])
-+LB_LINUX_TRY_COMPILE([
-+ #include <linux/mm.h>
-+],[
-+ struct vm_operations_struct op;
-+
-+ op.fault = NULL;
-+], [
-+ AC_MSG_RESULT([yes])
-+ AC_DEFINE(HAVE_VM_OP_FAULT, 1,
-+ [if kernel has .fault in vm_operation_struct])
-+],[
-+ AC_MSG_RESULT([no])
-+])
-+])
-+
-+#2.6.23 has new shrinker API
-+AC_DEFUN([LC_REGISTER_SHRINKER],
-+[AC_MSG_CHECKING([if kernel has register_shrinker])
-+LB_LINUX_TRY_COMPILE([
-+ #include <linux/mm.h>
-+],[
-+ register_shrinker(NULL);
-+], [
-+ AC_MSG_RESULT([yes])
-+ AC_DEFINE(HAVE_REGISTER_SHRINKER, 1,
-+ [if kernel has register_shrinker])
-+],[
-+ AC_MSG_RESULT([no])
-+])
-+])
-+
-+# 2.6.24 has bio_endio with 2 args
-+AC_DEFUN([LC_BIO_ENDIO_2ARG],
-+[AC_MSG_CHECKING([if kernel has bio_endio with 2 args])
-+LB_LINUX_TRY_COMPILE([
-+ #include <linux/bio.h>
-+],[
-+ bio_endio(NULL, 0);
-+], [
-+ AC_MSG_RESULT([yes])
-+ AC_DEFINE(HAVE_BIO_ENDIO_2ARG, 1,
-+ [if kernel has bio_endio with 2 args])
-+],[
-+ AC_MSG_RESULT([no])
-+])
-+])
-+
-+# 2.6.24 has new members in exports struct.
-+AC_DEFUN([LC_FH_TO_DENTRY],
-+[AC_MSG_CHECKING([if kernel has .fh_to_dentry member in export_operations struct])
-+LB_LINUX_TRY_COMPILE([
-+#ifdef HAVE_LINUX_EXPORTFS_H
-+ #include <linux/exportfs.h>
-+#else
-+ #include <linux/fs.h>
-+#endif
-+],[
-+ struct export_operations exp;
-+
-+ exp.fh_to_dentry = NULL;
-+], [
-+ AC_MSG_RESULT([yes])
-+ AC_DEFINE(HAVE_FH_TO_DENTRY, 1,
-+ [kernel has .fh_to_dentry member in export_operations struct])
-+],[
-+ AC_MSG_RESULT([no])
-+])
-+])
-+
-+# 2.6.24 need linux/mm_types.h included
-+AC_DEFUN([LC_HAVE_MMTYPES_H],
-+[LB_CHECK_FILE([$LINUX/include/linux/mm_types.h], [
-+ AC_DEFINE(HAVE_LINUX_MMTYPES_H, 1,
-+ [kernel has include/mm_types.h])
-+],[
-+ AC_MSG_RESULT([no])
-+])
-+])
-+
-+# 2.6.24 remove long aged procfs entry -> deleted member
-+AC_DEFUN([LC_PROCFS_DELETED],
-+[AC_MSG_CHECKING([if kernel has deleted member in procfs entry struct])
-+LB_LINUX_TRY_COMPILE([
-+ #include <linux/proc_fs.h>
-+],[
-+ struct proc_dir_entry pde;
-+
-+ pde.deleted = NULL;
-+], [
-+ AC_MSG_RESULT([yes])
-+ AC_DEFINE(HAVE_PROCFS_DELETED, 1,
-+ [kernel has deleted member in procfs entry struct])
-+],[
-+ AC_MSG_RESULT([no])
-+])
-+])
-+
-+# 2.6.26 isn't export set_fs_pwd and change paramter in fs struct
-+AC_DEFUN([LC_FS_STRUCT_USE_PATH],
-+[AC_MSG_CHECKING([fs_struct use path structure])
-+LB_LINUX_TRY_COMPILE([
-+ #include <asm/atomic.h>
-+ #include <linux/spinlock.h>
-+ #include <linux/fs_struct.h>
-+],[
-+ struct path path;
-+ struct fs_struct fs;
-+
-+ fs.pwd = path;
-+], [
-+ AC_MSG_RESULT([yes])
-+ AC_DEFINE(HAVE_FS_STRUCT_USE_PATH, 1,
-+ [fs_struct use path structure])
-+],[
-+ AC_MSG_RESULT([no])
-+])
-+])
-+
-+# 2.6.26 remove path_release and use path_put instead
-+AC_DEFUN([LC_PATH_RELEASE],
-+[AC_MSG_CHECKING([if path_release exist])
-+LB_LINUX_TRY_COMPILE([
-+ #include <linux/dcache.h>
-+ #include <linux/namei.h>
-+],[
-+ path_release(NULL);
-+],[
-+ AC_DEFINE(HAVE_PATH_RELEASE, 1, [path_release exist])
-+ AC_MSG_RESULT([yes])
-+],[
-+ AC_MSG_RESULT([no])
-+])
- ])
-
- #
-@@ -1377,6 +1520,19 @@
- LC_UNREGISTER_BLKDEV_RETURN_INT
- LC_KERNEL_SPLICE_READ
- LC_HAVE_EXPORTFS_H
-+ LC_VM_OP_FAULT
-+ LC_REGISTER_SHRINKER
-+
-+ # 2.6.24
-+ LC_HAVE_MMTYPES_H
-+ LC_BIO_ENDIO_2ARG
-+ LC_FH_TO_DENTRY
-+ LC_PROCFS_DELETED
-+
-+ # 2.6.26
-+ LC_FS_STRUCT_USE_PATH
-+ LC_RCU_LIST_SAFE
-+ LC_PATH_RELEASE
- ])
-
- #
-@@ -1609,6 +1765,7 @@
- ],[
- AC_MSG_RESULT([no])
- ])
-+
- ],[
- AC_MSG_RESULT([no])
- ])
-diff -urNad lustre-1.6.6~/lustre/include/linux/lustre_compat25.h lustre-1.6.6/lustre/include/linux/lustre_compat25.h
---- lustre-1.6.6~/lustre/include/linux/lustre_compat25.h 2008-11-26 12:46:12.000000000 +0100
-+++ lustre-1.6.6/lustre/include/linux/lustre_compat25.h 2008-11-26 12:50:19.000000000 +0100
-@@ -57,6 +57,28 @@
- #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14) */
-
- #ifndef HAVE_SET_FS_PWD
-+
-+#ifdef HAVE_FS_STRUCT_USE_PATH
-+static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
-+ struct dentry *dentry)
-+{
-+ struct path path;
-+ struct path old_pwd;
-+
-+ path.mnt = mnt;
-+ path.dentry = dentry;
-+ write_lock(&fs->lock);
-+ old_pwd = fs->pwd;
-+ path_get(&path);
-+ fs->pwd = path;
-+ write_unlock(&fs->lock);
-+
-+ if (old_pwd.dentry)
-+ path_put(&old_pwd);
-+}
-+
-+#else
-+
- static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
- struct dentry *dentry)
- {
-@@ -75,6 +97,7 @@
- mntput(old_pwdmnt);
- }
- }
-+#endif
- #else
- #define ll_set_fs_pwd set_fs_pwd
- #endif /* HAVE_SET_FS_PWD */
-@@ -554,6 +577,59 @@
- }
- #endif
-
-+//Not Sure if this part is really needed .... patch from HEAD
-+#ifdef HAVE_REGISTER_SHRINKER
-+typedef int (*shrinker_t)(int nr_to_scan, gfp_t gfp_mask);
-+
-+static inline
-+struct shrinker *set_shrinker(int seek, shrinker_t func)
-+{
-+ struct shrinker *s;
-+
-+ s = kmalloc(sizeof(*s), GFP_KERNEL);
-+ if (s == NULL)
-+ return (NULL);
-+
-+ s->shrink = func;
-+ s->seeks = seek;
-+
-+ register_shrinker(s);
-+
-+ return s;
-+}
-+
-+static inline
-+void remove_shrinker(struct shrinker *shrinker)
-+{
-+ if (shrinker == NULL)
-+ return;
-+
-+ unregister_shrinker(shrinker);
-+ kfree(shrinker);
-+}
-+#endif
-+
-+#ifdef HAVE_BIO_ENDIO_2ARG
-+#define cfs_bio_io_error(a,b) bio_io_error((a))
-+#define cfs_bio_endio(a,b,c) bio_endio((a),(c))
-+#else
-+#define cfs_bio_io_error(a,b) bio_io_error((a),(b))
-+#define cfs_bio_endio(a,b,c) bio_endio((a),(b),(c))
-+#endif
-+
-+#ifdef HAVE_FS_STRUCT_USE_PATH
-+#define cfs_fs_pwd(fs) ((fs)->pwd.dentry)
-+#define cfs_fs_mnt(fs) ((fs)->pwd.mnt)
-+#else
-+#define cfs_fs_pwd(fs) ((fs)->pwd)
-+#define cfs_fs_mnt(fs) ((fs)->pwdmnt)
-+#endif
-+
-+#ifndef list_for_each_safe_rcu
-+#define list_for_each_safe_rcu(a,b,c) list_for_each_rcu(b, c)
-+#endif
-+//Unsure Part ends here :)
-+
- #ifdef HAVE_INVALIDATE_BDEV_2ARG
- #define ll_invalidate_bdev(a,b) invalidate_bdev((a),(b))
- #else
-diff -urNad lustre-1.6.6~/lustre/llite/symlink.c lustre-1.6.6/lustre/llite/symlink.c
---- lustre-1.6.6~/lustre/llite/symlink.c 2008-11-26 12:46:12.000000000 +0100
-+++ lustre-1.6.6/lustre/llite/symlink.c 2008-11-26 12:46:28.000000000 +0100
-@@ -171,8 +171,12 @@
- rc = ll_readlink_internal(inode, &request, &symname);
- up(&lli->lli_size_sem);
- if (rc) {
-+#ifdef HAVE_PATH_RELEASE
- path_release(nd); /* Kernel assumes that ->follow_link()
- releases nameidata on error */
-+#else
-+ path_put(&nd->path);
-+#endif
- GOTO(out, rc);
- }
-
-diff -urNad lustre-1.6.6~/lustre/lvfs/lvfs_linux.c lustre-1.6.6/lustre/lvfs/lvfs_linux.c
---- lustre-1.6.6~/lustre/lvfs/lvfs_linux.c 2008-11-26 12:46:12.000000000 +0100
-+++ lustre-1.6.6/lustre/lvfs/lvfs_linux.c 2008-11-26 12:46:28.000000000 +0100
-@@ -148,10 +148,10 @@
- */
-
- save->fs = get_fs();
-- LASSERT(atomic_read(¤t->fs->pwd->d_count));
-+ LASSERT(atomic_read(&cfs_fs_pwd(current->fs)->d_count));
- LASSERT(atomic_read(&new_ctx->pwd->d_count));
-- save->pwd = dget(current->fs->pwd);
-- save->pwdmnt = mntget(current->fs->pwdmnt);
-+ save->pwd = dget(cfs_fs_pwd(current->fs));
-+ save->pwdmnt = mntget(cfs_fs_mnt(current->fs));
- save->luc.luc_umask = current->fs->umask;
-
- LASSERT(save->pwd);
-@@ -205,10 +205,10 @@
- atomic_read(¤t->fs->pwdmnt->mnt_count));
- */
-
-- LASSERTF(current->fs->pwd == new_ctx->pwd, "%p != %p\n",
-- current->fs->pwd, new_ctx->pwd);
-- LASSERTF(current->fs->pwdmnt == new_ctx->pwdmnt, "%p != %p\n",
-- current->fs->pwdmnt, new_ctx->pwdmnt);
-+ LASSERTF(cfs_fs_pwd(current->fs) == new_ctx->pwd, "%p != %p\n",
-+ cfs_fs_pwd(current->fs), new_ctx->pwd);
-+ LASSERTF(cfs_fs_mnt(current->fs) == new_ctx->pwdmnt, "%p != %p\n",
-+ cfs_fs_mnt(current->fs), new_ctx->pwdmnt);
-
- set_fs(saved->fs);
- ll_set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd);
-diff -urNad lustre-1.6.6~/lustre/mgc/mgc_request.c lustre-1.6.6/lustre/mgc/mgc_request.c
---- lustre-1.6.6~/lustre/mgc/mgc_request.c 2008-11-26 12:46:12.000000000 +0100
-+++ lustre-1.6.6/lustre/mgc/mgc_request.c 2008-11-26 12:46:28.000000000 +0100
-@@ -410,7 +410,7 @@
- obd->obd_lvfs_ctxt.fs = get_ds();
-
- push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-- dentry = lookup_one_len(MOUNT_CONFIGS_DIR, current->fs->pwd,
-+ dentry = lookup_one_len(MOUNT_CONFIGS_DIR, cfs_fs_pwd(current->fs),
- strlen(MOUNT_CONFIGS_DIR));
- pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- if (IS_ERR(dentry)) {
-diff -urNad lustre-1.6.6~/lustre/ptlrpc/service.c lustre-1.6.6/lustre/ptlrpc/service.c
---- lustre-1.6.6~/lustre/ptlrpc/service.c 2008-11-26 12:46:12.000000000 +0100
-+++ lustre-1.6.6/lustre/ptlrpc/service.c 2008-11-26 12:46:28.000000000 +0100
-@@ -1268,7 +1268,7 @@
- cfs_daemonize(name);
- exit_fs(cfs_current());
- current->fs = fs;
-- ll_set_fs_pwd(current->fs, init_task.fs->pwdmnt, init_task.fs->pwd);
-+ ll_set_fs_pwd(current->fs, cfs_fs_mnt(init_task.fs), cfs_fs_pwd(init_task.fs));
- }
-
- static void
diff --git a/debian/patches/patchless_support_2.6.24_lnet_part.dpatch b/debian/patches/patchless_support_2.6.24_lnet_part.dpatch
deleted file mode 100755
index c5a9a98..0000000
--- a/debian/patches/patchless_support_2.6.24_lnet_part.dpatch
+++ /dev/null
@@ -1,2166 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## posix_acl.patch by Patrick Winnertz <winnie at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch which will enable 2.6.24 patchless support for lustre, taken from #14250
-
- at DPATCH@
-diff -urNad lustre-1.6.6~/lnet/autoconf/lustre-lnet.m4 lustre-1.6.6/lnet/autoconf/lustre-lnet.m4
---- lustre-1.6.6~/lnet/autoconf/lustre-lnet.m4 2008-09-03 11:16:27.000000000 +0200
-+++ lustre-1.6.6/lnet/autoconf/lustre-lnet.m4 2008-11-26 12:24:08.000000000 +0100
-@@ -1290,6 +1290,58 @@
- ])
- ])
-
-+# 2.6.24 request not use real numbers for ctl_name
-+AC_DEFUN([LN_SYSCTL_UNNUMBERED],
-+[AC_MSG_CHECKING([for CTL_UNNUMBERED])
-+LB_LINUX_TRY_COMPILE([
-+ #include <linux/sysctl.h>
-+],[
-+ #ifndef CTL_UNNUMBERED
-+ #error CTL_UNNUMBERED not exist in kernel
-+ #endif
-+],[
-+ AC_MSG_RESULT(yes)
-+ AC_DEFINE(HAVE_SYSCTL_UNNUMBERED, 1,
-+ [sysctl has CTL_UNNUMBERED])
-+],[
-+ AC_MSG_RESULT(NO)
-+])
-+])
-+
-+# 2.6.24 lost scatterlist->page
-+AC_DEFUN([LN_SCATTERLIST_SETPAGE],
-+[AC_MSG_CHECKING([for exist sg_set_page])
-+LB_LINUX_TRY_COMPILE([
-+ #include <linux/scatterlist.h>
-+],[
-+ sg_set_page(NULL,NULL,0,0);
-+],[
-+ AC_MSG_RESULT(yes)
-+ AC_DEFINE(HAVE_SCATTERLIST_SETPAGE, 1,
-+ [struct scatterlist has page member])
-+],[
-+ AC_MSG_RESULT(NO)
-+])
-+])
-+
-+# 2.6.26 use int instead of atomic for sem.count
-+AC_DEFUN([LN_SEM_COUNT],
-+[AC_MSG_CHECKING([atomic sem.count])
-+LB_LINUX_TRY_COMPILE([
-+ #include <asm/semaphore.h>
-+],[
-+ struct semaphore s;
-+
-+ atomic_read(&s.count);
-+],[
-+ AC_MSG_RESULT(yes)
-+ AC_DEFINE(HAVE_SEM_COUNT_ATOMIC, 1,
-+ [semaphore counter is atomic])
-+],[
-+ AC_MSG_RESULT(NO)
-+])
-+])
-+
- #
- # LN_PROG_LINUX
- #
-@@ -1333,6 +1385,11 @@
- LN_KMEM_CACHE
- # 2.6.23
- LN_KMEM_CACHE_CREATE_DTOR
-+# 2.6.24
-+LN_SYSCTL_UNNUMBERED
-+LN_SCATTERLIST_SETPAGE
-+# 2.6.26
-+LN_SEM_COUNT
- ])
-
- #
-diff -urNad lustre-1.6.6~/lnet/include/libcfs/linux/kp30.h lustre-1.6.6/lnet/include/libcfs/linux/kp30.h
---- lustre-1.6.6~/lnet/include/libcfs/linux/kp30.h 2008-08-07 12:23:36.000000000 +0200
-+++ lustre-1.6.6/lnet/include/libcfs/linux/kp30.h 2008-11-26 12:24:08.000000000 +0100
-@@ -142,6 +142,12 @@
- #endif
- #define LASSERT_SEM_LOCKED(sem) LASSERT(down_trylock(sem) != 0)
-
-+#ifdef HAVE_SEM_COUNT_ATOMIC
-+#define SEM_COUNT(sem) (atomic_read(&(sem)->count))
-+#else
-+#define SEM_COUNT(sem) ((sem)->count)
-+#endif
-+
- #define LIBCFS_PANIC(msg) panic(msg)
-
- /* ------------------------------------------------------------------- */
-diff -urNad lustre-1.6.6~/lnet/include/libcfs/linux/linux-prim.h lustre-1.6.6/lnet/include/libcfs/linux/linux-prim.h
---- lustre-1.6.6~/lnet/include/libcfs/linux/linux-prim.h 2008-08-07 12:23:36.000000000 +0200
-+++ lustre-1.6.6/lnet/include/libcfs/linux/linux-prim.h 2008-11-26 12:24:08.000000000 +0100
-@@ -84,6 +84,17 @@
- #endif
- #define cfs_unregister_sysctl_table(t) unregister_sysctl_table(t)
-
-+#define DECLARE_PROC_HANDLER(name) \
-+static int \
-+LL_PROC_PROTO(name) \
-+{ \
-+ DECLARE_LL_PROC_PPOS_DECL; \
-+ \
-+ return proc_call_handler(table->data, write, \
-+ ppos, buffer, lenp, \
-+ __##name); \
-+}
-+
- /*
- * Symbol register
- */
-diff -urNad lustre-1.6.6~/lnet/klnds/gmlnd/gmlnd.h lustre-1.6.6/lnet/klnds/gmlnd/gmlnd.h
---- lustre-1.6.6~/lnet/klnds/gmlnd/gmlnd.h 2008-08-07 12:23:48.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/gmlnd/gmlnd.h 2008-11-26 12:24:08.000000000 +0100
-@@ -82,6 +82,7 @@
- #include "libcfs/kp30.h"
- #include "lnet/lnet.h"
- #include "lnet/lib-lnet.h"
-+#include "lnet/lnet-sysctl.h"
-
- /* undefine these before including the GM headers which clash */
- #undef PACKAGE_BUGREPORT
-diff -urNad lustre-1.6.6~/lnet/klnds/gmlnd/gmlnd_module.c lustre-1.6.6/lnet/klnds/gmlnd/gmlnd_module.c
---- lustre-1.6.6~/lnet/klnds/gmlnd/gmlnd_module.c 2008-08-07 12:23:50.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/gmlnd/gmlnd_module.c 2008-11-26 12:24:08.000000000 +0100
-@@ -78,9 +78,34 @@
- };
-
- #if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-+
-+#ifndef HAVE_SYSCTL_UNNUMBERED
-+
-+enum {
-+ GMLND_PORT = 1,
-+ GMLND_NTX,
-+ GMLND_CREDITS,
-+ GMLND_PEERCREDITS,
-+ GMLND_NLARGE_TX_BUFS,
-+ GMLND_NRX_SMALL,
-+ GMLND_NRX_LARGE
-+};
-+
-+#else
-+
-+#define GMLND_PORT CTL_UNNUMBERED
-+#define GMLND_NTX CTL_UNNUMBERED
-+#define GMLND_CREDITS CTL_UNNUMBERED
-+#define GMLND_PEERCREDITS CTL_UNNUMBERED
-+#define GMLND_NLARGE_TX_BUFS CTL_UNNUMBERED
-+#define GMLND_NRX_SMALL CTL_UNNUMBERED
-+#define GMLND_NRX_LARGE CTL_UNNUMBERED
-+
-+#endif
-+
- static cfs_sysctl_table_t gmnal_ctl_table[] = {
- {
-- .ctl_name = 1,
-+ .ctl_name = GMLND_PORT,
- .procname = "port",
- .data = &port,
- .maxlen = sizeof (int),
-@@ -88,7 +113,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 2,
-+ .ctl_name = GMLND_NTX,
- .procname = "ntx",
- .data = &ntx,
- .maxlen = sizeof (int),
-@@ -96,7 +121,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 3,
-+ .ctl_name = GMLND_CREDITS,
- .procname = "credits",
- .data = &credits,
- .maxlen = sizeof (int),
-@@ -104,7 +129,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 4,
-+ .ctl_name = GMLND_PEERCREDITS,
- .procname = "peer_credits",
- .data = &peer_credits,
- .maxlen = sizeof (int),
-@@ -112,7 +137,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 5,
-+ .ctl_name = GMLND_NLARGE_TX_BUFS,
- .procname = "nlarge_tx_bufs",
- .data = &nlarge_tx_bufs,
- .maxlen = sizeof (int),
-@@ -120,7 +145,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 6,
-+ .ctl_name = GMLND_NRX_SMALL,
- .procname = "nrx_small",
- .data = &nrx_small,
- .maxlen = sizeof (int),
-@@ -128,7 +153,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 7,
-+ .ctl_name = GMLND_NRX_LARGE,
- .procname = "nrx_large",
- .data = &nrx_large,
- .maxlen = sizeof (int),
-@@ -140,7 +165,7 @@
-
- static cfs_sysctl_table_t gmnal_top_ctl_table[] = {
- {
-- .ctl_name = 207,
-+ .ctl_name = CTL_GMLND,
- .procname = "gmnal",
- .data = NULL,
- .maxlen = 0,
-diff -urNad lustre-1.6.6~/lnet/klnds/iiblnd/iiblnd.h lustre-1.6.6/lnet/klnds/iiblnd/iiblnd.h
---- lustre-1.6.6~/lnet/klnds/iiblnd/iiblnd.h 2008-08-07 12:23:53.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/iiblnd/iiblnd.h 2008-11-26 12:24:08.000000000 +0100
-@@ -71,6 +71,7 @@
- #include <libcfs/kp30.h>
- #include <lnet/lnet.h>
- #include <lnet/lib-lnet.h>
-+#include <lnet/lnet-sysctl.h>
-
- #include <linux/iba/ibt.h>
-
-diff -urNad lustre-1.6.6~/lnet/klnds/iiblnd/iiblnd_modparams.c lustre-1.6.6/lnet/klnds/iiblnd/iiblnd_modparams.c
---- lustre-1.6.6~/lnet/klnds/iiblnd/iiblnd_modparams.c 2008-08-07 12:23:56.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/iiblnd/iiblnd_modparams.c 2008-11-26 12:24:08.000000000 +0100
-@@ -119,9 +119,47 @@
- * not to truncate the printout; it only needs to be the actual size of the
- * string buffer if we allow writes (and we don't) */
-
-+#ifdef HAVE_SYSCTL_UNNUMBERED
-+
-+enum {
-+ IIBLND_IPIF_BASENAME = 1,
-+ IIBLND_SERVICE_NAME,
-+ IIBLND_SERVICE_NUMBER,
-+ IIBLND_RECONNECT_MIN,
-+ IIBLND_RECONNECT_MAX,
-+ IIBLND_CONCURRENT_PEERS,
-+ IIBLND_CKSUM,
-+ IIBLND_TIMEOUT,
-+ IIBLND_NTX,
-+ IIBLND_CREDITS,
-+ IIBLND_PEER_CREDITS,
-+ IIBLND_SD_RETRIES,
-+ IIBLND_KEEPALIVE,
-+ IIBLND_CONCURRENT_SENDS
-+};
-+
-+#else
-+
-+#define IIBLND_IPIF_BASENAME CTL_UNNUMBERED
-+#define IIBLND_SERVICE_NAME CTL_UNNUMBERED
-+#define IIBLND_SERVICE_NUMBER CTL_UNNUMBERED
-+#define IIBLND_RECONNECT_MIN CTL_UNNUMBERED
-+#define IIBLND_RECONNECT_MAX CTL_UNNUMBERED
-+#define IIBLND_CONCURRENT_PEERS CTL_UNNUMBERED
-+#define IIBLND_CKSUM CTL_UNNUMBERED
-+#define IIBLND_TIMEOUT CTL_UNNUMBERED
-+#define IIBLND_NTX CTL_UNNUMBERED
-+#define IIBLND_CREDITS CTL_UNNUMBERED
-+#define IIBLND_PEER_CREDITS CTL_UNNUMBERED
-+#define IIBLND_SD_RETRIES CTL_UNNUMBERED
-+#define IIBLND_KEEPALIVE CTL_UNNUMBERED
-+#define IIBLND_CONCURRENT_SENDS CTL_UNNUMBERED
-+
-+#endif
-+
- static cfs_sysctl_table_t kibnal_ctl_table[] = {
- {
-- .ctl_name = 1,
-+ .ctl_name = IBBLND_IPIF_BASENAME,
- .procname = "ipif_basename",
- .data = &ipif_basename,
- .maxlen = 1024,
-@@ -129,7 +167,7 @@
- .proc_handler = &proc_dostring
- },
- {
-- .ctl_name = 2,
-+ .ctl_name = IIBLND_SERVICE_NAME,
- .procname = "service_name",
- .data = &service_name,
- .maxlen = 1024,
-@@ -137,7 +175,7 @@
- .proc_handler = &proc_dostring
- },
- {
-- .ctl_name = 3,
-+ .ctl_name = IIBLND_SERVICE_NUMBER,
- .procname = "service_number",
- .data = &service_number,
- .maxlen = sizeof(int),
-@@ -145,7 +183,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 4,
-+ .ctl_name = IIBLND_RECONNECT_MIN,
- .procname = "min_reconnect_interval",
- .data = &min_reconnect_interval,
- .maxlen = sizeof(int),
-@@ -153,7 +191,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 5,
-+ .ctl_name = IIBLND_RECONNECT_MAX,
- .procname = "max_reconnect_interval",
- .data = &max_reconnect_interval,
- .maxlen = sizeof(int),
-@@ -161,7 +199,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 6,
-+ .ctl_name = IIBLND_CONCURRENT_PEERS,
- .procname = "concurrent_peers",
- .data = &concurrent_peers,
- .maxlen = sizeof(int),
-@@ -169,7 +207,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 7,
-+ .ctl_name = IIBLND_CKSUM,
- .procname = "cksum",
- .data = &cksum,
- .maxlen = sizeof(int),
-@@ -177,7 +215,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 8,
-+ .ctl_name = IIBLND_TIMEOUT,
- .procname = "timeout",
- .data = &timeout,
- .maxlen = sizeof(int),
-@@ -185,7 +223,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 9,
-+ .ctl_name = IIBLND_NTX,
- .procname = "ntx",
- .data = &ntx,
- .maxlen = sizeof(int),
-@@ -193,7 +231,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 10,
-+ .ctl_name = IIBLND_CREDITS,
- .procname = "credits",
- .data = &credits,
- .maxlen = sizeof(int),
-@@ -201,7 +239,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 11,
-+ .ctl_name = IIBLND_PEER_CREDITS,
- .procname = "peer_credits",
- .data = &peer_credits,
- .maxlen = sizeof(int),
-@@ -209,7 +247,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 12,
-+ .ctl_name = IIBLND_SD_RETRIES,
- .procname = "sd_retries",
- .data = &sd_retries,
- .maxlen = sizeof(int),
-@@ -217,7 +255,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 13,
-+ .ctl_name = IIBLND_KEEPALIVE,
- .procname = "keepalive",
- .data = &keepalive,
- .maxlen = sizeof(int),
-@@ -225,7 +263,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 14,
-+ .ctl_name = IIBLND_CONCURRENT_SENDS,
- .procname = "concurrent_sends",
- .data = &concurrent_sends,
- .maxlen = sizeof(int),
-@@ -237,7 +275,7 @@
-
- static cfs_sysctl_table_t kibnal_top_ctl_table[] = {
- {
-- .ctl_name = 203,
-+ .ctl_name = CTL_IIBLND,
- .procname = "openibnal",
- .data = NULL,
- .maxlen = 0,
-diff -urNad lustre-1.6.6~/lnet/klnds/mxlnd/mxlnd.h lustre-1.6.6/lnet/klnds/mxlnd/mxlnd.h
---- lustre-1.6.6~/lnet/klnds/mxlnd/mxlnd.h 2008-08-07 12:23:57.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/mxlnd/mxlnd.h 2008-11-26 12:24:08.000000000 +0100
-@@ -85,6 +85,7 @@
- #include "libcfs/kp30.h"
- #include "lnet/lnet.h"
- #include "lnet/lib-lnet.h"
-+#include <lnet/lnet-sysctl.h>
-
- #define MX_KERNEL 1
- #include "mx_extensions.h"
-diff -urNad lustre-1.6.6~/lnet/klnds/o2iblnd/o2iblnd.h lustre-1.6.6/lnet/klnds/o2iblnd/o2iblnd.h
---- lustre-1.6.6~/lnet/klnds/o2iblnd/o2iblnd.h 2008-08-07 12:23:59.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/o2iblnd/o2iblnd.h 2008-11-26 12:24:08.000000000 +0100
-@@ -76,6 +76,7 @@
- #include <libcfs/kp30.h>
- #include <lnet/lnet.h>
- #include <lnet/lib-lnet.h>
-+#include <lnet/lnet-sysctl.h>
-
- #if !HAVE_GFP_T
- typedef int gfp_t;
-@@ -773,3 +774,14 @@
- int kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed,
- unsigned int niov, struct iovec *iov, lnet_kiov_t *kiov,
- unsigned int offset, unsigned int mlen, unsigned int rlen);
-+
-+/* compat macroses */
-+#ifndef HAVE_SCATTERLIST_SETPAGE
-+static inline void sg_set_page(struct scatterlist *sg, struct page *page,
-+ unsigned int len, unsigned int offset)
-+{
-+ sg->page = page;
-+ sg->offset = offset;
-+ sg->length = len;
-+}
-+#endif
-diff -urNad lustre-1.6.6~/lnet/klnds/o2iblnd/o2iblnd_cb.c lustre-1.6.6/lnet/klnds/o2iblnd/o2iblnd_cb.c
---- lustre-1.6.6~/lnet/klnds/o2iblnd/o2iblnd_cb.c 2008-08-07 12:24:00.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/o2iblnd/o2iblnd_cb.c 2008-11-26 12:24:08.000000000 +0100
-@@ -643,9 +643,7 @@
- fragnob = min((int)(iov->iov_len - offset), nob);
- fragnob = min(fragnob, (int)PAGE_SIZE - page_offset);
-
-- sg->page = page;
-- sg->offset = page_offset;
-- sg->length = fragnob;
-+ sg_set_page(sg, page, fragnob, page_offset);
- sg++;
-
- if (offset + fragnob < iov->iov_len) {
-@@ -708,11 +706,10 @@
- fragnob = min((int)(kiov->kiov_len - offset), nob);
-
- memset(sg, 0, sizeof(*sg));
-- sg->page = kiov->kiov_page;
-- sg->offset = kiov->kiov_offset + offset;
-- sg->length = fragnob;
-+ sg_set_page(sg, kiov->kiov_page, fragnob,
-+ kiov->kiov_offset + offset);
- sg++;
--
-+
- offset = 0;
- kiov++;
- nkiov--;
-diff -urNad lustre-1.6.6~/lnet/klnds/o2iblnd/o2iblnd_modparams.c lustre-1.6.6/lnet/klnds/o2iblnd/o2iblnd_modparams.c
---- lustre-1.6.6~/lnet/klnds/o2iblnd/o2iblnd_modparams.c 2008-08-07 12:24:01.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/o2iblnd/o2iblnd_modparams.c 2008-11-26 12:24:08.000000000 +0100
-@@ -130,9 +130,48 @@
-
- static char ipif_basename_space[32];
-
-+#ifndef HAVE_SYSCTL_UNNUMBERED
-+
-+enum {
-+ O2IBLND_SERVICE = 1,
-+ O2IBLND_CKSUM,
-+ O2IBLND_TIMEOUT,
-+ O2IBLND_NTX,
-+ O2IBLND_CREDITS,
-+ O2IBLND_PEER_CREDITS,
-+ O2IBLND_IPIF_BASENAME,
-+ O2IBLND_RETRY_COUNT,
-+ O2IBLND_RNR_RETRY_COUNT,
-+ O2IBLND_KEEPALIVE,
-+ O2IBLND_CONCURRENT_SENDS,
-+ O2IBLND_IB_MTU,
-+ O2IBLND_FMR_POOL_SIZE,
-+ O2IBLND_FMR_FLUSH_TRIGGER,
-+ O2IBLND_FMR_CACHE
-+};
-+#else
-+
-+#define O2IBLND_SERVICE CTL_UNNUMBERED
-+#define O2IBLND_CKSUM CTL_UNNUMBERED
-+#define O2IBLND_TIMEOUT CTL_UNNUMBERED
-+#define O2IBLND_NTX CTL_UNNUMBERED
-+#define O2IBLND_CREDITS CTL_UNNUMBERED
-+#define O2IBLND_PEER_CREDITS CTL_UNNUMBERED
-+#define O2IBLND_IPIF_BASENAME CTL_UNNUMBERED
-+#define O2IBLND_RETRY_COUNT CTL_UNNUMBERED
-+#define O2IBLND_RNR_RETRY_COUNT CTL_UNNUMBERED
-+#define O2IBLND_KEEPALIVE CTL_UNNUMBERED
-+#define O2IBLND_CONCURRENT_SENDS CTL_UNNUMBERED
-+#define O2IBLND_IB_MTU CTL_UNNUMBERED
-+#define O2IBLND_FMR_POOL_SIZE CTL_UNNUMBERED
-+#define O2IBLND_FMR_FLUSH_TRIGGER CTL_UNNUMBERED
-+#define O2IBLND_FMR_CACHE CTL_UNNUMBERED
-+
-+#endif
-+
- static cfs_sysctl_table_t kiblnd_ctl_table[] = {
- {
-- .ctl_name = 1,
-+ .ctl_name = O2IBLND_SERVICE,
- .procname = "service",
- .data = &service,
- .maxlen = sizeof(int),
-@@ -140,7 +179,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 2,
-+ .ctl_name = O2IBLND_CKSUM,
- .procname = "cksum",
- .data = &cksum,
- .maxlen = sizeof(int),
-@@ -148,7 +187,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 3,
-+ .ctl_name = O2IBLND_TIMEOUT,
- .procname = "timeout",
- .data = &timeout,
- .maxlen = sizeof(int),
-@@ -156,7 +195,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 4,
-+ .ctl_name = O2IBLND_NTX,
- .procname = "ntx",
- .data = &ntx,
- .maxlen = sizeof(int),
-@@ -164,7 +203,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 5,
-+ .ctl_name = O2IBLND_CREDITS,
- .procname = "credits",
- .data = &credits,
- .maxlen = sizeof(int),
-@@ -172,7 +211,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 6,
-+ .ctl_name = O2IBLND_PEER_CREDITS,
- .procname = "peer_credits",
- .data = &peer_credits,
- .maxlen = sizeof(int),
-@@ -180,7 +219,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 7,
-+ .ctl_name = O2IBLND_IPIF_BASENAME,
- .procname = "ipif_name",
- .data = ipif_basename_space,
- .maxlen = sizeof(ipif_basename_space),
-@@ -188,7 +227,7 @@
- .proc_handler = &proc_dostring
- },
- {
-- .ctl_name = 8,
-+ .ctl_name = O2IBLND_RETRY_COUNT,
- .procname = "retry_count",
- .data = &retry_count,
- .maxlen = sizeof(int),
-@@ -196,7 +235,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 9,
-+ .ctl_name = O2IBLND_RNR_RETRY_COUNT,
- .procname = "rnr_retry_count",
- .data = &rnr_retry_count,
- .maxlen = sizeof(int),
-@@ -204,7 +243,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 10,
-+ .ctl_name = O2IBLND_KEEPALIVE,
- .procname = "keepalive",
- .data = &keepalive,
- .maxlen = sizeof(int),
-@@ -212,7 +251,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 11,
-+ .ctl_name = O2IBLND_CONCURRENT_SENDS,
- .procname = "concurrent_sends",
- .data = &concurrent_sends,
- .maxlen = sizeof(int),
-@@ -220,7 +259,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 12,
-+ .ctl_name = O2IBLND_IB_MTU,
- .procname = "ib_mtu",
- .data = &ib_mtu,
- .maxlen = sizeof(int),
-@@ -229,7 +268,7 @@
- },
- #if IBLND_MAP_ON_DEMAND
- {
-- .ctl_name = 13,
-+ .ctl_name = O2IBLND_FMR_POOL_SIZE,
- .procname = "fmr_pool_size",
- .data = &fmr_pool_size,
- .maxlen = sizeof(int),
-@@ -237,7 +276,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 14,
-+ .ctl_name = O2IBLND_FMR_FLUSH_TRIGGER,
- .procname = "fmr_flush_trigger",
- .data = &fmr_flush_trigger,
- .maxlen = sizeof(int),
-@@ -245,7 +284,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 15,
-+ .ctl_name = O2IBLND_FMR_CACHE,
- .procname = "fmr_cache",
- .data = &fmr_cache,
- .maxlen = sizeof(int),
-@@ -258,7 +297,7 @@
-
- static cfs_sysctl_table_t kiblnd_top_ctl_table[] = {
- {
-- .ctl_name = 203,
-+ .ctl_name = CTL_O2IBLND,
- .procname = "o2iblnd",
- .data = NULL,
- .maxlen = 0,
-diff -urNad lustre-1.6.6~/lnet/klnds/openiblnd/openiblnd.h lustre-1.6.6/lnet/klnds/openiblnd/openiblnd.h
---- lustre-1.6.6~/lnet/klnds/openiblnd/openiblnd.h 2008-08-07 12:24:03.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/openiblnd/openiblnd.h 2008-11-26 12:24:08.000000000 +0100
-@@ -74,6 +74,7 @@
- #include <libcfs/kp30.h>
- #include <lnet/lnet.h>
- #include <lnet/lib-lnet.h>
-+#include <lnet/lnet-sysctl.h>
-
- #include <ts_ib_core.h>
- #include <ts_ib_cm.h>
-diff -urNad lustre-1.6.6~/lnet/klnds/openiblnd/openiblnd_modparams.c lustre-1.6.6/lnet/klnds/openiblnd/openiblnd_modparams.c
---- lustre-1.6.6~/lnet/klnds/openiblnd/openiblnd_modparams.c 2008-08-07 12:24:05.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/openiblnd/openiblnd_modparams.c 2008-11-26 12:24:08.000000000 +0100
-@@ -100,9 +100,39 @@
-
- #if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-
-+#ifndef HAVE_SYSCTL_UNNUMBERED
-+enum {
-+ KIBNAL_IPIF_BASENAME = 1,
-+ KIBNAL_N_CONND,
-+ KIBNAL_RECONNECT_MIN,
-+ KIBNAL_RECONNECT_MAX,
-+ KIBNAL_CONCURRENT_PEERS,
-+ KIBNAL_CKSUM,
-+ KIBNAL_TIMEOUT,
-+ KIBNAL_NTX,
-+ KIBNAL_CREDITS,
-+ KIBNAL_PEER_CREDITS,
-+ KIBNAL_KEEPALIVE
-+};
-+#else
-+
-+#define KIBNAL_IPIF_BASENAME CTL_UNNUMBERED
-+#define KIBNAL_N_CONND CTL_UNNUMBERED
-+#define KIBNAL_RECONNECT_MIN CTL_UNNUMBERED
-+#define KIBNAL_RECONNECT_MAX CTL_UNNUMBERED
-+#define KIBNAL_CONCURRENT_PEERS CTL_UNNUMBERED
-+#define KIBNAL_CKSUM CTL_UNNUMBERED
-+#define KIBNAL_TIMEOUT CTL_UNNUMBERED
-+#define KIBNAL_NTX CTL_UNNUMBERED
-+#define KIBNAL_CREDITS CTL_UNNUMBERED
-+#define KIBNAL_PEER_CREDITS CTL_UNNUMBERED
-+#define KIBNAL_KEEPALIVE CTL_UNNUMBERED
-+
-+#endif
-+
- static cfs_sysctl_table_t kibnal_ctl_table[] = {
- {
-- .ctl_name = 1,
-+ .ctl_name = KIBNAL_IPIF_BASENAME,
- .procname = "ipif_basename",
- .data = &ipif_basename,
- .maxlen = 1024,
-@@ -110,7 +140,7 @@
- .proc_handler = &proc_dostring
- },
- {
-- .ctl_name = 2,
-+ .ctl_name = KIBNAL_N_CONND,
- .procname = "n_connd",
- .data = &n_connd,
- .maxlen = sizeof(int),
-@@ -118,7 +148,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 3,
-+ .ctl_name = KIBNAL_RECONNECT_MIN,
- .procname = "min_reconnect_interval",
- .data = &min_reconnect_interval,
- .maxlen = sizeof(int),
-@@ -126,7 +156,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 4,
-+ .ctl_name = KIBNAL_RECONNECT_MAX,
- .procname = "max_reconnect_interval",
- .data = &max_reconnect_interval,
- .maxlen = sizeof(int),
-@@ -134,7 +164,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 5,
-+ .ctl_name = KIBNAL_CONCURRENT_PEERS,
- .procname = "concurrent_peers",
- .data = &concurrent_peers,
- .maxlen = sizeof(int),
-@@ -142,7 +172,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 6,
-+ .ctl_name = KIBNAL_CKSUM,
- .procname = "cksum",
- .data = &cksum,
- .maxlen = sizeof(int),
-@@ -150,7 +180,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 7,
-+ .ctl_name = KIBNAL_TIMEOUT,
- .procname = "timeout",
- .data = &timeout,
- .maxlen = sizeof(int),
-@@ -158,7 +188,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 8,
-+ .ctl_name = KIBNAL_NTX,
- .procname = "ntx",
- .data = &ntx,
- .maxlen = sizeof(int),
-@@ -166,7 +196,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 9,
-+ .ctl_name = KIBNAL_CREDITS,
- .procname = "credits",
- .data = &credits,
- .maxlen = sizeof(int),
-@@ -174,7 +204,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 10,
-+ .ctl_name = KIBNAL_PEER_CREDITS,
- .procname = "peer_credits",
- .data = &peer_credits,
- .maxlen = sizeof(int),
-@@ -182,7 +212,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 11,
-+ .ctl_name = KIBNAL_KEEPALIVE,
- .procname = "keepalive",
- .data = &keepalive,
- .maxlen = sizeof(int),
-@@ -194,7 +224,7 @@
-
- static cfs_sysctl_table_t kibnal_top_ctl_table[] = {
- {
-- .ctl_name = 203,
-+ .ctl_name = CTL_KIBNAL,
- .procname = "openibnal",
- .data = NULL,
- .maxlen = 0,
-diff -urNad lustre-1.6.6~/lnet/klnds/ptllnd/ptllnd.h lustre-1.6.6/lnet/klnds/ptllnd/ptllnd.h
---- lustre-1.6.6~/lnet/klnds/ptllnd/ptllnd.h 2008-08-07 12:24:06.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/ptllnd/ptllnd.h 2008-11-26 12:24:08.000000000 +0100
-@@ -76,6 +76,7 @@
- #include <libcfs/kp30.h>
- #include <lnet/lnet.h>
- #include <lnet/lib-lnet.h>
-+#include <lnet/lnet-sysctl.h>
- #include <portals/p30.h>
- #ifdef CRAY_XT3
- #include <portals/ptltrace.h>
-diff -urNad lustre-1.6.6~/lnet/klnds/ptllnd/ptllnd_modparams.c lustre-1.6.6/lnet/klnds/ptllnd/ptllnd_modparams.c
---- lustre-1.6.6~/lnet/klnds/ptllnd/ptllnd_modparams.c 2008-08-07 12:24:06.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/ptllnd/ptllnd_modparams.c 2008-11-26 12:24:08.000000000 +0100
-@@ -156,9 +156,51 @@
- }
- #endif
-
-+#ifndef HAVE_SYSCTL_UNNUMBERED
-+
-+enum {
-+ KPTLLND_NTX = 1,
-+ KPTLLND_MAX_NODES,
-+ KPTLLND_MAX_PROC_PER_NODE,
-+ KPTLLND_CHECKSUM,
-+ KPTLLND_TIMEOUT,
-+ KPTLLND_PORTAL,
-+ KPTLLND_PID,
-+ KPTLLND_RXB_PAGES,
-+ KPTLLND_CREDITS,
-+ KPTLLND_PEERCREDITS,
-+ KPTLLND_MAX_MSG_SIZE,
-+ KPTLLND_PEER_HASH_SIZE,
-+ KPTLLND_RESHEDULE_LOOPS,
-+ KPTLLND_ACK_PUTS,
-+ KPTLLND_TRACETIMEOUT,
-+ KPTLLND_TRACEBASENAME,
-+ KPTLLND_SIMULATION_BITMAP
-+};
-+#else
-+
-+#define KPTLLND_NTX CTL_UNNUMBERED
-+#define KPTLLND_MAX_NODES CTL_UNNUMBERED
-+#define KPTLLND_MAX_PROC_PER_NODE CTL_UNNUMBERED
-+#define KPTLLND_CHECKSUM CTL_UNNUMBERED
-+#define KPTLLND_TIMEOUT CTL_UNNUMBERED
-+#define KPTLLND_PORTAL CTL_UNNUMBERED
-+#define KPTLLND_PID CTL_UNNUMBERED
-+#define KPTLLND_RXB_PAGES CTL_UNNUMBERED
-+#define KPTLLND_CREDITS CTL_UNNUMBERED
-+#define KPTLLND_PEERCREDITS CTL_UNNUMBERED
-+#define KPTLLND_MAX_MSG_SIZE CTL_UNNUMBERED
-+#define KPTLLND_PEER_HASH_SIZE CTL_UNNUMBERED
-+#define KPTLLND_RESHEDULE_LOOPS CTL_UNNUMBERED
-+#define KPTLLND_ACK_PUTS CTL_UNNUMBERED
-+#define KPTLLND_TRACETIMEOUT CTL_UNNUMBERED
-+#define KPTLLND_TRACEBASENAME CTL_UNNUMBERED
-+#define KPTLLND_SIMULATION_BITMAP CTL_UNNUMBERED
-+#endif
-+
- static cfs_sysctl_table_t kptllnd_ctl_table[] = {
- {
-- .ctl_name = 1,
-+ .ctl_name = KPTLLND_NTX,
- .procname = "ntx",
- .data = &ntx,
- .maxlen = sizeof(int),
-@@ -166,7 +208,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 2,
-+ .ctl_name = KPTLLND_MAX_NODES,
- .procname = "max_nodes",
- .data = &max_nodes,
- .maxlen = sizeof(int),
-@@ -174,7 +216,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 3,
-+ .ctl_name = KPTLLND_MAX_PROC_PER_NODE,
- .procname = "max_procs_per_node",
- .data = &max_procs_per_node,
- .maxlen = sizeof(int),
-@@ -182,7 +224,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 4,
-+ .ctl_name = KPTLLND_CHECKSUM,
- .procname = "checksum",
- .data = &checksum,
- .maxlen = sizeof(int),
-@@ -190,7 +232,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 5,
-+ .ctl_name = KPTLLND_TIMEOUT,
- .procname = "timeout",
- .data = &timeout,
- .maxlen = sizeof(int),
-@@ -198,7 +240,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 6,
-+ .ctl_name = KPTLLND_PORTAL,
- .procname = "portal",
- .data = &portal,
- .maxlen = sizeof(int),
-@@ -206,7 +248,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 7,
-+ .ctl_name = KPTLLND_PID,
- .procname = "pid",
- .data = &pid,
- .maxlen = sizeof(int),
-@@ -214,7 +256,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 8,
-+ .ctl_name = KPTLLND_RXB_PAGES,
- .procname = "rxb_npages",
- .data = &rxb_npages,
- .maxlen = sizeof(int),
-@@ -222,7 +264,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 9,
-+ .ctl_name = KPTLLND_CREDITS,
- .procname = "credits",
- .data = &credits,
- .maxlen = sizeof(int),
-@@ -230,7 +272,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 10,
-+ .ctl_name = KPTLLND_PEERCREDITS,
- .procname = "peercredits",
- .data = &peercredits,
- .maxlen = sizeof(int),
-@@ -238,7 +280,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 11,
-+ .ctl_name = KPTLLND_MAX_MSG_SIZE,
- .procname = "max_msg_size",
- .data = &max_msg_size,
- .maxlen = sizeof(int),
-@@ -246,7 +288,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 12,
-+ .ctl_name = KPTLLND_PEER_HASH_SIZE,
- .procname = "peer_hash_table_size",
- .data = &peer_hash_table_size,
- .maxlen = sizeof(int),
-@@ -254,7 +296,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 13,
-+ .ctl_name = KPTLLND_RESHEDULE_LOOPS,
- .procname = "reschedule_loops",
- .data = &reschedule_loops,
- .maxlen = sizeof(int),
-@@ -262,7 +304,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 14,
-+ .ctl_name = KPTLLND_ACK_PUTS,
- .procname = "ack_puts",
- .data = &ack_puts,
- .maxlen = sizeof(int),
-@@ -271,7 +313,7 @@
- },
- #ifdef CRAY_XT3
- {
-- .ctl_name = 15,
-+ .ctl_name = KPTLLND_TRACETIMEOUT,
- .procname = "ptltrace_on_timeout",
- .data = &ptltrace_on_timeout,
- .maxlen = sizeof(int),
-@@ -279,7 +321,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 16,
-+ .ctl_name = KPTLLND_TRACEBASENAME,
- .procname = "ptltrace_basename",
- .data = ptltrace_basename_space,
- .maxlen = sizeof(ptltrace_basename_space),
-@@ -290,7 +332,7 @@
- #endif
- #ifdef PJK_DEBUGGING
- {
-- .ctl_name = 17,
-+ .ctl_name = KPTLLND_SIMULATION_BITMAP,
- .procname = "simulation_bitmap",
- .data = &simulation_bitmap,
- .maxlen = sizeof(int),
-@@ -304,7 +346,7 @@
-
- static cfs_sysctl_table_t kptllnd_top_ctl_table[] = {
- {
-- .ctl_name = 203,
-+ .ctl_name = CTL_PTLLND,
- .procname = "ptllnd",
- .data = NULL,
- .maxlen = 0,
-diff -urNad lustre-1.6.6~/lnet/klnds/qswlnd/qswlnd.h lustre-1.6.6/lnet/klnds/qswlnd/qswlnd.h
---- lustre-1.6.6~/lnet/klnds/qswlnd/qswlnd.h 2008-08-07 12:24:10.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/qswlnd/qswlnd.h 2008-11-26 12:24:08.000000000 +0100
-@@ -81,6 +81,7 @@
- #include <libcfs/kp30.h>
- #include <lnet/lnet.h>
- #include <lnet/lib-lnet.h>
-+#include <lnet/lnet-sysctl.h>
-
- /* fixed constants */
- #define KQSW_SMALLMSG (4<<10) /* small/large ep receiver breakpoint */
-diff -urNad lustre-1.6.6~/lnet/klnds/qswlnd/qswlnd_modparams.c lustre-1.6.6/lnet/klnds/qswlnd/qswlnd_modparams.c
---- lustre-1.6.6~/lnet/klnds/qswlnd/qswlnd_modparams.c 2008-07-25 21:55:33.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/qswlnd/qswlnd_modparams.c 2008-11-26 12:24:08.000000000 +0100
-@@ -87,9 +87,41 @@
- };
-
- #if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-+
-+#ifndef HAVE_SYSCTL_UNNUMBERED
-+
-+enum
-+ KQSWNAL_TX_MAXCONTIG = 1,
-+ KQSWNAL_NTXMSG,
-+ KQSWNAL_CREDITS,
-+ KQSWNAL_PEERCREDITS,
-+ KQSWNAL_NRXMSGS_LARGE,
-+ KQSWNAL_EP_ENVELOPES_LARGE,
-+ KQSWNAL_NRXMSGS_SMALL,
-+ KQSWNAL_EP_ENVELOPES_SMALL,
-+ KQSWNAL_OPTIMIZED_PUTS,
-+ KQSWNAL_OPTIMIZED_GETS,
-+ KQSWNAL_INJECT_CSUM_ERROR
-+};
-+#else
-+
-+#define KQSWNAL_TX_MAXCONTIG CTL_UNNUMBERED
-+#define KQSWNAL_NTXMSG CTL_UNNUMBERED
-+#define KQSWNAL_CREDITS CTL_UNNUMBERED
-+#define KQSWNAL_PEERCREDITS CTL_UNNUMBERED
-+#define KQSWNAL_NRXMSGS_LARGE CTL_UNNUMBERED
-+#define KQSWNAL_EP_ENVELOPES_LARGE CTL_UNNUMBERED
-+#define KQSWNAL_NRXMSGS_SMALL CTL_UNNUMBERED
-+#define KQSWNAL_EP_ENVELOPES_SMALL CTL_UNNUMBERED
-+#define KQSWNAL_OPTIMIZED_PUTS CTL_UNNUMBERED
-+#define KQSWNAL_OPTIMIZED_GETS CTL_UNNUMBERED
-+#define KQSWNAL_INJECT_CSUM_ERROR CTL_UNNUMBERED
-+
-+#endif
-+
- static cfs_sysctl_table_t kqswnal_ctl_table[] = {
- {
-- .ctl_name = 1,
-+ .ctl_name = KQSWNAL_TX_MAXCONTIG,
- .procname = "tx_maxcontig",
- .data = &tx_maxcontig,
- .maxlen = sizeof (int),
-@@ -97,7 +129,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 2,
-+ .ctl_name = KQSWNAL_NTXMSG,
- .procname = "ntxmsgs",
- .data = &ntxmsgs,
- .maxlen = sizeof (int),
-@@ -105,7 +137,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 3,
-+ .ctl_name = KQSWNAL_CREDITS,
- .procname = "credits",
- .data = &credits,
- .maxlen = sizeof (int),
-@@ -113,7 +145,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 4,
-+ .ctl_name = KQSWNAL_PEERCREDITS,
- .procname = "peer_credits",
- .data = &peer_credits,
- .maxlen = sizeof (int),
-@@ -121,7 +153,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 5,
-+ .ctl_name = KQSWNAL_NRXMSGS_LARGE,
- .procname = "nrxmsgs_large",
- .data = &nrxmsgs_large,
- .maxlen = sizeof (int),
-@@ -129,7 +161,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 6,
-+ .ctl_name = KQSWNAL_EP_ENVELOPES_LARGE,
- .procname = "ep_envelopes_large",
- .data = &ep_envelopes_large,
- .maxlen = sizeof (int),
-@@ -137,7 +169,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 7,
-+ .ctl_name = KQSWNAL_NRXMSGS_SMALL,
- .procname = "nrxmsgs_small",
- .data = &nrxmsgs_small,
- .maxlen = sizeof (int),
-@@ -145,7 +177,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 8,
-+ .ctl_name = KQSWNAL_EP_ENVELOPES_SMALL,
- .procname = "ep_envelopes_small",
- .data = &ep_envelopes_small,
- .maxlen = sizeof (int),
-@@ -153,7 +185,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 9,
-+ .ctl_name = KQSWNAL_OPTIMIZED_PUTS,
- .procname = "optimized_puts",
- .data = &optimized_puts,
- .maxlen = sizeof (int),
-@@ -161,7 +193,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 10,
-+ .ctl_name = KQSWNAL_OPTIMIZED_GETS,
- .procname = "optimized_gets",
- .data = &optimized_gets,
- .maxlen = sizeof (int),
-@@ -170,7 +202,7 @@
- },
- #if KQSW_CKSUM
- {
-- .ctl_name = 11,
-+ .ctl_name = KQSWNAL_INJECT_CSUM_ERROR,
- .procname = "inject_csum_error",
- .data = &inject_csum_error,
- .maxlen = sizeof (int),
-@@ -183,7 +215,7 @@
-
- static cfs_sysctl_table_t kqswnal_top_ctl_table[] = {
- {
-- .ctl_name = 201,
-+ .ctl_name = CTL_KQSWNAL,
- .procname = "qswnal",
- .data = NULL,
- .maxlen = 0,
-diff -urNad lustre-1.6.6~/lnet/klnds/ralnd/ralnd.h lustre-1.6.6/lnet/klnds/ralnd/ralnd.h
---- lustre-1.6.6~/lnet/klnds/ralnd/ralnd.h 2008-08-07 12:24:11.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/ralnd/ralnd.h 2008-11-26 12:24:08.000000000 +0100
-@@ -74,6 +74,7 @@
- #include <libcfs/kp30.h>
- #include <lnet/lnet.h>
- #include <lnet/lib-lnet.h>
-+#include <lnet/lnet-sysctl.h>
-
- #include <rapl.h>
-
-diff -urNad lustre-1.6.6~/lnet/klnds/ralnd/ralnd_modparams.c lustre-1.6.6/lnet/klnds/ralnd/ralnd_modparams.c
---- lustre-1.6.6~/lnet/klnds/ralnd/ralnd_modparams.c 2008-08-07 12:24:12.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/ralnd/ralnd_modparams.c 2008-11-26 12:24:08.000000000 +0100
-@@ -89,9 +89,35 @@
- };
-
- #if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM
-+
-+#ifndef HAVE_SYSCTL_UNNUMBERED
-+enum {
-+ KRANAL_N_CONND = 1,
-+ KRANAL_RECONNECT_MIN,
-+ KRANAL_RECONNECT_MAX,
-+ KRANAL_NTX,
-+ KRANAL_CREDITS,
-+ KRANAL_PEERCREDITS,
-+ KRANAL_FMA_CQ_SIZE,
-+ KRANAL_TIMEOUT,
-+ KRANAL_IMMEDIATE_MAX
-+};
-+#else
-+
-+#define KRANAL_N_CONND CTL_UNNUMBERED
-+#define KRANAL_RECONNECT_MIN CTL_UNNUMBERED
-+#define KRANAL_RECONNECT_MAX CTL_UNNUMBERED
-+#define KRANAL_NTX CTL_UNNUMBERED
-+#define KRANAL_CREDITS CTL_UNNUMBERED
-+#define KRANAL_PEERCREDITS CTL_UNNUMBERED
-+#define KRANAL_FMA_CQ_SIZE CTL_UNNUMBERED
-+#define KRANAL_TIMEOUT CTL_UNNUMBERED
-+#define KRENAL_IMMEDIATE_MAX CTL_UNNUMBERED
-+#endif
-+
- static cfs_sysctl_table_t kranal_ctl_table[] = {
- {
-- .ctl_name = 1,
-+ .ctl_name = KRANAL_N_CONND,
- .procname = "n_connd",
- .data = &n_connd,
- .maxlen = sizeof(int),
-@@ -99,7 +125,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 2,
-+ .ctl_name = KRANAL_RECONNECT_MIN,
- .procname = "min_reconnect_interval",
- .data = &min_reconnect_interval,
- .maxlen = sizeof(int),
-@@ -107,7 +133,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 3,
-+ .ctl_name = KRANAL_RECONNECT_MAX,
- .procname = "max_reconnect_interval",
- .data = &max_reconnect_interval,
- .maxlen = sizeof(int),
-@@ -115,7 +141,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 4,
-+ .ctl_name = KRANAL_NTX,
- .procname = "ntx",
- .data = &ntx,
- .maxlen = sizeof(int),
-@@ -123,7 +149,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 5,
-+ .ctl_name = KRANAL_CREDITS,
- .procname = "credits",
- .data = &credits,
- .maxlen = sizeof(int),
-@@ -131,7 +157,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 6,
-+ .ctl_name = KRANAL_PEERCREDITS,
- .procname = "peer_credits",
- .data = &peer_credits,
- .maxlen = sizeof(int),
-@@ -139,7 +165,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 7,
-+ .ctl_name = KRANAL_FMA_CQ_SIZE,
- .procname = "fma_cq_size",
- .data = &fma_cq_size,
- .maxlen = sizeof(int),
-@@ -147,7 +173,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 8,
-+ .ctl_name = KRANAL_TIMEOUT,
- .procname = "timeout",
- .data = &timeout,
- .maxlen = sizeof(int),
-@@ -155,7 +181,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 9,
-+ .ctl_name = KRANAL_IMMEDIATE_MAX,
- .procname = "max_immediate",
- .data = &max_immediate,
- .maxlen = sizeof(int),
-@@ -167,7 +193,7 @@
-
- static cfs_sysctl_table_t kranal_top_ctl_table[] = {
- {
-- .ctl_name = 202,
-+ .ctl_name = CTL_KRANAL,
- .procname = "ranal",
- .data = NULL,
- .maxlen = 0,
-diff -urNad lustre-1.6.6~/lnet/klnds/socklnd/socklnd.h lustre-1.6.6/lnet/klnds/socklnd/socklnd.h
---- lustre-1.6.6~/lnet/klnds/socklnd/socklnd.h 2008-07-25 21:55:33.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/socklnd/socklnd.h 2008-11-26 12:24:08.000000000 +0100
-@@ -46,6 +46,7 @@
- #include <lnet/lnet.h>
- #include <lnet/lib-lnet.h>
- #include <lnet/socklnd.h>
-+#include <lnet/lnet-sysctl.h>
-
- #define SOCKNAL_PEER_HASH_SIZE 101 /* # peer lists */
- #define SOCKNAL_RESCHED 100 /* # scheduler loops before reschedule */
-diff -urNad lustre-1.6.6~/lnet/klnds/socklnd/socklnd_lib-linux.c lustre-1.6.6/lnet/klnds/socklnd/socklnd_lib-linux.c
---- lustre-1.6.6~/lnet/klnds/socklnd/socklnd_lib-linux.c 2008-08-07 12:24:14.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/socklnd/socklnd_lib-linux.c 2008-11-26 12:24:08.000000000 +0100
-@@ -37,197 +37,261 @@
- #include "socklnd.h"
-
- # if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
--static cfs_sysctl_table_t ksocknal_ctl_table[21];
-
--cfs_sysctl_table_t ksocknal_top_ctl_table[] = {
-- {
-- .ctl_name = 200,
-- .procname = "socknal",
-- .data = NULL,
-- .maxlen = 0,
-- .mode = 0555,
-- .child = ksocknal_ctl_table
-- },
-- { 0 }
-+#ifndef HAVE_SYSCTL_UNNUMBERED
-+
-+enum {
-+ SOCKLND_TIMEOUT = 1,
-+ SOCKLND_CREDITS,
-+ SOCKLND_PEER_CREDITS,
-+ SOCKLND_NCONNDS,
-+ SOCKLND_RECONNECTS_MIN,
-+ SOCKLND_RECONNECTS_MAX,
-+ SOCKLND_EAGER_ACK,
-+ SOCKLND_ZERO_COPY,
-+ SOCKLND_TYPED,
-+ SOCKLND_BULK_MIN,
-+ SOCKLND_RX_BUFFER_SIZE,
-+ SOCKLND_TX_BUFFER_SIZE,
-+ SOCKLND_NAGLE,
-+ SOCKLND_IRQ_AFFINITY,
-+ SOCKLND_KEEPALIVE_IDLE,
-+ SOCKLND_KEEPALIVE_COUNT,
-+ SOCKLND_KEEPALIVE_INTVL,
-+ SOCKLND_BACKOFF_INIT,
-+ SOCKLND_BACKOFF_MAX,
-+ SOCKLND_PROTOCOL
- };
-+#else
-
--int
--ksocknal_lib_tunables_init ()
--{
-- int i = 0;
-- int j = 1;
-+#define SOCKLND_TIMEOUT CTL_UNNUMBERED
-+#define SOCKLND_CREDITS CTL_UNNUMBERED
-+#define SOCKLND_PEER_CREDITS CTL_UNNUMBERED
-+#define SOCKLND_NCONNDS CTL_UNNUMBERED
-+#define SOCKLND_RECONNECTS_MIN CTL_UNNUMBERED
-+#define SOCKLND_RECONNECTS_MAX CTL_UNNUMBERED
-+#define SOCKLND_EAGER_ACK CTL_UNNUMBERED
-+#define SOCKLND_ZERO_COPY CTL_UNNUMBERED
-+#define SOCKLND_TYPED CTL_UNNUMBERED
-+#define SOCKLND_BULK_MIN CTL_UNNUMBERED
-+#define SOCKLND_RX_BUFFER_SIZE CTL_UNNUMBERED
-+#define SOCKLND_TX_BUFFER_SIZE CTL_UNNUMBERED
-+#define SOCKLND_NAGLE CTL_UNNUMBERED
-+#define SOCKLND_IRQ_AFFINITY CTL_UNNUMBERED
-+#define SOCKLND_KEEPALIVE_IDLE CTL_UNNUMBERED
-+#define SOCKLND_KEEPALIVE_COUNT CTL_UNNUMBERED
-+#define SOCKLND_KEEPALIVE_INTVL CTL_UNNUMBERED
-+#define SOCKLND_BACKOFF_INIT CTL_UNNUMBERED
-+#define SOCKLND_BACKOFF_MAX CTL_UNNUMBERED
-+#define SOCKLND_PROTOCOL CTL_UNNUMBERED
-+#endif
-
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+static cfs_sysctl_table_t ksocknal_ctl_table[] = {
-+ {
-+ .ctl_name = SOCKLND_TIMEOUT,
- .procname = "timeout",
- .data = ksocknal_tunables.ksnd_timeout,
- .maxlen = sizeof (int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_CREDITS,
- .procname = "credits",
- .data = ksocknal_tunables.ksnd_credits,
- .maxlen = sizeof (int),
- .mode = 0444,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_PEER_CREDITS,
- .procname = "peer_credits",
- .data = ksocknal_tunables.ksnd_peercredits,
- .maxlen = sizeof (int),
- .mode = 0444,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_NCONNDS,
- .procname = "nconnds",
- .data = ksocknal_tunables.ksnd_nconnds,
- .maxlen = sizeof (int),
- .mode = 0444,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_RECONNECTS_MIN,
- .procname = "min_reconnectms",
- .data = ksocknal_tunables.ksnd_min_reconnectms,
- .maxlen = sizeof (int),
- .mode = 0444,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_RECONNECTS_MAX,
- .procname = "max_reconnectms",
- .data = ksocknal_tunables.ksnd_max_reconnectms,
- .maxlen = sizeof (int),
- .mode = 0444,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_EAGER_ACK,
- .procname = "eager_ack",
- .data = ksocknal_tunables.ksnd_eager_ack,
- .maxlen = sizeof (int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_ZERO_COPY,
- .procname = "zero_copy",
- .data = ksocknal_tunables.ksnd_zc_min_frag,
- .maxlen = sizeof (int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_TYPED,
- .procname = "typed",
- .data = ksocknal_tunables.ksnd_typed_conns,
- .maxlen = sizeof (int),
- .mode = 0444,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_BULK_MIN,
- .procname = "min_bulk",
- .data = ksocknal_tunables.ksnd_min_bulk,
- .maxlen = sizeof (int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_RX_BUFFER_SIZE,
- .procname = "rx_buffer_size",
- .data = ksocknal_tunables.ksnd_rx_buffer_size,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_TX_BUFFER_SIZE,
- .procname = "tx_buffer_size",
- .data = ksocknal_tunables.ksnd_tx_buffer_size,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_NAGLE,
- .procname = "nagle",
- .data = ksocknal_tunables.ksnd_nagle,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
- #ifdef CPU_AFFINITY
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ {
-+ .ctl_name = SOCKLND_IRQ_AFFINITY,
- .procname = "irq_affinity",
- .data = ksocknal_tunables.ksnd_irq_affinity,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
- #endif
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ {
-+ .ctl_name = SOCKLND_KEEPALIVE_IDLE,
- .procname = "keepalive_idle",
- .data = ksocknal_tunables.ksnd_keepalive_idle,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_KEEPALIVE_COUNT,
- .procname = "keepalive_count",
- .data = ksocknal_tunables.ksnd_keepalive_count,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_KEEPALIVE_INTVL,
- .procname = "keepalive_intvl",
- .data = ksocknal_tunables.ksnd_keepalive_intvl,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
- #ifdef SOCKNAL_BACKOFF
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ {
-+ .ctl_name = SOCKLND_BACKOFF_INIT,
- .procname = "backoff_init",
- .data = ksocknal_tunables.ksnd_backoff_init,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
-+ {
-+ .ctl_name = SOCKLND_BACKOFF_MAX,
- .procname = "backoff_max",
- .data = ksocknal_tunables.ksnd_backoff_max,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
- #endif
- #if SOCKNAL_VERSION_DEBUG
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
-- .ctl_name = j++,
-+ {
-+ .ctl_name = SOCKLND_PROTOCOL,
- .procname = "protocol",
- .data = ksocknal_tunables.ksnd_protocol,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-- };
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
-+ },
- #endif
-- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) { 0 };
-+ {0}
-+};
-
-- LASSERT (j == i);
-- LASSERT (i <= sizeof(ksocknal_ctl_table)/sizeof(ksocknal_ctl_table[0]));
-
-+cfs_sysctl_table_t ksocknal_top_ctl_table[] = {
-+ {
-+ .ctl_name = CTL_SOCKLND,
-+ .procname = "socknal",
-+ .data = NULL,
-+ .maxlen = 0,
-+ .mode = 0555,
-+ .child = ksocknal_ctl_table
-+ },
-+ { 0 }
-+};
-+
-+int
-+ksocknal_lib_tunables_init ()
-+{
- ksocknal_tunables.ksnd_sysctl =
- cfs_register_sysctl_table(ksocknal_top_ctl_table, 0);
-
-diff -urNad lustre-1.6.6~/lnet/klnds/viblnd/viblnd.h lustre-1.6.6/lnet/klnds/viblnd/viblnd.h
---- lustre-1.6.6~/lnet/klnds/viblnd/viblnd.h 2008-08-07 12:24:16.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/viblnd/viblnd.h 2008-11-26 12:24:08.000000000 +0100
-@@ -76,6 +76,7 @@
- #include <libcfs/kp30.h>
- #include <lnet/lnet.h>
- #include <lnet/lib-lnet.h>
-+#include <lnet/lnet-sysctl.h>
-
- /* CPU_{L,B}E #defines needed by Voltaire headers */
- #include <asm/byteorder.h>
-diff -urNad lustre-1.6.6~/lnet/klnds/viblnd/viblnd_modparams.c lustre-1.6.6/lnet/klnds/viblnd/viblnd_modparams.c
---- lustre-1.6.6~/lnet/klnds/viblnd/viblnd_modparams.c 2008-08-07 12:24:17.000000000 +0200
-+++ lustre-1.6.6/lnet/klnds/viblnd/viblnd_modparams.c 2008-11-26 12:24:08.000000000 +0100
-@@ -142,6 +142,53 @@
- #endif
- };
-
-+#ifndef HAVE_SYSCTL_UNNUMBERED
-+
-+enum {
-+ VIBLND_SERVICE = 1,
-+ VIBLND_RECONNECT_MIN,
-+ VIBLND_RECONNECT_MAX,
-+ VIBLND_CONCURRENT_PEERS,
-+ VIBLND_CHKSUM,
-+ VIBLND_TIMEOUT,
-+ VIBLND_NTX,
-+ VIBLND_CREDITS,
-+ VIBLND_PEER_CREDITS,
-+ VIBLND_ARP_RETRIES,
-+ VIBLND_HCA_BASENAME,
-+ VIBLND_IPIF_BASENAME,
-+ VIBLND_LOCAL_ACK_TIMEOUT,
-+ VIBLND_RETRY_CNT,
-+ VIBLND_RNR_CNT,
-+ VIBLND_RNR_NAK_TIMER,
-+ VIBLND_KEEPALIVE,
-+ VIBLND_CONCURRENT_SENDS,
-+ VIBLND_FMR_REMAPS
-+};
-+#else
-+
-+#define VIBLND_SERVICE CTL_UNNUMBERED
-+#define VIBLND_RECONNECT_MIN CTL_UNNUMBERED
-+#define VIBLND_RECONNECT_MAX CTL_UNNUMBERED
-+#define VIBLND_CONCURRENT_PEERS CTL_UNNUMBERED
-+#define VIBLND_CHKSUM CTL_UNNUMBERED
-+#define VIBLND_TIMEOUT CTL_UNNUMBERED
-+#define VIBLND_NTX CTL_UNNUMBERED
-+#define VIBLND_CREDITS CTL_UNNUMBERED
-+#define VIBLND_PEER_CREDITS CTL_UNNUMBERED
-+#define VIBLND_ARP_RETRIES CTL_UNNUMBERED
-+#define VIBLND_HCA_BASENAME CTL_UNNUMBERED
-+#define VIBLND_IPIF_BASENAME CTL_UNNUMBERED
-+#define VIBLND_LOCAL_ACK_TIMEOUT CTL_UNNUMBERED
-+#define VIBLND_RETRY_CNT CTL_UNNUMBERED
-+#define VIBLND_RNR_CNT CTL_UNNUMBERED
-+#define VIBLND_RNR_NAK_TIMER CTL_UNNUMBERED
-+#define VIBLND_KEEPALIVE CTL_UNNUMBERED
-+#define VIBLND_CONCURRENT_SENDS CTL_UNNUMBERED
-+#define VIBLND_FMR_REMAPS CTL_UNNUMBERED
-+
-+#endif
-+
- #if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-
- static char hca_basename_space[32];
-@@ -149,7 +196,7 @@
-
- static cfs_sysctl_table_t kibnal_ctl_table[] = {
- {
-- .ctl_name = 1,
-+ .ctl_name = VIBLND_SERVICE,
- .procname = "service_number",
- .data = &service_number,
- .maxlen = sizeof(int),
-@@ -157,7 +204,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 2,
-+ .ctl_name = VIBLND_RECONNECT_MIN,
- .procname = "min_reconnect_interval",
- .data = &min_reconnect_interval,
- .maxlen = sizeof(int),
-@@ -165,7 +212,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 3,
-+ .ctl_name = VIBLND_RECONNECT_MAX,
- .procname = "max_reconnect_interval",
- .data = &max_reconnect_interval,
- .maxlen = sizeof(int),
-@@ -173,7 +220,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 4,
-+ .ctl_name = VIBLND_CONCURRENT_PEERS,
- .procname = "concurrent_peers",
- .data = &concurrent_peers,
- .maxlen = sizeof(int),
-@@ -181,7 +228,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 5,
-+ .ctl_name = VIBLND_CHKSUM,
- .procname = "cksum",
- .data = &cksum,
- .maxlen = sizeof(int),
-@@ -189,7 +236,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 6,
-+ .ctl_name = VIBLND_TIMEOUT,
- .procname = "timeout",
- .data = &timeout,
- .maxlen = sizeof(int),
-@@ -197,7 +244,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 7,
-+ .ctl_name = VIBLND_NTX,
- .procname = "ntx",
- .data = &ntx,
- .maxlen = sizeof(int),
-@@ -205,7 +252,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 8,
-+ .ctl_name = VIBLND_CREDITS,
- .procname = "credits",
- .data = &credits,
- .maxlen = sizeof(int),
-@@ -213,7 +260,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 9,
-+ .ctl_name = VIBLND_PEER_CREDITS,
- .procname = "peer_credits",
- .data = &peer_credits,
- .maxlen = sizeof(int),
-@@ -221,7 +268,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 10,
-+ .ctl_name = VIBLND_ARP_RETRIES,
- .procname = "arp_retries",
- .data = &arp_retries,
- .maxlen = sizeof(int),
-@@ -229,7 +276,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 11,
-+ .ctl_name = VIBLND_HCA_BASENAME,
- .procname = "hca_basename",
- .data = hca_basename_space,
- .maxlen = sizeof(hca_basename_space),
-@@ -237,7 +284,7 @@
- .proc_handler = &proc_dostring
- },
- {
-- .ctl_name = 12,
-+ .ctl_name = VIBLND_IPIF_BASENAME,
- .procname = "ipif_basename",
- .data = ipif_basename_space,
- .maxlen = sizeof(ipif_basename_space),
-@@ -245,7 +292,7 @@
- .proc_handler = &proc_dostring
- },
- {
-- .ctl_name = 13,
-+ .ctl_name = VIBLND_LOCAL_ACK_TIMEOUT,
- .procname = "local_ack_timeout",
- .data = &local_ack_timeout,
- .maxlen = sizeof(int),
-@@ -253,7 +300,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 14,
-+ .ctl_name = VIBLND_RETRY_CNT,
- .procname = "retry_cnt",
- .data = &retry_cnt,
- .maxlen = sizeof(int),
-@@ -261,7 +308,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 15,
-+ .ctl_name = VIBLND_RNR_CNT,
- .procname = "rnr_cnt",
- .data = &rnr_cnt,
- .maxlen = sizeof(int),
-@@ -269,7 +316,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 16,
-+ .ctl_name = VIBLND_RNR_NAK_TIMER,
- .procname = "rnr_nak_timer",
- .data = &rnr_nak_timer,
- .maxlen = sizeof(int),
-@@ -277,7 +324,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 17,
-+ .ctl_name = VIBLND_KEEPALIVE,
- .procname = "keepalive",
- .data = &keepalive,
- .maxlen = sizeof(int),
-@@ -285,7 +332,7 @@
- .proc_handler = &proc_dointvec
- },
- {
-- .ctl_name = 18,
-+ .ctl_name = VIBLND_CONCURRENT_SENDS,
- .procname = "concurrent_sends",
- .data = &concurrent_sends,
- .maxlen = sizeof(int),
-@@ -294,7 +341,7 @@
- },
- #if IBNAL_USE_FMR
- {
-- .ctl_name = 19,
-+ .ctl_name = VIBLND_FMR_REMAPS,
- .procname = "fmr_remaps",
- .data = &fmr_remaps,
- .maxlen = sizeof(int),
-@@ -307,7 +354,7 @@
-
- static cfs_sysctl_table_t kibnal_top_ctl_table[] = {
- {
-- .ctl_name = 203,
-+ .ctl_name = CTL_VIBLND,
- .procname = "vibnal",
- .data = NULL,
- .maxlen = 0,
-diff -urNad lustre-1.6.6~/lnet/libcfs/linux/linux-proc.c lustre-1.6.6/lnet/libcfs/linux/linux-proc.c
---- lustre-1.6.6~/lnet/libcfs/linux/linux-proc.c 2008-09-01 06:35:33.000000000 +0200
-+++ lustre-1.6.6/lnet/libcfs/linux/linux-proc.c 2008-11-26 12:24:08.000000000 +0100
-@@ -79,7 +79,8 @@
- static cfs_sysctl_table_header_t *lnet_table_header = NULL;
- extern char lnet_upcall[1024];
-
--#define PSDEV_LNET (0x100)
-+#ifndef HAVE_SYSCTL_UNNUMBERED
-+#define CTL_LNET (0x100)
- enum {
- PSDEV_DEBUG = 1, /* control debugging */
- PSDEV_SUBSYSTEM_DEBUG, /* control debugging */
-@@ -98,6 +99,27 @@
- PSDEV_LNET_DAEMON_FILE, /* spool kernel debug buffer to file */
- PSDEV_LNET_DEBUG_MB, /* size of debug buffer */
- };
-+#else
-+#define CTL_LNET CTL_UNNUMBERED
-+#define PSDEV_DEBUG CTL_UNNUMBERED
-+#define PSDEV_SUBSYSTEM_DEBUG CTL_UNNUMBERED
-+#define PSDEV_PRINTK CTL_UNNUMBERED
-+#define PSDEV_CONSOLE_RATELIMIT CTL_UNNUMBERED
-+#define PSDEV_CONSOLE_MAX_DELAY_CS CTL_UNNUMBERED
-+#define PSDEV_CONSOLE_MIN_DELAY_CS CTL_UNNUMBERED
-+#define PSDEV_CONSOLE_BACKOFF CTL_UNNUMBERED
-+#define PSDEV_DEBUG_PATH CTL_UNNUMBERED
-+#define PSDEV_DEBUG_DUMP_PATH CTL_UNNUMBERED
-+#define PSDEV_LNET_UPCALL CTL_UNNUMBERED
-+#define PSDEV_LNET_MEMUSED CTL_UNNUMBERED
-+#define PSDEV_LNET_CATASTROPHE CTL_UNNUMBERED
-+#define PSDEV_LNET_PANIC_ON_LBUG CTL_UNNUMBERED
-+#define PSDEV_LNET_DUMP_KERNEL CTL_UNNUMBERED
-+#define PSDEV_LNET_DAEMON_FILE CTL_UNNUMBERED
-+#define PSDEV_LNET_DEBUG_MB CTL_UNNUMBERED
-+#define PSDEV_LNET_DEBUG_LOG_UPCALL CTL_UNNUMBERED
-+#endif
-+
-
- static int
- proc_call_handler(void *data, int write,
-@@ -118,17 +140,7 @@
- }
- return 0;
- }
--
--#define DECLARE_PROC_HANDLER(name) \
--static int \
--LL_PROC_PROTO(name) \
--{ \
-- DECLARE_LL_PROC_PPOS_DECL; \
-- \
-- return proc_call_handler(table->data, write, \
-- ppos, buffer, lenp, \
-- __##name); \
--}
-+EXPORT_SYMBOL(proc_call_handler);
-
- static int __proc_dobitmasks(void *data, int write,
- loff_t pos, void *buffer, int nob)
-@@ -319,7 +331,7 @@
- .data = &libcfs_debug,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dobitmasks
-+ .proc_handler = &proc_dobitmasks,
- },
- {
- .ctl_name = PSDEV_SUBSYSTEM_DEBUG,
-@@ -327,7 +339,7 @@
- .data = &libcfs_subsystem_debug,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dobitmasks
-+ .proc_handler = &proc_dobitmasks,
- },
- {
- .ctl_name = PSDEV_PRINTK,
-@@ -335,7 +347,7 @@
- .data = &libcfs_printk,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dobitmasks
-+ .proc_handler = &proc_dobitmasks,
- },
- {
- .ctl_name = PSDEV_CONSOLE_RATELIMIT,
-@@ -390,7 +402,8 @@
- .data = (int *)&libcfs_kmemory.counter,
- .maxlen = sizeof(int),
- .mode = 0444,
-- .proc_handler = &proc_dointvec
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
- },
- {
- .ctl_name = PSDEV_LNET_CATASTROPHE,
-@@ -398,7 +411,8 @@
- .data = &libcfs_catastrophe,
- .maxlen = sizeof(int),
- .mode = 0444,
-- .proc_handler = &proc_dointvec
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
- },
- {
- .ctl_name = PSDEV_LNET_PANIC_ON_LBUG,
-@@ -406,11 +420,13 @@
- .data = &libcfs_panic_on_lbug,
- .maxlen = sizeof(int),
- .mode = 0644,
-- .proc_handler = &proc_dointvec
-+ .proc_handler = &proc_dointvec,
-+ .strategy = &sysctl_intvec,
- },
- {
- .ctl_name = PSDEV_LNET_DUMP_KERNEL,
- .procname = "dump_kernel",
-+ .maxlen = 256,
- .mode = 0200,
- .proc_handler = &proc_dump_kernel,
- },
-@@ -418,6 +434,7 @@
- .ctl_name = PSDEV_LNET_DAEMON_FILE,
- .procname = "daemon_file",
- .mode = 0644,
-+ .maxlen = 256,
- .proc_handler = &proc_daemon_file,
- },
- {
-@@ -429,21 +446,24 @@
- {0}
- };
-
--static cfs_sysctl_table_t top_table[2] = {
-+static cfs_sysctl_table_t top_table[] = {
- {
-- .ctl_name = PSDEV_LNET,
-+ .ctl_name = CTL_LNET,
- .procname = "lnet",
-+ .mode = 0555,
- .data = NULL,
- .maxlen = 0,
-- .mode = 0555,
-- .child = lnet_table
-+ .child = lnet_table,
- },
-- {0}
-+ {
-+ .ctl_name = 0
-+ }
- };
-
- int insert_proc(void)
- {
- #ifdef CONFIG_SYSCTL
-+ printk("call register\n");
- if (lnet_table_header == NULL)
- lnet_table_header = cfs_register_sysctl_table(top_table, 0);
- #endif
-diff -urNad lustre-1.6.6~/lnet/lnet/router_proc.c lustre-1.6.6/lnet/lnet/router_proc.c
---- lustre-1.6.6~/lnet/lnet/router_proc.c 2008-07-25 21:55:38.000000000 +0200
-+++ lustre-1.6.6/lnet/lnet/router_proc.c 2008-11-26 12:24:08.000000000 +0100
-@@ -32,12 +32,13 @@
-
- /* this is really lnet_proc.c */
-
--#define LNET_PROC_STATS "sys/lnet/stats"
--#define LNET_PROC_ROUTES "sys/lnet/routes"
--#define LNET_PROC_ROUTERS "sys/lnet/routers"
--#define LNET_PROC_PEERS "sys/lnet/peers"
--#define LNET_PROC_BUFFERS "sys/lnet/buffers"
--#define LNET_PROC_NIS "sys/lnet/nis"
-+#define LNET_PROC_ROOT "sys/lnet"
-+#define LNET_PROC_STATS LNET_PROC_ROOT"/stats"
-+#define LNET_PROC_ROUTES LNET_PROC_ROOT"/routes"
-+#define LNET_PROC_ROUTERS LNET_PROC_ROOT"/routers"
-+#define LNET_PROC_PEERS LNET_PROC_ROOT"/peers"
-+#define LNET_PROC_BUFFERS LNET_PROC_ROOT"/buffers"
-+#define LNET_PROC_NIS LNET_PROC_ROOT"/nis"
-
- static int
- lnet_router_proc_stats_read (char *page, char **start, off_t off,
-@@ -1007,6 +1008,13 @@
- {
- struct proc_dir_entry *pde;
-
-+#if 0
-+ pde = proc_mkdir(LNET_PROC_ROOT, NULL);
-+ if (pde == NULL) {
-+ CERROR("couldn't create "LNET_PROC_ROOT"\n");
-+ return;
-+ }
-+#endif
- /* Initialize LNET_PROC_STATS */
- pde = create_proc_entry (LNET_PROC_STATS, 0644, NULL);
- if (pde == NULL) {
-@@ -1078,6 +1086,9 @@
- remove_proc_entry(LNET_PROC_PEERS, 0);
- remove_proc_entry(LNET_PROC_BUFFERS, 0);
- remove_proc_entry(LNET_PROC_NIS, 0);
-+#if 0
-+ remove_proc_entry(LNET_PROC_ROOT, 0);
-+#endif
- }
-
- #else
diff --git a/debian/patches/server_support_2.6.27.dpatch b/debian/patches/server_support_2.6.27.dpatch
deleted file mode 100755
index 15d2f62..0000000
--- a/debian/patches/server_support_2.6.27.dpatch
+++ /dev/null
@@ -1,78 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## posix_acl.patch by Patrick Winnertz <winnie at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch which will enable server support for 2.6.27er kernels, Taken from #15976
-
- at DPATCH@
-diff -urNad lustre~/lustre/kernel_patches/patches/8kstack-2.6.27.patch lustre/lustre/kernel_patches/patches/8kstack-2.6.27.patch
---- lustre~/lustre/kernel_patches/patches/8kstack-2.6.27.patch 1970-01-01 00:00:00.000000000 +0000
-+++ lustre/lustre/kernel_patches/patches/8kstack-2.6.27.patch 2008-12-02 15:41:57.000000000 +0100
-@@ -0,0 +1,11 @@
-+--- linux-2.6.9-5.0.3.EL.orig/include/asm-x86/page_32.h 2005-02-25 10:25:33.000000000 +0200
-++++ linux-2.6.9-5.0.3.EL/include/asm-x86/page_32.h 2005-02-25 20:19:11.676139032 +0200
-+@@ -14,7 +14,7 @@
-+ #define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
-+
-+ #ifdef CONFIG_4KSTACKS
-+-#define THREAD_ORDER 0
-++#define THREAD_ORDER 1
-+ #else
-+ #define THREAD_ORDER 1
-+ #endif
-diff -urNad lustre~/lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch lustre/lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch
---- lustre~/lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch 2008-11-25 13:59:37.000000000 +0100
-+++ lustre/lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch 2008-12-02 15:40:00.000000000 +0100
-@@ -69,13 +69,13 @@
- /*
- * This indicates that the command is ready from our end to be
- * queued.
--@@ -980,6 +1000,7 @@ static void sd_rw_intr(struct scsi_cmnd
-+@@ -980,6 +1000,7 @@ static void sd_done(struct scsi_cmnd
- break;
- }
- out:
- + sd_iostats_finish_req(SCpnt);
-- scsi_io_completion(SCpnt, good_bytes);
-- }
-+ if (rq_data_dir(SCpnt->request) == READ && scsi_prot_sg_count(SCpnt))
-+ sd_dif_complete(SCpnt, good_bytes);
-
- @@ -1666,6 +1687,36 @@ static int sd_probe(struct device *dev)
- if (sdp->removable)
-@@ -424,7 +424,7 @@
- + if (stats == NULL)
- + return;
- +
--+ nsect = SCpnt->request_bufflen >> 9;
-++ nsect = scsi_bufflen(SCpnt) >> 9;
- + for (bucket = 0, tmp = nsect; tmp > 1; bucket++)
- + tmp >>= 1;
- +
-@@ -518,8 +518,8 @@
-
- Index: linux-2.6.22.19/include/scsi/sd.h
- ===================================================================
----- linux-2.6.22.19.orig/include/scsi/sd.h
--+++ linux-2.6.22.19/include/scsi/sd.h
-+--- linux-2.6.22.19.orig/drivers/scsi/sd.h
-++++ linux-2.6.22.19/drivers/scsi/sd.h
- @@ -31,6 +31,46 @@
- */
- #define SD_BUF_SIZE 512
-diff -urNad lustre~/lustre/kernel_patches/series/2.6.27-vanilla.series lustre/lustre/kernel_patches/series/2.6.27-vanilla.series
---- lustre~/lustre/kernel_patches/series/2.6.27-vanilla.series 1970-01-01 00:00:00.000000000 +0000
-+++ lustre/lustre/kernel_patches/series/2.6.27-vanilla.series 2008-12-02 15:40:00.000000000 +0100
-@@ -0,0 +1,12 @@
-+lustre_version.patch
-+vfs_races-2.6.22-vanilla.patch
-+i_filter_data.patch
-+jbd-jcberr-2.6.18-vanilla.patch
-+iopen-misc-2.6.22-vanilla.patch
-+export-truncate-2.6.18-vanilla.patch
-+export_symbols-2.6.22-vanilla.patch
-+dev_read_only-2.6.27-vanilla.patch
-+export-2.6.18-vanilla.patch
-+8kstack-2.6.27.patch
-+export-show_task-2.6.27-vanilla.patch
-+sd_iostats-2.6.27-vanilla.patch
--
Lustre Debian Packaging
More information about the Pkg-lustre-svn-commit
mailing list