From: Alexander Boyko Date: Wed, 8 Nov 2017 19:30:05 +0000 (-0500) Subject: LU-10212 ldlm: fix prolong for destroyed lock X-Git-Tag: 2.10.57~59 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=0716d51d082e3a81c10529627c895db008ae8e35;ds=sidebyside LU-10212 ldlm: fix prolong for destroyed lock For a IO request ofd_prolong_extent_locks use a fast path if the lock is found by handle. If the lock has LDLM_FL_DESTROYED, prolong should try a general path. No lock was accounted for IO request with destroyed lock and ESTALE error happaned for a client. operation ost_read to node x.x.x.x@o2ib failed: rc = -116 Signed-off-by: Alexander Boyko Change-Id: I63e619d0330279bb2ae678ed98b1c0e899ad4e08 Reviewed-on: https://review.whamcloud.com/29992 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andriy Skulysh Reviewed-by: Mike Pershin --- diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index 69d8e84..8ac0469 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -2430,10 +2430,14 @@ static void ofd_prolong_extent_locks(struct tgt_session_info *tsi, LASSERT(lock->l_export == data->lpa_export); ldlm_lock_prolong_one(lock, data); LDLM_LOCK_PUT(lock); - RETURN_EXIT; + if (data->lpa_locks_cnt > 0) + RETURN_EXIT; + /* The lock was destroyed probably lets try + * resource tree. */ + } else { + lock->l_last_used = ktime_get(); + LDLM_LOCK_PUT(lock); } - lock->l_last_used = ktime_get(); - LDLM_LOCK_PUT(lock); } }