From 057263767c3d2b5c11a8b3b501e70e0e2e51610e Mon Sep 17 00:00:00 2001 From: meijia Date: Wed, 21 May 2003 15:43:09 +0000 Subject: [PATCH] merge b_devel to b_eq: DEVEL_EQ_UPDATE_PARENT_20030521 -> DEVEL_EQ_UPDATE_CHILD_20030521 --- lnet/configure.in | 4 +-- lnet/include/linux/kp30.h | 2 +- lnet/include/lnet/lib-lnet.h | 19 +++++++------- lnet/include/lnet/lib-p30.h | 19 +++++++------- lnet/include/lnet/lib-types.h | 7 +++++ lnet/klnds/qswlnd/Makefile.am | 1 + lnet/lnet/api-me.c | 16 ++++++------ lnet/lnet/api-ni.c | 41 ++++++++++++++++++++---------- lnet/lnet/lib-eq.c | 18 ++++++------- lnet/lnet/lib-init.c | 30 +++++++++++++--------- lnet/lnet/lib-md.c | 18 ++++++------- lnet/lnet/lib-me.c | 20 +++++++-------- lnet/lnet/lib-move.c | 16 ++++++------ lnet/portalsconf.m4 | 8 +++--- lnet/utils/debug.c | 6 ++--- lustre/portals/configure.in | 4 +-- lustre/portals/include/linux/kp30.h | 2 +- lustre/portals/include/portals/lib-p30.h | 19 +++++++------- lustre/portals/include/portals/lib-types.h | 7 +++++ lustre/portals/knals/qswnal/Makefile.am | 1 + lustre/portals/portals/api-me.c | 16 ++++++------ lustre/portals/portals/api-ni.c | 41 ++++++++++++++++++++---------- lustre/portals/portals/lib-eq.c | 18 ++++++------- lustre/portals/portals/lib-init.c | 30 +++++++++++++--------- lustre/portals/portals/lib-md.c | 18 ++++++------- lustre/portals/portals/lib-me.c | 20 +++++++-------- lustre/portals/portals/lib-move.c | 16 ++++++------ lustre/portals/portalsconf.m4 | 8 +++--- lustre/portals/utils/debug.c | 6 ++--- 29 files changed, 242 insertions(+), 189 deletions(-) diff --git a/lnet/configure.in b/lnet/configure.in index 3cffe87..2ee86b2 100644 --- a/lnet/configure.in +++ b/lnet/configure.in @@ -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) -sincludecookie); - + 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); diff --git a/lnet/include/lnet/lib-p30.h b/lnet/include/lnet/lib-p30.h index ec3393b..b70e128 100644 --- a/lnet/include/lnet/lib-p30.h +++ b/lnet/include/lnet/lib-p30.h @@ -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); diff --git a/lnet/include/lnet/lib-types.h b/lnet/include/lnet/lib-types.h index 08ea118..bece0a30 100644 --- a/lnet/include/lnet/lib-types.h +++ b/lnet/include/lnet/lib-types.h @@ -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; diff --git a/lnet/klnds/qswlnd/Makefile.am b/lnet/klnds/qswlnd/Makefile.am index 6759b96..3eb4dd5 100644 --- a/lnet/klnds/qswlnd/Makefile.am +++ b/lnet/klnds/qswlnd/Makefile.am @@ -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 diff --git a/lnet/lnet/api-me.c b/lnet/lnet/api-me.c index 573e948..e724e58 100644 --- a/lnet/lnet/api-me.c +++ b/lnet/lnet/api-me.c @@ -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. */ diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 952da4f..b2e069e 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -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 -#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 (); diff --git a/lnet/lnet/lib-eq.c b/lnet/lnet/lib-eq.c index 4c6c292..ce343c1 100644 --- a/lnet/lnet/lib-eq.c +++ b/lnet/lnet/lib-eq.c @@ -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); diff --git a/lnet/lnet/lib-init.c b/lnet/lnet/lib-init.c index 40f3d2c..d6315c6 100644 --- a/lnet/lnet/lib-init.c +++ b/lnet/lnet/lib-init.c @@ -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]); } diff --git a/lnet/lnet/lib-md.c b/lnet/lnet/lib-md.c index d171050..a79e2be 100644 --- a/lnet/lnet/lib-md.c +++ b/lnet/lnet/lib-md.c @@ -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; diff --git a/lnet/lnet/lib-me.c b/lnet/lnet/lib-me.c index 34fb606..bd1af5b 100644 --- a/lnet/lnet/lib-me.c +++ b/lnet/lnet/lib-me.c @@ -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); diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index 7ba1664..413f74e 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -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. */ diff --git a/lnet/portalsconf.m4 b/lnet/portalsconf.m4 index 071ead5..7bd3919 100644 --- a/lnet/portalsconf.m4 +++ b/lnet/portalsconf.m4 @@ -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 diff --git a/lnet/utils/debug.c b/lnet/utils/debug.c index 13572dc..9ab1c73d 100644 --- a/lnet/utils/debug.c +++ b/lnet/utils/debug.c @@ -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"}, diff --git a/lustre/portals/configure.in b/lustre/portals/configure.in index 3cffe87..2ee86b2 100644 --- a/lustre/portals/configure.in +++ b/lustre/portals/configure.in @@ -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) -sincludecookie); - + 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); diff --git a/lustre/portals/include/portals/lib-types.h b/lustre/portals/include/portals/lib-types.h index 08ea118..bece0a30 100644 --- a/lustre/portals/include/portals/lib-types.h +++ b/lustre/portals/include/portals/lib-types.h @@ -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; diff --git a/lustre/portals/knals/qswnal/Makefile.am b/lustre/portals/knals/qswnal/Makefile.am index 6759b96..3eb4dd5 100644 --- a/lustre/portals/knals/qswnal/Makefile.am +++ b/lustre/portals/knals/qswnal/Makefile.am @@ -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 diff --git a/lustre/portals/portals/api-me.c b/lustre/portals/portals/api-me.c index 573e948..e724e58 100644 --- a/lustre/portals/portals/api-me.c +++ b/lustre/portals/portals/api-me.c @@ -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. */ diff --git a/lustre/portals/portals/api-ni.c b/lustre/portals/portals/api-ni.c index 952da4f..b2e069e 100644 --- a/lustre/portals/portals/api-ni.c +++ b/lustre/portals/portals/api-ni.c @@ -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 -#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 (); diff --git a/lustre/portals/portals/lib-eq.c b/lustre/portals/portals/lib-eq.c index 4c6c292..ce343c1 100644 --- a/lustre/portals/portals/lib-eq.c +++ b/lustre/portals/portals/lib-eq.c @@ -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); diff --git a/lustre/portals/portals/lib-init.c b/lustre/portals/portals/lib-init.c index 40f3d2c..d6315c6 100644 --- a/lustre/portals/portals/lib-init.c +++ b/lustre/portals/portals/lib-init.c @@ -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]); } diff --git a/lustre/portals/portals/lib-md.c b/lustre/portals/portals/lib-md.c index d171050..a79e2be 100644 --- a/lustre/portals/portals/lib-md.c +++ b/lustre/portals/portals/lib-md.c @@ -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; diff --git a/lustre/portals/portals/lib-me.c b/lustre/portals/portals/lib-me.c index 34fb606..bd1af5b 100644 --- a/lustre/portals/portals/lib-me.c +++ b/lustre/portals/portals/lib-me.c @@ -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); diff --git a/lustre/portals/portals/lib-move.c b/lustre/portals/portals/lib-move.c index 7ba1664..413f74e 100644 --- a/lustre/portals/portals/lib-move.c +++ b/lustre/portals/portals/lib-move.c @@ -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. */ diff --git a/lustre/portals/portalsconf.m4 b/lustre/portals/portalsconf.m4 index 071ead5..7bd3919 100644 --- a/lustre/portals/portalsconf.m4 +++ b/lustre/portals/portalsconf.m4 @@ -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 diff --git a/lustre/portals/utils/debug.c b/lustre/portals/utils/debug.c index 13572dc..9ab1c73d 100644 --- a/lustre/portals/utils/debug.c +++ b/lustre/portals/utils/debug.c @@ -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"}, -- 1.8.3.1