From: Patrick Farrell Date: Wed, 3 Apr 2019 14:19:44 +0000 (-0400) Subject: LU-11518 osc: Do ELC on locks with no OSC object X-Git-Tag: 2.13.56~11 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=36eca1017fe4643638d5f8bde646472fe8abb933 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 --- 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) {