struct l_wait_info lwi;
struct lustre_handle lockh = { 0 };
int size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
- int comms_error = 0, niocount, npages, nob = 0, rc, i;
+ int niocount, npages, nob = 0, rc, i;
int no_reply = 0;
ENTRY;
"object "LPX64" took %ld seconds.\n",
libcfs_id2str(req->rq_peer), ioo->ioo_id,
cfs_time_current_sec() - req->rq_arrival_time.tv_sec);
- goto out_lock;
+ GOTO(out_lock, rc = -ETIMEDOUT);
}
rc = obd_preprw(OBD_BRW_READ, req->rq_export, &body->oa, 1,
} else {
DEBUG_REQ(D_ERROR, req, "bulk PUT failed: rc %d", rc);
}
- comms_error = rc != 0;
+ no_reply = rc != 0;
}
/* Must commit after prep above in all cases */
ost_brw_lock_put(LCK_PR, ioo, pp_rnb, &lockh);
out_bulk:
ptlrpc_free_bulk(desc);
- if (no_reply)
- RETURN(rc);
out:
LASSERT(rc <= 0);
if (rc == 0) {
req->rq_status = nob;
target_committed_to_req(req);
ptlrpc_reply(req);
- } else if (!comms_error) {
+ } else if (!no_reply) {
/* Only reply if there was no comms problem with bulk */
target_committed_to_req(req);
req->rq_status = rc;
struct lustre_capa *capa = NULL;
__u32 *rcs;
int size[3] = { sizeof(struct ptlrpc_body), sizeof(*body) };
- int objcount, niocount, npages, comms_error = 0;
+ int objcount, niocount, npages;
int rc, swab, i, j;
obd_count client_cksum, server_cksum = 0;
int no_reply = 0;
"object "LPX64" took %ld seconds.\n",
libcfs_id2str(req->rq_peer), ioo->ioo_id,
cfs_time_current_sec() - req->rq_arrival_time.tv_sec);
- goto out_lock;
+ GOTO(out_lock, rc = -ETIMEDOUT);
}
ost_prolong_locks(req->rq_export, ioo, pp_rnb, LCK_PW);
} else {
DEBUG_REQ(D_ERROR, req, "ptlrpc_bulk_get failed: rc %d", rc);
}
- comms_error = rc != 0;
+ no_reply = rc != 0;
repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
sizeof(*repbody));
ost_brw_lock_put(LCK_PW, ioo, pp_rnb, &lockh);
out_bulk:
ptlrpc_free_bulk(desc);
- if (no_reply)
- RETURN(rc);
out:
if (rc == 0) {
oti_to_request(oti, req);
target_committed_to_req(req);
rc = ptlrpc_reply(req);
- } else if (!comms_error) {
+ } else if (!no_reply) {
/* Only reply if there was no comms problem with bulk */
target_committed_to_req(req);
req->rq_status = rc;