if (ptlrpc_client_recv_or_unlink(req) ||
ptlrpc_client_bulk_active(req))
continue;
-
+
/* Turn repl fail_loc off to prevent it from looping
* forever. */
if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK)) {
/* Note that this also will start async reply unlink */
if (req->rq_net_err && !req->rq_timedout) {
ptlrpc_expire_one_request(req, 1);
-
+
/* Check if we still need to wait for unlink. */
if (ptlrpc_client_recv_or_unlink(req) ||
ptlrpc_client_bulk_active(req))
continue;
spin_lock(&imp->imp_lock);
-
if (ptlrpc_import_delay_req(imp, req, &status)){
+ /* put on delay list - only if we wait
+ * recovery finished - before send */
+ list_del_init(&req->rq_list);
+ list_add_tail(&req->rq_list, &imp->imp_delayed_list);
spin_unlock(&imp->imp_lock);
continue;
}
/* This is re-sending anyways,
* let's mark req as resend. */
req->rq_resend = 1;
- lustre_msg_add_flags(req->rq_reqmsg,
- MSG_RESENT);
if (req->rq_bulk) {
__u64 old_xid;
spin_unlock(&req->rq_lock);
req->rq_status = after_reply(req);
- if (req->rq_resend) {
- /* Add this req to the delayed list so
- it can be errored if the import is
- evicted after recovery. */
- spin_lock(&imp->imp_lock);
- list_del_init(&req->rq_list);
- list_add_tail(&req->rq_list,
- &imp->imp_delayed_list);
- spin_unlock(&imp->imp_lock);
+ if (req->rq_resend)
continue;
- }
/* If there is no bulk associated with this request,
* then we're done and should let the interpreter
}
if (req->rq_resend) {
- lustre_msg_add_flags(req->rq_reqmsg, MSG_RESENT);
-
if (req->rq_bulk != NULL) {
ptlrpc_unregister_bulk(req, 0);
}
/* Resend if we need to */
- if (req->rq_resend) {
+ if (req->rq_resend||req->rq_timedout) {
/* ...unless we were specifically told otherwise. */
if (req->rq_no_resend)
GOTO(out, rc = -ETIMEDOUT);
spin_lock(&imp->imp_lock);
+ /* we can have rq_timeout on dlm fake import which not support
+ * recovery - but me need resend request on this import instead
+ * of return error */
+ req->rq_resend = 1;
goto restart;
}
- if (req->rq_timedout) { /* non-recoverable timeout */
- GOTO(out, rc = -ETIMEDOUT);
- }
-
if (!ptlrpc_client_replied(req)) {
/* How can this be? -eeb */
DEBUG_REQ(D_ERROR, req, "!rq_replied: ");