From 36eca1017fe4643638d5f8bde646472fe8abb933 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Wed, 3 Apr 2019 10:19:44 -0400 Subject: [PATCH] LU-11518 osc: Do ELC on locks with no OSC object Currently, osc_ldlm_weigh_ast weighs locks with no OSC object in their ast data as "1", meaning the lock is not considered for ELC. This doesn't make much sense, since if there is no OSC object, it's unlikely there's any data under the lock, so it's actually a good candidate for ELC. Signed-off-by: Patrick Farrell Change-Id: Ie832afbf2479f3a348e44d2c21992696830000ae Reviewed-on: https://review.whamcloud.com/34584 Reviewed-by: Andreas Dilger Reviewed-by: Gu Zheng Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/osc/osc_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/osc/osc_lock.c b/lustre/osc/osc_lock.c index 4c76e52..f3ed624 100644 --- a/lustre/osc/osc_lock.c +++ b/lustre/osc/osc_lock.c @@ -726,7 +726,7 @@ unsigned long osc_ldlm_weigh_ast(struct ldlm_lock *dlmlock) unlock_res_and_lock(dlmlock); if (obj == NULL) - GOTO(out, weight = 1); + GOTO(out, weight = 0); spin_lock(&obj->oo_ol_spin); list_for_each_entry(oscl, &obj->oo_ol_list, ols_nextlock_oscobj) { -- 1.8.3.1