struct thandle *th, struct ptlrpc_request *req)
{
struct tgt_thread_info *tti = tgt_th_info(env);
+ struct tgt_session_info *tsi = tgt_ses_info(env);
struct tg_export_data *ted;
__u64 *transno_p;
int rc = 0;
ENTRY;
+ if (tsi->tsi_has_trans) {
+ /* XXX: currently there are allowed cases, but the wrong cases
+ * are also possible, so better check is needed here */
+ CDEBUG(D_INFO, "More than one transaction "LPU64"\n",
+ tti->tti_transno);
+ return 0;
+ }
+
+ tsi->tsi_has_trans = 1;
/* that can be OUT target and we need tgt_session_info */
if (req == NULL) {
- struct tgt_session_info *tsi = tgt_ses_info(env);
-
req = tgt_ses_req(tsi);
if (req == NULL) /* echo client case */
RETURN(0);
ted->ted_lcd->lcd_last_close_result = th->th_result;
} else {
/* VBR: save versions in last_rcvd for reconstruct. */
- __u64 *pre_versions = lustre_msg_get_versions(req->rq_reqmsg);
+ __u64 *pre_versions = lustre_msg_get_versions(req->rq_repmsg);
if (pre_versions) {
ted->ted_lcd->lcd_pre_versions[0] = pre_versions[0];
return rc;
}
EXPORT_SYMBOL(tgt_last_rcvd_update);
+