-static int process_req_last_xid(struct ptlrpc_request *req)
-{
- __u64 last_xid;
- ENTRY;
-
- /* check request's xid is consistent with export's last_xid */
- last_xid = lustre_msg_get_last_xid(req->rq_reqmsg);
- if (last_xid > req->rq_export->exp_last_xid)
- req->rq_export->exp_last_xid = last_xid;
-
- if (req->rq_xid == 0 ||
- (req->rq_xid <= req->rq_export->exp_last_xid)) {
- DEBUG_REQ(D_ERROR, req, "Unexpected xid %llx vs. "
- "last_xid %llx\n", req->rq_xid,
- req->rq_export->exp_last_xid);
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 93, 0)
- /* This LBUG() can be triggered in following case:
- *
- * - Client send a no_resend RPC, like statfs;
- * - The RPC timedout (or some other error) on client,
- * then it's removed from the unreplied list;
- * - Client send some other request to bump the
- * exp_last_xid on server;
- * - The former RPC got chance to be processed;
- * - LBUG();
- *
- * Let's keep this for debug purpose for now, and it
- * should be removed when release.
- */
- LBUG();
-#endif
- req->rq_status = -EPROTO;
- RETURN(ptlrpc_error(req));
- }
-
- /* try to release in-memory reply data */
- if (tgt_is_multimodrpcs_client(req->rq_export)) {
- tgt_handle_received_xid(req->rq_export,
- lustre_msg_get_last_xid(req->rq_reqmsg));
- if (!(lustre_msg_get_flags(req->rq_reqmsg) &
- (MSG_RESENT | MSG_REPLAY)))
- tgt_handle_tag(req->rq_export,
- lustre_msg_get_tag(req->rq_reqmsg));
- }
- RETURN(0);
-}
-