Whamcloud - gitweb
LU-13991 ldlm: speedup flock reprocess 48/40048/2
authorAndriy Skulysh <c17819@cray.com>
Wed, 19 Feb 2020 20:06:33 +0000 (22:06 +0200)
committerOleg Drokin <green@whamcloud.com>
Sat, 6 Mar 2021 02:35:15 +0000 (02:35 +0000)
We can check for deadlock only for first
conflicting lock, the rest deadlock checks
will be performed after cancelation of
first conflicting lock.

Change-Id: I18359db405ab021a4f32ac833de203254097142d
HPE-bug-id: LUS-8509
Signed-off-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Vitaly Fertman <c17818@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Tested-by: Alexander Lezhoev <c17454@cray.com>
Reviewed-on: https://review.whamcloud.com/40048
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_flock.c

index d5f740f..b76f0f1 100644 (file)
@@ -364,13 +364,13 @@ reprocess:
                                continue;
 
                        if (intention != LDLM_PROCESS_ENQUEUE) {
-                               reprocess_failed = 1;
                                if (ldlm_flock_deadlock(req, lock)) {
                                        ldlm_flock_cancel_on_deadlock(
                                                req, grant_work);
                                        RETURN(LDLM_ITER_CONTINUE);
                                }
-                               continue;
+                               reprocess_failed = 1;
+                               break;
                        }
 
                        if (*flags & LDLM_FL_BLOCK_NOWAIT) {