/* Store transno in reqmsg for replay. */
req->rq_reqmsg->transno = req->rq_transno = req->rq_repmsg->transno;
+
if (req->rq_import->imp_replayable) {
spin_lock_irqsave(&imp->imp_lock, flags);
if (req->rq_replay || req->rq_transno != 0)
if (replied)
RETURN(0);
- DEBUG_REQ(D_ERROR, req, "timeout");
+ DEBUG_REQ(D_ERROR, req, "timeout (sent at %lu)", (long)req->rq_sent);
ptlrpc_unregister_reply (req);
* EINTR.
* I don't really care if we go once more round the loop in
* the error cases -eeb. */
- } while (rc != 0);
+ } while (rc != 0 || set->set_remaining != 0);
LASSERT(set->set_remaining == 0);
/* We have to l_wait_event() whatever the result, to give liblustre
* a chance to run reply_in_callback() */
- if (request->rq_set == NULL)
+ if (request->rq_set != NULL)
wq = &request->rq_set->set_waitq;
else
wq = &request->rq_reply_waitq;
/* clear this for new requests that were resent as well
as resent replayed requests. */
- lustre_msg_clear_flags(req->rq_reqmsg,
- MSG_RESENT);
+ lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT);
/* don't re-add requests that have been replayed */
if (!list_empty(&req->rq_replay_list))
return;
- lustre_msg_add_flags(req->rq_reqmsg,
- MSG_REPLAY);
+ lustre_msg_add_flags(req->rq_reqmsg, MSG_REPLAY);
LASSERT(imp->imp_replayable);
/* Balanced in ptlrpc_free_committed, usually. */
timeout = 1;
} else {
timeout = MAX(req->rq_timeout * HZ, 1);
- DEBUG_REQ(D_NET, req, "-- sleeping");
+ DEBUG_REQ(D_NET, req, "-- sleeping for %d jiffies", timeout);
}
lwi = LWI_TIMEOUT_INTR(timeout, expired_request, interrupted_request,
req);