struct mdt_client_data *mcd;
mcd = req->rq_export->exp_mdt_data.med_mcd;
- if (mcd->mcd_last_xid == req->rq_xid ||
- mcd->mcd_last_close_xid == req->rq_xid) {
+ if (req_xid_is_last(req)) {
mdt_reconstruct(info, lhc);
rc = lustre_msg_get_status(req->rq_repmsg);
GOTO(out, rc);
lh->mlh_pdo_mode = mdt_lock_pdo_mode(info, o, lh->mlh_reg_mode);
if (lh->mlh_pdo_mode != LCK_MINMODE) {
/*
- * Do not use LDLM_FL_LOCAL_ONLY for paralell lock, it
+ * Do not use LDLM_FL_LOCAL_ONLY for parallel lock, it
* is never going to be sent to client and we do not
* want it slowed down due to possible cancels.
*/
*/
res_id->name[LUSTRE_RES_ID_HSH_OFF] = lh->mlh_pdo_hash;
}
-
+
policy->l_inodebits.bits = ibits;
/*
DEBUG_REQ(D_HA, req, "restoring transno "LPD64"/status %d",
mcd->mcd_last_transno, mcd->mcd_last_result);
- if (lustre_msg_get_opc(req->rq_reqmsg) == MDS_CLOSE) {
+ if (lustre_msg_get_opc(req->rq_reqmsg) == MDS_CLOSE ||
+ lustre_msg_get_opc(req->rq_repmsg) == MDS_DONE_WRITING) {
req->rq_transno = mcd->mcd_last_close_transno;
req->rq_status = mcd->mcd_last_close_result;
lustre_msg_set_transno(req->rq_repmsg, req->rq_transno);