[Pvfs2-cvs] commit by atchley in pvfs2/src/io/bmi/bmi_mx: mx.c
CVS commit program
cvs at parl.clemson.edu
Wed Feb 27 15:10:19 EST 2008
Update of /projects/cvsroot/pvfs2/src/io/bmi/bmi_mx
In directory parlweb1:/tmp/cvs-serv14870
Modified Files:
mx.c
Log Message:
In BMI_mx_cancel(), if it is a send, try to complete it with mx_test()
before using mx_disconnect(). This allows easier reconnecting between
MX and Open-MX.
Index: mx.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi_mx/mx.c,v
diff -p -u -r1.18 -r1.19
--- mx.c 26 Feb 2008 19:39:49 -0000 1.18
+++ mx.c 27 Feb 2008 20:10:18 -0000 1.19
@@ -2965,7 +2965,19 @@ BMI_mx_cancel(bmi_op_id_t id, bmi_contex
break;
case BMX_CTX_PENDING:
if (ctx->mxc_type == BMX_REQ_TX) {
- bmx_peer_disconnect(peer, 1, BMI_ENETRESET);
+ /* see if it completed first */
+ mx_test(bmi_mx->bmx_ep, &ctx->mxc_mxreq, &ctx->mxc_mxstat, &result);
+ if (result == 1) {
+ debug(BMX_DB_CTX, "%s completed TX op_id %llu "
+ "mxc_state %d peer state %d status.code %s",
+ __func__, llu(ctx->mxc_mop->op_id), ctx->mxc_state,
+ peer->mxp_state, mx_strstatus(ctx->mxc_mxstat.code));
+ bmx_deq_pending_ctx(ctx);
+ bmx_q_canceled_ctx(ctx, BMI_ECANCEL);
+ } else {
+ /* and if not, then disconnect() */
+ bmx_peer_disconnect(peer, 1, BMI_ENETRESET);
+ }
} else { /* BMX_REQ_RX */
mx_cancel(bmi_mx->bmx_ep, &ctx->mxc_mxreq, &result);
if (result == 1) {
More information about the Pvfs2-cvs
mailing list