X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fost%2Fost_handler.c;h=faf551da8cc8df020d8fc14c674257868f1a8657;hp=c47a1967005505e166ecc372629de79541a6067b;hb=3dcf18d3;hpb=e79f7db06c418bbcfe936e2bc1062e105e0533e9 diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index c47a196..faf551d 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -218,6 +218,7 @@ static int ost_create(struct obd_export *exp, struct ptlrpc_request *req, sizeof(*repbody)); memcpy(&repbody->oa, &body->oa, sizeof(body->oa)); oti->oti_logcookies = &repbody->oa.o_lcookie; + req->rq_status = obd_create(exp, &repbody->oa, NULL, oti); //obd_log_cancel(conn, NULL, 1, oti->oti_logcookies, 0); RETURN(0); @@ -773,7 +774,9 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti) desc); rc = l_wait_event(desc->bd_waitq, !ptlrpc_server_bulk_active(desc) || - exp->exp_failed, &lwi); + exp->exp_failed || + exp->exp_abort_active_req, + &lwi); LASSERT(rc == 0 || rc == -ETIMEDOUT); /* Wait again if we changed deadline */ } while ((rc == -ETIMEDOUT) && @@ -790,6 +793,11 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti) DEBUG_REQ(D_ERROR, req, "Eviction on bulk PUT"); rc = -ENOTCONN; ptlrpc_abort_bulk(desc); + } else if (exp->exp_abort_active_req) { + DEBUG_REQ(D_ERROR, req, "Reconnect on bulk PUT"); + /* we don't reply anyway */ + rc = -ETIMEDOUT; + ptlrpc_abort_bulk(desc); } else if (!desc->bd_success || desc->bd_nob_transferred != desc->bd_nob) { DEBUG_REQ(D_ERROR, req, "%s bulk PUT %d(%d)", @@ -895,6 +903,10 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti) body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body)); LASSERT(body != NULL); + if ((body->oa.o_flags & OBD_BRW_MEMALLOC) && + (exp->exp_connection->c_peer.nid == exp->exp_connection->c_self)) + libcfs_memory_pressure_set(); + objcount = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1) / sizeof(*ioo); ioo = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1, @@ -1003,7 +1015,9 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti) ost_bulk_timeout, desc); rc = l_wait_event(desc->bd_waitq, !ptlrpc_server_bulk_active(desc) || - desc->bd_export->exp_failed, &lwi); + desc->bd_export->exp_failed || + desc->bd_export->exp_abort_active_req, + &lwi); LASSERT(rc == 0 || rc == -ETIMEDOUT); /* Wait again if we changed deadline */ } while ((rc == -ETIMEDOUT) && @@ -1020,6 +1034,11 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti) DEBUG_REQ(D_ERROR, req, "Eviction on bulk GET"); rc = -ENOTCONN; ptlrpc_abort_bulk(desc); + } else if (desc->bd_export->exp_abort_active_req) { + DEBUG_REQ(D_ERROR, req, "Reconnect on bulk GET"); + /* we don't reply anyway */ + rc = -ETIMEDOUT; + ptlrpc_abort_bulk(desc); } else if (!desc->bd_success) { DEBUG_REQ(D_ERROR, req, "network error on bulk GET"); /* XXX should this be a different errno? */ @@ -1151,6 +1170,7 @@ out: exp->exp_connection->c_remote_uuid.uuid, libcfs_id2str(req->rq_peer)); } + libcfs_memory_pressure_clr(); RETURN(rc); }