/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
lnet_res_lh_initialize(the_lnet.ln_me_containers[mtable->mt_cpt],
&me->me_lh);
- head = lnet_mt_match_head(mtable, match_id, match_bits);
+ if (ignore_bits != 0)
+ head = &mtable->mt_mhash[LNET_MT_HASH_IGNORE];
+ else
+ head = lnet_mt_match_head(mtable, match_id, match_bits);
+ me->me_pos = head - &mtable->mt_mhash[0];
if (pos == LNET_INS_AFTER || pos == LNET_INS_LOCAL)
cfs_list_add_tail(&me->me_list, head);
else
lnet_res_unlock(mtable->mt_cpt);
return 0;
}
+EXPORT_SYMBOL(LNetMEAttach);
/**
* Create and a match entry and insert it before or after the ME pointed to by
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;
return 0;
}
+EXPORT_SYMBOL(LNetMEInsert);
/**
* Unlink a match entry from its match list.
return -ENOENT;
}
- md = me->me_md;
- if (md != NULL &&
- md->md_eq != NULL &&
- md->md_refcount == 0) {
- lnet_build_unlink_event(md, &ev);
- lnet_eq_enqueue_event(md->md_eq, &ev);
+ md = me->me_md;
+ if (md != NULL) {
+ md->md_flags |= LNET_MD_FLAG_ABORTED;
+ if (md->md_eq != NULL && md->md_refcount == 0) {
+ lnet_build_unlink_event(md, &ev);
+ lnet_eq_enqueue_event(md->md_eq, &ev);
+ }
}
lnet_me_unlink(me);
lnet_res_unlock(cpt);
return 0;
}
+EXPORT_SYMBOL(LNetMEUnlink);
/* call with lnet_res_lock please */
void