Whamcloud - gitweb
LU-16062 ldlm: improve bl_timeout for prolong
[fs/lustre-release.git] / lustre / ldlm / ldlm_extent.c
index ff40ece..4209310 100644 (file)
@@ -651,16 +651,13 @@ void ldlm_lock_prolong_one(struct ldlm_lock *lock,
                /* ignore locks not being cancelled */
                return;
 
-       /* We are in the middle of the process - BL AST is sent, CANCEL
-        * is ahead. Take half of BL AT + IO AT process time.
-        */
-       timeout = arg->lpa_timeout + (ldlm_bl_timeout(lock) >> 1);
-
        arg->lpa_blocks_cnt++;
 
        /* OK. this is a possible lock the user holds doing I/O
         * let's refresh eviction timer for it.
         */
+       timeout = ldlm_bl_timeout_by_rpc(arg->lpa_req);
+       LDLM_DEBUG(lock, "refreshed to %ds.\n", timeout);
        ldlm_refresh_waiting_lock(lock, timeout);
 }
 EXPORT_SYMBOL(ldlm_lock_prolong_one);