X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Flnet%2Flib-me.c;h=8c9faabf6ff3e016854aa59fb3cbbebc5cd820d8;hb=76adbed805e71995d521d1a26e1e3d93f3dfd7b7;hp=9f39a8718c723dc2e3ba98b0d20d1cfa441babba;hpb=2b8c4566a6a63cdf09e555a744ce6a1453651b98;p=fs%2Flustre-release.git diff --git a/lnet/lnet/lib-me.c b/lnet/lnet/lib-me.c index 9f39a87..8c9faab 100644 --- a/lnet/lnet/lib-me.c +++ b/lnet/lnet/lib-me.c @@ -15,11 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ @@ -68,16 +64,16 @@ * object is saved here. This handle can be used later in LNetMEInsert(), * LNetMEUnlink(), or LNetMDAttach() functions. * - * \retval 0 On success. + * \retval 0 On success. * \retval -EINVAL If \a portal is invalid. * \retval -ENOMEM If new ME object cannot be allocated. */ int LNetMEAttach(unsigned int portal, - lnet_process_id_t match_id, - __u64 match_bits, __u64 ignore_bits, - lnet_unlink_t unlink, lnet_ins_pos_t pos, - lnet_handle_me_t *handle) + lnet_process_id_t match_id, + __u64 match_bits, __u64 ignore_bits, + lnet_unlink_t unlink, lnet_ins_pos_t pos, + lnet_handle_me_t *handle) { struct lnet_match_table *mtable; struct lnet_me *me; @@ -99,12 +95,12 @@ LNetMEAttach(unsigned int portal, lnet_res_lock(mtable->mt_cpt); - me->me_portal = portal; - me->me_match_id = match_id; - me->me_match_bits = match_bits; - me->me_ignore_bits = ignore_bits; - me->me_unlink = unlink; - me->me_md = NULL; + me->me_portal = portal; + me->me_match_id = match_id; + me->me_match_bits = match_bits; + me->me_ignore_bits = ignore_bits; + me->me_unlink = unlink; + me->me_md = NULL; lnet_res_lh_initialize(the_lnet.ln_me_containers[mtable->mt_cpt], &me->me_lh); @@ -139,16 +135,16 @@ EXPORT_SYMBOL(LNetMEAttach); * \param match_id,match_bits,ignore_bits,unlink,pos,handle See the discussion * for LNetMEAttach(). * - * \retval 0 On success. + * \retval 0 On success. * \retval -ENOMEM If new ME object cannot be allocated. * \retval -ENOENT If \a current_meh does not point to a valid match entry. */ int LNetMEInsert(lnet_handle_me_t current_meh, - lnet_process_id_t match_id, - __u64 match_bits, __u64 ignore_bits, - lnet_unlink_t unlink, lnet_ins_pos_t pos, - lnet_handle_me_t *handle) + lnet_process_id_t match_id, + __u64 match_bits, __u64 ignore_bits, + lnet_unlink_t unlink, lnet_ins_pos_t pos, + lnet_handle_me_t *handle) { struct lnet_me *current_me; struct lnet_me *new_me; @@ -184,15 +180,15 @@ LNetMEInsert(lnet_handle_me_t current_meh, lnet_me_free(new_me); lnet_res_unlock(cpt); return -EPERM; - } + } new_me->me_pos = current_me->me_pos; - new_me->me_portal = current_me->me_portal; - new_me->me_match_id = match_id; - new_me->me_match_bits = match_bits; - new_me->me_ignore_bits = ignore_bits; - new_me->me_unlink = unlink; - new_me->me_md = NULL; + new_me->me_portal = current_me->me_portal; + new_me->me_match_id = match_id; + new_me->me_match_bits = match_bits; + new_me->me_ignore_bits = ignore_bits; + new_me->me_unlink = unlink; + new_me->me_md = NULL; lnet_res_lh_initialize(the_lnet.ln_me_containers[cpt], &new_me->me_lh); @@ -219,7 +215,7 @@ EXPORT_SYMBOL(LNetMEInsert); * * \param meh A handle for the ME to be unlinked. * - * \retval 0 On success. + * \retval 0 On success. * \retval -ENOENT If \a meh does not point to a valid ME. * \see LNetMDUnlink() for the discussion on delivering unlink event. */ @@ -239,8 +235,8 @@ LNetMEUnlink(lnet_handle_me_t meh) me = lnet_handle2me(&meh); if (me == NULL) { lnet_res_unlock(cpt); - return -ENOENT; - } + return -ENOENT; + } md = me->me_md; if (md != NULL) { @@ -281,15 +277,15 @@ static void lib_me_dump(lnet_me_t *me) { CWARN("Match Entry %p (%#llx)\n", me, - me->me_lh.lh_cookie); + me->me_lh.lh_cookie); - CWARN("\tMatch/Ignore\t= %016lx / %016lx\n", - me->me_match_bits, me->me_ignore_bits); + CWARN("\tMatch/Ignore\t= %016lx / %016lx\n", + me->me_match_bits, me->me_ignore_bits); - CWARN("\tMD\t= %p\n", me->md); - CWARN("\tprev\t= %p\n", + CWARN("\tMD\t= %p\n", me->md); + CWARN("\tprev\t= %p\n", list_entry(me->me_list.prev, lnet_me_t, me_list)); - CWARN("\tnext\t= %p\n", + CWARN("\tnext\t= %p\n", list_entry(me->me_list.next, lnet_me_t, me_list)); } #endif