/* allow CONNECT even if import is invalid */ ;
} else if (imp->imp_invalid) {
/* If the import has been invalidated (such as by an OST
- * failure), the request must fail with -EIO. */
+ * failure) the request must fail with -ESHUTDOWN. This
+ * indicates the requests should be discarded; an -EIO
+ * may result in a resend of the request. */
if (!imp->imp_deactive)
DEBUG_REQ(D_ERROR, req, "IMP_INVALID");
- *status = -EIO;
+ *status = -ESHUTDOWN; /* bz 12940 */
} else if (req->rq_import_generation != imp->imp_generation) {
DEBUG_REQ(D_ERROR, req, "req wrong generation:");
*status = -EIO;
/* NB Until this point, the whole of the incoming message,
* including buflens, status etc is in the sender's byte order. */
-#if SWAB_PARANOIA
/* Clear reply swab mask; this is a new reply in sender's byte order */
req->rq_rep_swab_mask = 0;
-#endif
+
rc = sptlrpc_cli_unwrap_reply(req);
if (rc) {
DEBUG_REQ(D_ERROR, req, "unwrap reply failed (%d):", rc);
if (req->rq_bulk != NULL)
ptlrpc_unregister_bulk (req);
- req->rq_phase = RQ_PHASE_COMPLETE;
-
if (req->rq_interpret_reply != NULL) {
int (*interpreter)(struct ptlrpc_request *,void *,int) =
req->rq_interpret_reply;
req->rq_status = interpreter(req, &req->rq_async_args,
req->rq_status);
}
+ req->rq_phase = RQ_PHASE_COMPLETE;
CDEBUG(D_RPCTRACE, "Completed RPC pname:cluuid:pid:xid:nid:"
"opc %s:%s:%d:"LPU64":%s:%d\n", cfs_curproc_comm(),
}
if (lustre_msg_get_type(req->rq_repmsg) == PTL_RPC_MSG_ERR &&
- lustre_msg_get_status(req->rq_repmsg) == -ENOTCONN)
+ (lustre_msg_get_status(req->rq_repmsg) == -ENOTCONN ||
+ lustre_msg_get_status(req->rq_repmsg) == -ENODEV))
GOTO(out, rc = lustre_msg_get_status(req->rq_repmsg));
/* The transno had better not change over replay. */