Whamcloud - gitweb
LU-13264 osc: ensure lu_ref work atomic from osc_lock_upcall() 29/37629/2 master
authorBruno Faccini <bruno.faccini@intel.com>
Wed, 19 Feb 2020 16:25:26 +0000 (17:25 +0100)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Feb 2020 05:52:14 +0000 (05:52 +0000)
commit1951f4dcd29dc7fac74b435c3fb84cb6a95328e7
treec815689ffa600d86a6302e9e223f72bf121222d2
parent7bde4a104485662d70a578c056cc39ef46b22a10
LU-13264 osc: ensure lu_ref work atomic from osc_lock_upcall()

Since osc_lock_upcall() uses per-cpu env via
cl_env_percpu_[get,put](), all undelying work must execute on the
same CPU, meaning that no sleep()/scheduling must occur.
This implies all lu_ref related work to no longer use lu_ref_add(),
which calls might_sleep() (likely to cause a
scheduling/cpu-switch...), but lu_ref_add_atomoc() instead.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ide33d4c415e9e382f0bc344e2114182a1f122de6
Reviewed-on: https://review.whamcloud.com/37629
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ldlm/ldlm_lock.c
lustre/osc/osc_lock.c