Skip to content
Snippets Groups Projects
Commit acea923a authored by Johann Lombardi's avatar Johann Lombardi
Browse files

Branch b1_6

b=17261
i=shadow
i=umka

prevent ptlrpc_queue_wait() from looping indefinitely because of ENOMEM.
parent f261155f
No related branches found
No related tags found
No related merge requests found
......@@ -1878,8 +1878,8 @@ restart:
if ((brc == -ETIMEDOUT) && !ptlrpc_expire_one_request(req)) {
/* Wait forever for reconnect / replay or failure */
lwi = LWI_INTR(interrupted_request, req);
rc = l_wait_event(req->rq_reply_waitq, ptlrpc_check_reply(req),
&lwi);
brc = l_wait_event(req->rq_reply_waitq, ptlrpc_check_reply(req),
&lwi);
}
CDEBUG(D_RPCTRACE, "Completed RPC pname:cluuid:pid:xid:nid:opc "
......@@ -1902,7 +1902,7 @@ restart:
if (req->rq_err) {
DEBUG_REQ(D_RPCTRACE, req, "err rc=%d status=%d",
rc, req->rq_status);
GOTO(out, rc = -EIO);
GOTO(out, rc = rc ? rc : -EIO);
}
if (req->rq_intr) {
......
......@@ -482,6 +482,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
request->rq_import->imp_obd->obd_name);
/* this prevents us from waiting in ptlrpc_queue_wait */
request->rq_err = 1;
request->rq_status = -ENODEV;
RETURN(-ENODEV);
}
......@@ -505,8 +506,12 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
LASSERT (request->rq_replen != 0);
if (request->rq_repbuf == NULL)
OBD_ALLOC(request->rq_repbuf, request->rq_replen);
if (request->rq_repbuf == NULL)
if (request->rq_repbuf == NULL) {
/* this prevents us from looping in ptlrpc_queue_wait */
request->rq_err = 1;
request->rq_status = -ENOMEM;
GOTO(cleanup_bulk, rc = -ENOMEM);
}
request->rq_repmsg = NULL;
rc = LNetMEAttach(request->rq_reply_portal,/*XXX FIXME bug 249*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment