Whamcloud - gitweb
merge b_devel to b_eq:
authormeijia <meijia>
Wed, 21 May 2003 15:43:09 +0000 (15:43 +0000)
committermeijia <meijia>
Wed, 21 May 2003 15:43:09 +0000 (15:43 +0000)
  DEVEL_EQ_UPDATE_PARENT_20030521 -> DEVEL_EQ_UPDATE_CHILD_20030521

29 files changed:
lnet/configure.in
lnet/include/linux/kp30.h
lnet/include/lnet/lib-lnet.h
lnet/include/lnet/lib-p30.h
lnet/include/lnet/lib-types.h
lnet/klnds/qswlnd/Makefile.am
lnet/lnet/api-me.c
lnet/lnet/api-ni.c
lnet/lnet/lib-eq.c
lnet/lnet/lib-init.c
lnet/lnet/lib-md.c
lnet/lnet/lib-me.c
lnet/lnet/lib-move.c
lnet/portalsconf.m4
lnet/utils/debug.c
lustre/portals/configure.in
lustre/portals/include/linux/kp30.h
lustre/portals/include/portals/lib-p30.h
lustre/portals/include/portals/lib-types.h
lustre/portals/knals/qswnal/Makefile.am
lustre/portals/portals/api-me.c
lustre/portals/portals/api-ni.c
lustre/portals/portals/lib-eq.c
lustre/portals/portals/lib-init.c
lustre/portals/portals/lib-md.c
lustre/portals/portals/lib-me.c
lustre/portals/portals/lib-move.c
lustre/portals/portalsconf.m4
lustre/portals/utils/debug.c

index 3cffe87..2ee86b2 100644 (file)
@@ -11,9 +11,9 @@ AC_CANONICAL_SYSTEM
 AM_INIT_AUTOMAKE(portals, builtin([esyscmd], [sed -ne '/.*define IVERSION /{ s/.*IVERSION //; p; }' libcfs/module.c]))
 # AM_MAINTAINER_MODE
 
-sinclude(archdep.m4)
 sinclude(build.m4)
-sinclude<portalsconf.m4)
+sinclude(archdep.m4)
+sinclude(portalsconf.m4)
 
 if test x$enable_inkernel = xyes ; then
 cp Kernelenv.mk Kernelenv.in
index 4915fe3..46d9406 100644 (file)
@@ -80,7 +80,7 @@ extern unsigned int portal_printk;
 #define D_RPCTRACE  (1 << 20) /* for distributed debugging */
 #define D_VFSTRACE  (1 << 21)
 
-#ifndef THREAD_SIZE
+#ifndef __KERNEL__
 #define THREAD_SIZE 8192
 #endif
 #ifdef  __arch_ia64__
index ec3393b..b70e128 100644 (file)
@@ -264,8 +264,8 @@ lib_msg_free(nal_cb_t *nal, lib_msg_t *msg)
 }
 #endif
 
-extern lib_handle_t *lib_lookup_cookie (nal_cb_t *nal, __u64 cookie);
-extern void lib_initialise_handle (nal_cb_t *nal, lib_handle_t *lh);
+extern lib_handle_t *lib_lookup_cookie (nal_cb_t *nal, __u64 cookie, int type);
+extern void lib_initialise_handle (nal_cb_t *nal, lib_handle_t *lh, int type);
 extern void lib_invalidate_handle (nal_cb_t *nal, lib_handle_t *lh);
 
 static inline void
@@ -278,8 +278,8 @@ static inline lib_eq_t *
 ptl_handle2eq (ptl_handle_eq_t *handle, nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie);
-        
+        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie
+                                              PTL_COOKIE_TYPE_EQ);
         if (lh == NULL)
                 return (NULL);
 
@@ -296,8 +296,8 @@ static inline lib_md_t *
 ptl_handle2md (ptl_handle_md_t *handle, nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie);
-        
+        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie,
+                                              PTL_COOKIE_TYPE_MD);
         if (lh == NULL)
                 return (NULL);
 
@@ -313,7 +313,8 @@ ptl_wire_handle2md (ptl_handle_wire_t *wh, nal_cb_t *nal)
         if (wh->wh_interface_cookie != nal->ni.ni_interface_cookie)
                 return (NULL);
         
-        lh = lib_lookup_cookie (nal, wh->wh_object_cookie);
+        lh = lib_lookup_cookie (nal, wh->wh_object_cookie,
+                                PTL_COOKIE_TYPE_MD);
         if (lh == NULL)
                 return (NULL);
 
