*/
cond_resched();
+ /* If the caller requires to allow to be interpreted by force
+ * and it has really been interpreted, then move the request
+ * to RQ_PHASE_INTERPRET phase in spite of what the current
+ * phase is. */
+ if (unlikely(req->rq_allow_intr && req->rq_intr)) {
+ req->rq_status = -EINTR;
+ ptlrpc_rqphase_move(req, RQ_PHASE_INTERPRET);
+
+ GOTO(interpret, req->rq_status);
+ }
+
if (req->rq_phase == RQ_PHASE_NEW &&
ptlrpc_send_new_req(req)) {
force_timer_recalc = 1;
list_entry(tmp, struct ptlrpc_request, rq_set_chain);
if (req->rq_phase != RQ_PHASE_RPC &&
- req->rq_phase != RQ_PHASE_UNREGISTERING)
+ req->rq_phase != RQ_PHASE_UNREGISTERING &&
+ !req->rq_allow_intr)
continue;
ptlrpc_mark_interrupted(req);
lwi = LWI_TIMEOUT_INTR_ALL(cfs_time_seconds(1),
ptlrpc_expired_set,
ptlrpc_interrupted_set, set);
+ else if (set->set_allow_intr)
+ lwi = LWI_TIMEOUT_INTR_ALL(
+ cfs_time_seconds(timeout ? timeout : 1),
+ ptlrpc_expired_set,
+ ptlrpc_interrupted_set, set);
else
/*
* At least one request is in flight, so no
/* LU-769 - if we ignored the signal because it was already
* pending when we started, we need to handle it now or we risk
* it being ignored forever */
- if (rc == -ETIMEDOUT && !lwi.lwi_allow_intr &&
+ if (rc == -ETIMEDOUT &&
+ (!lwi.lwi_allow_intr || set->set_allow_intr) &&
signal_pending(current)) {
sigset_t blocked_sigs =
cfs_block_sigsinv(LUSTRE_FATAL_SIGS);
RETURN(-ENOMEM);
}
+ if (req->rq_allow_intr)
+ set->set_allow_intr = 1;
+
/* for distributed debugging */
lustre_msg_set_status(req->rq_reqmsg, current_pid());