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);
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) &&
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)",
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,
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) &&
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? */
exp->exp_connection->c_remote_uuid.uuid,
libcfs_id2str(req->rq_peer));
}
+ libcfs_memory_pressure_clr();
RETURN(rc);
}
if (KEY_IS(KEY_EVICT_BY_NID)) {
if (val && vallen)
obd_export_evict_by_nid(exp->exp_obd, val);
-
GOTO(out, rc = 0);
+ } else if (KEY_IS(KEY_MDS_CONN) && lustre_msg_swabbed(req->rq_reqmsg)) {
+ /* Val's are not swabbed automatically */
+ __swab32s((__u32 *)val);
}
rc = obd_set_info_async(exp, keylen, key, vallen, val, NULL);
struct sptlrpc_flavor flvr;
int rc = 0;
+ if (unlikely(strcmp(exp->exp_obd->obd_type->typ_name,
+ LUSTRE_ECHO_NAME) == 0)) {
+ exp->exp_flvr.sf_rpc = SPTLRPC_FLVR_ANY;
+ return 0;
+ }
+
if (exp->exp_flvr.sf_rpc == SPTLRPC_FLVR_INVALID) {
read_lock(&filter->fo_sptlrpc_lock);
sptlrpc_target_choose_flavor(&filter->fo_sptlrpc_rset,