@@ -330,8 +331,8 @@ static inline lib_me_t *
 ptl_handle2me (ptl_handle_me_t *handle, nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie);
-        
+        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie,
+                                              PTL_COOKIE_TYPE_ME);
         if (lh == NULL)
                 return (NULL);
 
index ec3393b..b70e128 100644 (file)
@@ -264,8 +264,8 @@ lib_msg_free(nal_cb_t *nal, lib_msg_t *msg)
 }
 #endif
 
-extern lib_handle_t *lib_lookup_cookie (nal_cb_t *nal, __u64 cookie);
-extern void lib_initialise_handle (nal_cb_t *nal, lib_handle_t *lh);
+extern lib_handle_t *lib_lookup_cookie (nal_cb_t *nal, __u64 cookie, int type);
+extern void lib_initialise_handle (nal_cb_t *nal, lib_handle_t *lh, int type);
 extern void lib_invalidate_handle (nal_cb_t *nal, lib_handle_t *lh);
 
 static inline void
@@ -278,8 +278,8 @@ static inline lib_eq_t *
 ptl_handle2eq (ptl_handle_eq_t *handle, nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie);
-        
+        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie
+                                              PTL_COOKIE_TYPE_EQ);
         if (lh == NULL)
                 return (NULL);
 
@@ -296,8 +296,8 @@ static inline lib_md_t *
 ptl_handle2md (ptl_handle_md_t *handle, nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie);
-        
+        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie,
+                                              PTL_COOKIE_TYPE_MD);
         if (lh == NULL)
                 return (NULL);
 
@@ -313,7 +313,8 @@ ptl_wire_handle2md (ptl_handle_wire_t *wh, nal_cb_t *nal)
         if (wh->wh_interface_cookie != nal->ni.ni_interface_cookie)
                 return (NULL);
         
-        lh = lib_lookup_cookie (nal, wh->wh_object_cookie);
+        lh = lib_lookup_cookie (nal, wh->wh_object_cookie,
+                                PTL_COOKIE_TYPE_MD);
         if (lh == NULL)
                 return (NULL);
 
@@ -330,8 +331,8 @@ static inline lib_me_t *
 ptl_handle2me (ptl_handle_me_t *handle, nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie);
-        
+        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie,
+                                              PTL_COOKIE_TYPE_ME);
         if (lh == NULL)
                 return (NULL);
 
index 08ea118..bece0a3 100644 (file)
@@ -241,6 +241,13 @@ typedef struct {
         unsigned int      tp_threshold;        /* # failures to simulate */
 } lib_test_peer_t;
 
