}
#endif
- if (unlikely(flags & LDLM_FL_REPLAY)) {
+ if (unlikely(lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT))
+ flags |= LDLM_FL_RESENT;
+
+ if (unlikely(flags & (LDLM_FL_REPLAY | LDLM_FL_RESENT))) {
/* Find an existing lock in the per-export lock hash */
/* In the function below, .hs_keycmp resolves to
* ldlm_export_lock_keycmp() */
DEBUG_REQ(D_DLMTRACE, req, "found existing lock cookie "
LPX64, lock->l_handle.h_cookie);
GOTO(existing_lock, rc = 0);
- }
+ } else {
+ flags &= ~LDLM_FL_RESENT;
+ }
}
/* The lock's callback data might be set in the policy function */
if (blwi->blwi_mem_pressure)
memory_pressure_set();
+ OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_PAUSE_CANCEL2, 4);
+
if (blwi->blwi_count) {
int count;
/* The special case when we cancel locks in LRU