From: Patrick Farrell Date: Wed, 8 Apr 2020 14:05:25 +0000 (-0400) Subject: LU-6179 llite: Remove last lockahead old compat X-Git-Tag: 2.14.52~123 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=12a0c7b5944d9e48e38416c7cac2cde153e3148b;p=fs%2Flustre-release.git LU-6179 llite: Remove last lockahead old compat The CEF_NONBLOCK flag in cld_enq_flags is required for the old Cray-only server release of lockahead. In the more recent versions, the required nonblocking behavior (on the server side) is associated with LDLM_FL_SPECULATIVE, not with the combination of LDLM_FL_NO_EXPAND and LDLM_FL_BLOCK_NOWAIT (as was done in the old implementation). Now we control 'speculative' or not with the async flag from userspace. Now that we've removed OBD_CONNECT_LOCKAHEAD_OLD support from the client, we should be good to go there. The existing testing explores both sync and async requests, and should be enough to verify this is OK. Signed-off-by: Patrick Farrell Change-Id: Ia3605eb22e6a6a88fb6e431286b697e2e2a1908e Reviewed-on: https://review.whamcloud.com/38179 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 8cb5110..2fb3256 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -3132,8 +3132,7 @@ int ll_file_lock_ahead(struct file *file, struct llapi_lu_ladvise *ladvise) descr->cld_mode = cl_mode; /* CEF_MUST is used because we do not want to convert a * lockahead request to a lockless lock */ - descr->cld_enq_flags = CEF_MUST | CEF_LOCK_NO_EXPAND | - CEF_NONBLOCK; + descr->cld_enq_flags = CEF_MUST | CEF_LOCK_NO_EXPAND; if (ladvise->lla_peradvice_flags & LF_ASYNC) descr->cld_enq_flags |= CEF_SPECULATIVE;