+#define PTL_COOKIE_TYPE_MD    1
+#define PTL_COOKIE_TYPE_ME    2
+#define PTL_COOKIE_TYPE_EQ    3
+#define PTL_COOKIE_TYPES      4
+/* PTL_COOKIE_TYPES must be a power of 2, so the cookie type can be
+ * extracted by masking with (PTL_COOKIE_TYPES - 1) */
+
 typedef struct {
         int up;
         int refcnt;
index 6759b96..3eb4dd5 100644 (file)
@@ -13,4 +13,5 @@ EXTRA_PROGRAMS = kqswnal
 #CFLAGS:= @KCFLAGS@ 
 #CPPFLAGS:=@KCPPFLAGS@
 DEFS =
+CPPFLAGS=@CPPFLAGS@ @with_quadrics@
 kqswnal_SOURCES = qswnal.c qswnal_cb.c qswnal.h
index 573e948..e724e58 100644 (file)
@@ -7,19 +7,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
index 952da4f..b2e069e 100644 (file)
@@ -7,25 +7,29 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
 #include <portals/api-support.h>
 
-#define MAX_NIS 8
+/* Put some magic in the NI handle so uninitialised/zeroed handles are easy
+ * to spot */
+#define NI_HANDLE_MAGIC  0xebc0de00
+#define NI_HANDLE_MASK   0x000000ff
+#define MAX_NIS          8         
 static nal_t *ptl_interfaces[MAX_NIS];
 int ptl_num_interfaces = 0;
 
@@ -37,7 +41,11 @@ nal_t *ptl_hndl2nal(ptl_handle_any_t *handle)
          * setup/teardown.  That ensures her NI handle can't get
          * invalidated out from under her (or worse, swapped for a
          * completely different interface!) */
-        
+
+        if (((idx ^ NI_HANDLE_MAGIC) & ~NI_HANDLE_MASK) != 0)
+                return NULL;
+
+        idx &= NI_HANDLE_MASK;
         if (idx < MAX_NIS)
                 return ptl_interfaces[idx];
 
@@ -48,6 +56,8 @@ int ptl_ni_init(void)
 {
         int i;
 
+        LASSERT (MAX_NIS <= (NI_HANDLE_MASK + 1));
+        
         for (i = 0; i < MAX_NIS; i++)
                 ptl_interfaces[i] = NULL;
 
@@ -114,7 +124,7 @@ int PtlNIInit(ptl_interface_t interface, ptl_pt_index_t ptl_size,
         for (i = 0; i < ptl_num_interfaces; i++) {
                 if (ptl_interfaces[i] == nal) {
                         nal->refct++;
-                        handle->nal_idx = i;
+                        handle->nal_idx = (NI_HANDLE_MAGIC & ~NI_HANDLE_MASK) | i;
                         fprintf(stderr, "Returning existing NAL (%d)\n", i);
                         ptl_ni_init_mutex_exit ();
                         return PTL_OK;
@@ -122,7 +132,6 @@ int PtlNIInit(ptl_interface_t interface, ptl_pt_index_t ptl_size,
         }
         nal->refct = 1;
 
-        handle->nal_idx = ptl_num_interfaces;
         if (ptl_num_interfaces >= MAX_NIS) {
                 if (nal->shutdown)
                         nal->shutdown (nal, ptl_num_interfaces);
@@ -130,6 +139,7 @@ int PtlNIInit(ptl_interface_t interface, ptl_pt_index_t ptl_size,
                 return PTL_NOSPACE;
         }
 
+        handle->nal_idx = (NI_HANDLE_MAGIC & ~NI_HANDLE_MASK) | ptl_num_interfaces;
         ptl_interfaces[ptl_num_interfaces++] = nal;
 
         ptl_eq_ni_init(nal);
@@ -143,6 +153,7 @@ int PtlNIInit(ptl_interface_t interface, ptl_pt_index_t ptl_size,
 int PtlNIFini(ptl_handle_ni_t ni)
 {
         nal_t *nal;
+        int idx;
         int rc;
 
         if (!ptl_init)
@@ -156,6 +167,8 @@ int PtlNIFini(ptl_handle_ni_t ni)
                 return PTL_INV_HANDLE;
         }
 
+        idx = ni.nal_idx & NI_HANDLE_MASK;
+
         nal->refct--;
         if (nal->refct > 0) {
                 ptl_ni_init_mutex_exit ();
@@ -167,9 +180,9 @@ int PtlNIFini(ptl_handle_ni_t ni)
 
         rc = PTL_OK;
         if (nal->shutdown)
-                rc = nal->shutdown(nal, ni.nal_idx);
+                rc = nal->shutdown(nal, idx);
 
-        ptl_interfaces[ni.nal_idx] = NULL;
+        ptl_interfaces[idx] = NULL;
         ptl_num_interfaces--;
 
         ptl_ni_init_mutex_exit ();
index 4c6c292..ce343c1 100644 (file)
@@ -7,19 +7,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
@@ -76,7 +76,7 @@ int do_PtlEQAlloc_internal(nal_cb_t * nal, void *private, void *v_args,
         eq->eq_refcount = 0;
         eq->event_callback = args->callback_in;
 
-        lib_initialise_handle (nal, &eq->eq_lh);
+        lib_initialise_handle (nal, &eq->eq_lh, PTL_COOKIE_TYPE_EQ);
         list_add (&eq->eq_list, &nal->ni.ni_active_eqs);
 
         state_unlock(nal, &flags);
index 40f3d2c..d6315c6 100644 (file)
@@ -8,19 +8,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
@@ -278,7 +278,7 @@ lib_setup_handle_hash (nal_cb_t *nal)
         for (i = 0; i < ni->ni_lh_hash_size; i++)
                 INIT_LIST_HEAD (&ni->ni_lh_hash_table[i]);
 
-        ni->ni_next_object_cookie = 0;
+        ni->ni_next_object_cookie = PTL_COOKIE_TYPES;
         
         return (PTL_OK);
 }
@@ -296,7 +296,7 @@ lib_cleanup_handle_hash (nal_cb_t *nal)
 }
 
 lib_handle_t *
-lib_lookup_cookie (nal_cb_t *nal, __u64 cookie) 
+lib_lookup_cookie (nal_cb_t *nal, __u64 cookie, int type
 {
         /* ALWAYS called with statelock held */
         lib_ni_t            *ni = &nal->ni;
@@ -304,6 +304,9 @@ lib_lookup_cookie (nal_cb_t *nal, __u64 cookie)
         struct list_head    *el;
         unsigned int         hash;
 
+        if ((cookie & (PTL_COOKIE_TYPES - 1)) != type)
+                return (NULL);
+        
         hash = ((unsigned int)cookie) % ni->ni_lh_hash_size;
         list = &ni->ni_lh_hash_table[hash];
         
@@ -318,13 +321,16 @@ lib_lookup_cookie (nal_cb_t *nal, __u64 cookie)
 }
 
 void
-lib_initialise_handle (nal_cb_t *nal, lib_handle_t *lh) 
+lib_initialise_handle (nal_cb_t *nal, lib_handle_t *lh, int type
 {
         /* ALWAYS called with statelock held */
         lib_ni_t       *ni = &nal->ni;
         unsigned int    hash;
+
+        LASSERT (type >= 0 && type < PTL_COOKIE_TYPES);
+        lh->lh_cookie = ni->ni_next_object_cookie | type;
+        ni->ni_next_object_cookie += PTL_COOKIE_TYPES;
         
-        lh->lh_cookie = ni->ni_next_object_cookie++;
         hash = ((unsigned int)lh->lh_cookie) % ni->ni_lh_hash_size;
         list_add (&lh->lh_hash_chain, &ni->ni_lh_hash_table[hash]);
 }
index d171050..a79e2be 100644 (file)
@@ -7,19 +7,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
@@ -197,7 +197,7 @@ static int lib_md_build(nal_cb_t *nal, lib_md_t *new, void *private,
                 eq->eq_refcount++;
 
         /* It's good; let handle2md succeed and add to active mds */
-        lib_initialise_handle (nal, &new->md_lh);
+        lib_initialise_handle (nal, &new->md_lh, PTL_COOKIE_TYPE_MD);
         list_add (&new->md_list, &nal->ni.ni_active_mds);
 
         return PTL_OK;
index 34fb606..bd1af5b 100644 (file)
@@ -7,19 +7,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
@@ -63,7 +63,7 @@ int do_PtlMEAttach(nal_cb_t * nal, void *private, void *v_args, void *v_ret)
         me->unlink = args->unlink_in;
         me->md = NULL;
 
-        lib_initialise_handle (nal, &me->me_lh);
+        lib_initialise_handle (nal, &me->me_lh, PTL_COOKIE_TYPE_ME);
 
         if (args->position_in == PTL_INS_AFTER)
                 list_add_tail(&me->me_list, &(tbl->tbl[args->index_in]));
@@ -107,7 +107,7 @@ int do_PtlMEInsert(nal_cb_t * nal, void *private, void *v_args, void *v_ret)
         new->unlink = args->unlink_in;
         new->md = NULL;
 
-        lib_initialise_handle (nal, &new->me_lh);
+        lib_initialise_handle (nal, &new->me_lh, PTL_COOKIE_TYPE_ME);
 
         if (args->position_in == PTL_INS_AFTER)
                 list_add_tail(&new->me_list, &me->me_list);
index 7ba1664..413f74e 100644 (file)
@@ -7,19 +7,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
index 071ead5..7bd3919 100644 (file)
@@ -54,22 +54,22 @@ AC_ARG_ENABLE(affinity, [  --enable-affinity enable process/irq affinity],enable
 AC_MSG_CHECKING(if quadrics kernel headers are present)
 if test -d $LINUX/drivers/net/qsnet ; then
   AC_MSG_RESULT(yes)
-  QSWNAL="rqswnal"
+  QSWNAL="qswnal"
   with_quadrics="-I$LINUX/drivers/net/qsnet/include"
   :
 elif test -d $LINUX/drivers/qsnet1 ; then
   AC_MSG_RESULT(yes)
-  QSWNAL="rqswnal"
+  QSWNAL="qswnal"
   with_quadrics="-I$LINUX/drivers/qsnet1/include -DPROPRIETARY_ELAN"
   :
 elif test -d $LINUX/drivers/quadrics ; then
   AC_MSG_RESULT(yes)
-  QSWNAL="rqswnal"
+  QSWNAL="qswnal"
   with_quadrics="-I$LINUX/drivers/quadrics/include -DPROPRIETARY_ELAN"
   :
 #elif test -d /usr/include/elan3 ; then
 #  AC_MSG_RESULT(yes)
-#  QSWNAL="rqswnal"
+#  QSWNAL="qswnal"
 #  with_quadrics=""
 #  :
 else
index 13572dc..9ab1c73 100644 (file)
@@ -319,8 +319,6 @@ int jt_dbg_debug_kernel(int argc, char **argv)
         newdata = (struct portal_ioctl_data *)buf;
         if (newdata->ioc_size > 0)
                 dump_buffer(fd, databuf, newdata->ioc_size, raw);
-        else
-                fprintf(stderr, "No data in the debug buffer.\n");
 
  out:
         if (databuf)
@@ -532,8 +530,8 @@ int jt_dbg_modules(int argc, char **argv)
         struct mod_paths {
                 char *name, *path;
         } *mp, mod_paths[] = {
-                {"portals", "portals/linux/oslib"},
-                {"ksocknal", "portals/linux/socknal"},
+                {"portals", "lustre/portals/libcfs"},
+                {"ksocknal", "lustre/portals/knals/socknal"},
                 {"obdclass", "lustre/obdclass"},
                 {"ptlrpc", "lustre/ptlrpc"},
                 {"obdext2", "lustre/obdext2"},
index 3cffe87..2ee86b2 100644 (file)
@@ -11,9 +11,9 @@ AC_CANONICAL_SYSTEM
 AM_INIT_AUTOMAKE(portals, builtin([esyscmd], [sed -ne '/.*define IVERSION /{ s/.*IVERSION //; p; }' libcfs/module.c]))
 # AM_MAINTAINER_MODE
 
-sinclude(archdep.m4)
 sinclude(build.m4)
-sinclude<portalsconf.m4)
+sinclude(archdep.m4)
+sinclude(portalsconf.m4)
 
 if test x$enable_inkernel = xyes ; then
 cp Kernelenv.mk Kernelenv.in
index 4915fe3..46d9406 100644 (file)
@@ -80,7 +80,7 @@ extern unsigned int portal_printk;
 #define D_RPCTRACE  (1 << 20) /* for distributed debugging */
 #define D_VFSTRACE  (1 << 21)
 
-#ifndef THREAD_SIZE
+#ifndef __KERNEL__
 #define THREAD_SIZE 8192
 #endif
 #ifdef  __arch_ia64__
index ec3393b..b70e128 100644 (file)
@@ -264,8 +264,8 @@ lib_msg_free(nal_cb_t *nal, lib_msg_t *msg)
 }
 #endif
 
-extern lib_handle_t *lib_lookup_cookie (nal_cb_t *nal, __u64 cookie);
-extern void lib_initialise_handle (nal_cb_t *nal, lib_handle_t *lh);
+extern lib_handle_t *lib_lookup_cookie (nal_cb_t *nal, __u64 cookie, int type);
+extern void lib_initialise_handle (nal_cb_t *nal, lib_handle_t *lh, int type);
 extern void lib_invalidate_handle (nal_cb_t *nal, lib_handle_t *lh);
 
 static inline void
@@ -278,8 +278,8 @@ static inline lib_eq_t *
 ptl_handle2eq (ptl_handle_eq_t *handle, nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie);
-        
+        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie
+                                              PTL_COOKIE_TYPE_EQ);
         if (lh == NULL)
                 return (NULL);
 
@@ -296,8 +296,8 @@ static inline lib_md_t *
 ptl_handle2md (ptl_handle_md_t *handle, nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie);
-        
+        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie,
+                                              PTL_COOKIE_TYPE_MD);
         if (lh == NULL)
                 return (NULL);
 
@@ -313,7 +313,8 @@ ptl_wire_handle2md (ptl_handle_wire_t *wh, nal_cb_t *nal)
         if (wh->wh_interface_cookie != nal->ni.ni_interface_cookie)
                 return (NULL);
         
-        lh = lib_lookup_cookie (nal, wh->wh_object_cookie);
+        lh = lib_lookup_cookie (nal, wh->wh_object_cookie,
+                                PTL_COOKIE_TYPE_MD);
         if (lh == NULL)
                 return (NULL);
 
@@ -330,8 +331,8 @@ static inline lib_me_t *
 ptl_handle2me (ptl_handle_me_t *handle, nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie);
-        
+        lib_handle_t *lh = lib_lookup_cookie (nal, handle->cookie,
+                                              PTL_COOKIE_TYPE_ME);
         if (lh == NULL)
                 return (NULL);
 
index 08ea118..bece0a3 100644 (file)
@@ -241,6 +241,13 @@ typedef struct {
         unsigned int      tp_threshold;        /* # failures to simulate */
 } lib_test_peer_t;
 
+#define PTL_COOKIE_TYPE_MD    1
+#define PTL_COOKIE_TYPE_ME    2
+#define PTL_COOKIE_TYPE_EQ    3
+#define PTL_COOKIE_TYPES      4
+/* PTL_COOKIE_TYPES must be a power of 2, so the cookie type can be
+ * extracted by masking with (PTL_COOKIE_TYPES - 1) */
+
 typedef struct {
         int up;
         int refcnt;
index 6759b96..3eb4dd5 100644 (file)
@@ -13,4 +13,5 @@ EXTRA_PROGRAMS = kqswnal
 #CFLAGS:= @KCFLAGS@ 
 #CPPFLAGS:=@KCPPFLAGS@
 DEFS =
+CPPFLAGS=@CPPFLAGS@ @with_quadrics@
 kqswnal_SOURCES = qswnal.c qswnal_cb.c qswnal.h
index 573e948..e724e58 100644 (file)
@@ -7,19 +7,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
index 952da4f..b2e069e 100644 (file)
@@ -7,25 +7,29 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
 #include <portals/api-support.h>
 
-#define MAX_NIS 8
+/* Put some magic in the NI handle so uninitialised/zeroed handles are easy
+ * to spot */
+#define NI_HANDLE_MAGIC  0xebc0de00
+#define NI_HANDLE_MASK   0x000000ff
+#define MAX_NIS          8         
 static nal_t *ptl_interfaces[MAX_NIS];
 int ptl_num_interfaces = 0;
 
@@ -37,7 +41,11 @@ nal_t *ptl_hndl2nal(ptl_handle_any_t *handle)
          * setup/teardown.  That ensures her NI handle can't get
          * invalidated out from under her (or worse, swapped for a
          * completely different interface!) */
-        
+
+        if (((idx ^ NI_HANDLE_MAGIC) & ~NI_HANDLE_MASK) != 0)
+                return NULL;
+
+        idx &= NI_HANDLE_MASK;
         if (idx < MAX_NIS)
                 return ptl_interfaces[idx];
 
@@ -48,6 +56,8 @@ int ptl_ni_init(void)
 {
         int i;
 
+        LASSERT (MAX_NIS <= (NI_HANDLE_MASK + 1));
+        
         for (i = 0; i < MAX_NIS; i++)
                 ptl_interfaces[i] = NULL;
 
@@ -114,7 +124,7 @@ int PtlNIInit(ptl_interface_t interface, ptl_pt_index_t ptl_size,
         for (i = 0; i < ptl_num_interfaces; i++) {
                 if (ptl_interfaces[i] == nal) {
                         nal->refct++;
-                        handle->nal_idx = i;
+                        handle->nal_idx = (NI_HANDLE_MAGIC & ~NI_HANDLE_MASK) | i;
                         fprintf(stderr, "Returning existing NAL (%d)\n", i);
                         ptl_ni_init_mutex_exit ();
                         return PTL_OK;
@@ -122,7 +132,6 @@ int PtlNIInit(ptl_interface_t interface, ptl_pt_index_t ptl_size,
         }
         nal->refct = 1;
 
-        handle->nal_idx = ptl_num_interfaces;
         if (ptl_num_interfaces >= MAX_NIS) {
                 if (nal->shutdown)
                         nal->shutdown (nal, ptl_num_interfaces);
@@ -130,6 +139,7 @@ int PtlNIInit(ptl_interface_t interface, ptl_pt_index_t ptl_size,
                 return PTL_NOSPACE;
         }
 
+        handle->nal_idx = (NI_HANDLE_MAGIC & ~NI_HANDLE_MASK) | ptl_num_interfaces;
         ptl_interfaces[ptl_num_interfaces++] = nal;
 
         ptl_eq_ni_init(nal);
@@ -143,6 +153,7 @@ int PtlNIInit(ptl_interface_t interface, ptl_pt_index_t ptl_size,
 int PtlNIFini(ptl_handle_ni_t ni)
 {
         nal_t *nal;
+        int idx;
         int rc;
 
         if (!ptl_init)
@@ -156,6 +167,8 @@ int PtlNIFini(ptl_handle_ni_t ni)
                 return PTL_INV_HANDLE;
         }
 
+        idx = ni.nal_idx & NI_HANDLE_MASK;
+
         nal->refct--;
         if (nal->refct > 0) {
                 ptl_ni_init_mutex_exit ();
@@ -167,9 +180,9 @@ int PtlNIFini(ptl_handle_ni_t ni)
 
         rc = PTL_OK;
         if (nal->shutdown)
-                rc = nal->shutdown(nal, ni.nal_idx);
+                rc = nal->shutdown(nal, idx);
 
-        ptl_interfaces[ni.nal_idx] = NULL;
+        ptl_interfaces[idx] = NULL;
         ptl_num_interfaces--;
 
         ptl_ni_init_mutex_exit ();
index 4c6c292..ce343c1 100644 (file)
@@ -7,19 +7,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
@@ -76,7 +76,7 @@ int do_PtlEQAlloc_internal(nal_cb_t * nal, void *private, void *v_args,
         eq->eq_refcount = 0;
         eq->event_callback = args->callback_in;
 
-        lib_initialise_handle (nal, &eq->eq_lh);
+        lib_initialise_handle (nal, &eq->eq_lh, PTL_COOKIE_TYPE_EQ);
         list_add (&eq->eq_list, &nal->ni.ni_active_eqs);
 
         state_unlock(nal, &flags);
index 40f3d2c..d6315c6 100644 (file)
@@ -8,19 +8,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
@@ -278,7 +278,7 @@ lib_setup_handle_hash (nal_cb_t *nal)
         for (i = 0; i < ni->ni_lh_hash_size; i++)
                 INIT_LIST_HEAD (&ni->ni_lh_hash_table[i]);
 
-        ni->ni_next_object_cookie = 0;
+        ni->ni_next_object_cookie = PTL_COOKIE_TYPES;
         
         return (PTL_OK);
 }
@@ -296,7 +296,7 @@ lib_cleanup_handle_hash (nal_cb_t *nal)
 }
 
 lib_handle_t *
-lib_lookup_cookie (nal_cb_t *nal, __u64 cookie) 
+lib_lookup_cookie (nal_cb_t *nal, __u64 cookie, int type
 {
         /* ALWAYS called with statelock held */
         lib_ni_t            *ni = &nal->ni;
@@ -304,6 +304,9 @@ lib_lookup_cookie (nal_cb_t *nal, __u64 cookie)
         struct list_head    *el;
         unsigned int         hash;
 
+        if ((cookie & (PTL_COOKIE_TYPES - 1)) != type)
+                return (NULL);
+        
         hash = ((unsigned int)cookie) % ni->ni_lh_hash_size;
         list = &ni->ni_lh_hash_table[hash];
         
@@ -318,13 +321,16 @@ lib_lookup_cookie (nal_cb_t *nal, __u64 cookie)
 }
 
 void
-lib_initialise_handle (nal_cb_t *nal, lib_handle_t *lh) 
+lib_initialise_handle (nal_cb_t *nal, lib_handle_t *lh, int type
 {
         /* ALWAYS called with statelock held */
         lib_ni_t       *ni = &nal->ni;
         unsigned int    hash;
+
+        LASSERT (type >= 0 && type < PTL_COOKIE_TYPES);
+        lh->lh_cookie = ni->ni_next_object_cookie | type;
+        ni->ni_next_object_cookie += PTL_COOKIE_TYPES;
         
-        lh->lh_cookie = ni->ni_next_object_cookie++;
         hash = ((unsigned int)lh->lh_cookie) % ni->ni_lh_hash_size;
         list_add (&lh->lh_hash_chain, &ni->ni_lh_hash_table[hash]);
 }
index d171050..a79e2be 100644 (file)
@@ -7,19 +7,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
@@ -197,7 +197,7 @@ static int lib_md_build(nal_cb_t *nal, lib_md_t *new, void *private,
                 eq->eq_refcount++;
 
         /* It's good; let handle2md succeed and add to active mds */
-        lib_initialise_handle (nal, &new->md_lh);
+        lib_initialise_handle (nal, &new->md_lh, PTL_COOKIE_TYPE_MD);
         list_add (&new->md_list, &nal->ni.ni_active_mds);
 
         return PTL_OK;
index 34fb606..bd1af5b 100644 (file)
@@ -7,19 +7,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
@@ -63,7 +63,7 @@ int do_PtlMEAttach(nal_cb_t * nal, void *private, void *v_args, void *v_ret)
         me->unlink = args->unlink_in;
         me->md = NULL;
 
-        lib_initialise_handle (nal, &me->me_lh);
+        lib_initialise_handle (nal, &me->me_lh, PTL_COOKIE_TYPE_ME);
 
         if (args->position_in == PTL_INS_AFTER)
                 list_add_tail(&me->me_list, &(tbl->tbl[args->index_in]));
@@ -107,7 +107,7 @@ int do_PtlMEInsert(nal_cb_t * nal, void *private, void *v_args, void *v_ret)
         new->unlink = args->unlink_in;
         new->md = NULL;
 
-        lib_initialise_handle (nal, &new->me_lh);
+        lib_initialise_handle (nal, &new->me_lh, PTL_COOKIE_TYPE_ME);
 
         if (args->position_in == PTL_INS_AFTER)
                 list_add_tail(&new->me_list, &me->me_list);
index 7ba1664..413f74e 100644 (file)
@@ -7,19 +7,19 @@
  *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
  *  Copyright (c) 2001-2002 Sandia National Laboratories
  *
- *   This file is part of Portals, http://www.sf.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.sf.net/projects/lustre/
  *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2.1 of the GNU Lesser General
- *   Public License as published by the Free Software Foundation.
+ *   Lustre is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
  *
- *   Portals is distributed in the hope that it will be useful,
+ *   Lustre is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
+ *   GNU General Public License for more details.
  *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with Portals; if not, write to the Free Software
+ *   You should have received a copy of the GNU General Public License
+ *   along with Lustre; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
index 071ead5..7bd3919 100644 (file)
@@ -54,22 +54,22 @@ AC_ARG_ENABLE(affinity, [  --enable-affinity enable process/irq affinity],enable
 AC_MSG_CHECKING(if quadrics kernel headers are present)
 if test -d $LINUX/drivers/net/qsnet ; then
   AC_MSG_RESULT(yes)
-  QSWNAL="rqswnal"
+  QSWNAL="qswnal"
   with_quadrics="-I$LINUX/drivers/net/qsnet/include"
   :
 elif test -d $LINUX/drivers/qsnet1 ; then
   AC_MSG_RESULT(yes)
-  QSWNAL="rqswnal"
+  QSWNAL="qswnal"
   with_quadrics="-I$LINUX/drivers/qsnet1/include -DPROPRIETARY_ELAN"
   :
 elif test -d $LINUX/drivers/quadrics ; then
   AC_MSG_RESULT(yes)
-  QSWNAL="rqswnal"
+  QSWNAL="qswnal"
   with_quadrics="-I$LINUX/drivers/quadrics/include -DPROPRIETARY_ELAN"
   :
 #elif test -d /usr/include/elan3 ; then
 #  AC_MSG_RESULT(yes)
-#  QSWNAL="rqswnal"
+#  QSWNAL="qswnal"
 #  with_quadrics=""
 #  :
 else
index 13572dc..9ab1c73 100644 (file)
@@ -319,8 +319,6 @@ int jt_dbg_debug_kernel(int argc, char **argv)
         newdata = (struct portal_ioctl_data *)buf;
         if (newdata->ioc_size > 0)
                 dump_buffer(fd, databuf, newdata->ioc_size, raw);
-        else
-                fprintf(stderr, "No data in the debug buffer.\n");
 
  out:
         if (databuf)
@@ -532,8 +530,8 @@ int jt_dbg_modules(int argc, char **argv)
         struct mod_paths {
                 char *name, *path;
         } *mp, mod_paths[] = {
-                {"portals", "portals/linux/oslib"},
-                {"ksocknal", "portals/linux/socknal"},
+                {"portals", "lustre/portals/libcfs"},
+                {"ksocknal", "lustre/portals/knals/socknal"},
                 {"obdclass", "lustre/obdclass"},
                 {"ptlrpc", "lustre/ptlrpc"},
                 {"obdext2", "lustre/obdext2"},