unsigned int rq_intr:1, rq_replied:1, rq_err:1,
rq_timedout:1, rq_resend:1, rq_restart:1, rq_replay:1,
rq_no_resend:1, rq_waiting:1, rq_receiving_reply:1,
- rq_no_delay:1;
+ rq_no_delay:1, rq_net_err:1;
int rq_phase;
/* client-side refcount for SENT race */
atomic_t rq_refcount;
struct obd_uuid obd_uuid;
int obd_minor;
- int obd_attached:1, obd_set_up:1, obd_recovering:1,
- obd_abort_recovery:1, obd_replayable:1, obd_no_transno:1,
- obd_no_recov:1, obd_stopping:1;
+ unsigned int obd_attached:1, obd_set_up:1, obd_recovering:1,
+ obd_abort_recovery:1, obd_replayable:1, obd_no_transno:1,
+ obd_no_recov:1, obd_stopping:1;
atomic_t obd_refcount;
wait_queue_head_t obd_refcount_waitq;
struct proc_dir_entry *obd_proc_entry;
DEBUG_REQ(D_NET, req, "REPLIED:");
GOTO(out, rc = 1);
}
+
+ if (req->rq_net_err && !req->rq_timedout) {
+ spin_unlock_irqrestore (&req->rq_lock, flags);
+ ptlrpc_expire_one_request(req);
+ spin_lock_irqsave (&req->rq_lock, flags);
+ GOTO(out, rc = 0);
+ }
if (req->rq_err) {
DEBUG_REQ(D_ERROR, req, "ABORTED:");
rc = ptl_send_rpc(req);
if (rc) {
DEBUG_REQ(D_HA, req, "send failed (%d); expect timeout", rc);
- req->rq_timeout = 1;
+ req->rq_net_err = 1;
RETURN(rc);
}
RETURN(0);
}
if (req->rq_phase == RQ_PHASE_RPC) {
+ if (req->rq_net_err && !req->rq_timedout) {
+ ptlrpc_expire_one_request(req);
+ continue;
+ }
if (req->rq_waiting || req->rq_resend) {
int status;
DEBUG_REQ(D_HA, req, "send failed (%d)",
rc);
force_timer_recalc = 1;
- req->rq_timeout = 0;
+ req->rq_net_err = 1;
}
/* need to reset the timeout */
force_timer_recalc = 1;
spin_lock_irqsave (&req->rq_lock, flags);
req->rq_resend = 1;
+ req->rq_net_err = 0;
req->rq_timedout = 0;
if (req->rq_bulk) {
__u64 old_xid = req->rq_xid;
-
+
/* ensure previous bulk fails */
req->rq_xid = ptlrpc_next_xid();
CDEBUG(D_HA, "resend bulk old x"LPU64" new x"LPU64"\n",
* like failing sends in client.c does currently... */
spin_lock_irqsave(&req->rq_lock, flags);
- req->rq_timeout = 0;
+ req->rq_net_err = 1;
spin_unlock_irqrestore(&req->rq_lock, flags);
ptlrpc_wake_client_req(req);
request->rq_replied = 0;
request->rq_err = 0;
request->rq_timedout = 0;
+ request->rq_net_err = 0;
request->rq_resend = 0;
request->rq_restart = 0;
spin_unlock_irqrestore (&request->rq_lock, flags);