-static inline void ofd_info2oti(struct ofd_thread_info *info,
- struct obd_trans_info *oti)
-{
- oti->oti_xid = info->fti_xid;
- LASSERTF(ergo(oti->oti_transno > 0,
- oti->oti_transno == info->fti_transno),
- "Overwrite replay transno "LPX64" by "LPX64"\n",
- oti->oti_transno, info->fti_transno);
- oti->oti_transno = info->fti_transno;
- oti->oti_pre_version = info->fti_pre_version;
+ info = ofd_info(tsi->tsi_env);
+ LASSERT(info->fti_exp == NULL);
+ LASSERT(info->fti_env == NULL);
+ LASSERT(info->fti_attr.la_valid == 0);
+
+ info->fti_env = tsi->tsi_env;
+ info->fti_exp = tsi->tsi_exp;
+
+ info->fti_xid = req->rq_xid;
+ /** VBR: take versions from request */
+ if (req->rq_reqmsg != NULL &&
+ lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) {
+ __u64 *pre_version = lustre_msg_get_versions(req->rq_reqmsg);
+
+ info->fti_pre_version = pre_version ? pre_version[0] : 0;
+ }
+ return info;