[lustre-devel] [PATCH 07/39] lustre: ldlm: Don't re-enqueue glimpse lock on read

James Simmons jsimmons at infradead.org
Thu Jan 21 09:16:30 PST 2021


From: Andriy Skulysh <c17819 at cray.com>

cl_glimpse_lock() doesn't match a lock with LDLM_FL_BL_AST
even if this lock is acquired by the same thread earlier.

It needs only size to check for spare file,
so let't add LDLM_FL_CBPENDING to match flags.

 #1 [ffff9ba7326036f0] schedule at ffffffff87b67c49
 #2 [ffff9ba732603700] obd_get_request_slot at ffffffffc0dbe0a4 [obdclass]
 #3 [ffff9ba7326037b8] ldlm_cli_enqueue at ffffffffc0faedce [ptlrpc]
 #4 [ffff9ba732603878] mdc_enqueue_send at ffffffffc11b38a8 [mdc]
 #5 [ffff9ba732603938] mdc_lock_enqueue at ffffffffc11b3eb2 [mdc]
 #6 [ffff9ba7326039a8] cl_lock_enqueue at ffffffffc0dfee95 [obdclass]
 #7 [ffff9ba7326039e0] lov_lock_enqueue at ffffffffc10ef265 [lov]
 #8 [ffff9ba732603a20] cl_lock_enqueue at ffffffffc0dfee95 [obdclass]
 #9 [ffff9ba732603a58] cl_lock_request at ffffffffc0dff54b [obdclass]

HPE-bug-id: LUS-8690
WC-bug-id: https://jira.whamcloud.com/browse/LU-13987
Lustre-commit: 829a3a93d43e4d ("LU-13987 ldlm: Don't re-enqueue glimpse lock on read")
Reviewed-on: https://review.whamcloud.com/40044
Signed-off-by: Andriy Skulysh <c17819 at cray.com>
Reviewed-by: Vitaly Fertman <c17818 at cray.com>
Reviewed-by: Alexander Boyko <c17825 at cray.com>
Reviewed-by: Andrew Perepechko <c17827 at cray.com>
Tested-by: Elena Gryaznova <c17455 at cray.com>
Reviewed-by: Alexander Boyko <alexander.boyko at hpe.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman at hpe.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 fs/lustre/include/lustre_osc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/lustre/include/lustre_osc.h b/fs/lustre/include/lustre_osc.h
index e7bf392..e32723c 100644
--- a/fs/lustre/include/lustre_osc.h
+++ b/fs/lustre/include/lustre_osc.h
@@ -203,7 +203,7 @@ static inline u64 osc_enq2ldlm_flags(u32 enqflags)
 	if (enqflags & CEF_NONBLOCK)
 		result |= LDLM_FL_BLOCK_NOWAIT;
 	if (enqflags & CEF_GLIMPSE)
-		result |= LDLM_FL_HAS_INTENT;
+		result |= LDLM_FL_HAS_INTENT | LDLM_FL_CBPENDING;
 	if (enqflags & CEF_DISCARD_DATA)
 		result |= LDLM_FL_AST_DISCARD_DATA;
 	if (enqflags & CEF_PEEK)
-- 
1.8.3.1



More information about the lustre-devel mailing list