Whamcloud - gitweb
LU-3259 clio: cl_lock simplification 58/10858/4
authorJinshan Xiong <jinshan.xiong@intel.com>
Fri, 26 Sep 2014 21:46:30 +0000 (14:46 -0700)
committerJinshan Xiong <jinshan.xiong@intel.com>
Fri, 26 Sep 2014 22:04:13 +0000 (15:04 -0700)
commitb7caa793443674f65122d3e3ea23de569ae8510f
tree3283224c70fb03d646ae92124a972ca6a08fdbbf
parent3d7c7c360d7137c84aa6e9c4fa2112b867144883
LU-3259 clio: cl_lock simplification

In this patch, the two layering cl_lock cache is eliminated. cl_lock
is turned into a cacheless data container for lock requirement.

Two major methods are supported for cl_lock: clo_enqueue and
clo_cancel.  A cl_lock is usually enqueued by cl_lock_request(),
clo_enqueue() method is called for each layer to enqueue the lock.
The cl_lock enqueue request may be fanned over at LOV layer. At OSC
layer, if there exists a caching DLM lock, it will be attached to
the corresponding cl_lock, otherwise a new DLM will have to be
requested.

cl_lock_cancel() must be called to release a cl_lock after use.
clo_cancel() method will be called for each layer to release the
resource used by this lock. At OSC layer, the reference count of DLM
lock, which is held at clo_enqueue time, is released. DLM lock can be
cached on the client side.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I6a61250549cfbc28070fe4bb7789ba7429eaf089
33 files changed:
lustre/include/cl_object.h
lustre/include/lclient.h
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_dlm.h
lustre/ldlm/ldlm_lib.c
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_request.c
lustre/ldlm/ldlm_resource.c
lustre/llite/glimpse.c
lustre/llite/lcommon_cl.c
lustre/llite/lcommon_misc.c
lustre/llite/rw26.c
lustre/llite/vvp_io.c
lustre/llite/vvp_lock.c
lustre/lov/lov_cl_internal.h
lustre/lov/lov_dev.c
lustre/lov/lov_lock.c
lustre/lov/lov_object.c
lustre/lov/lovsub_lock.c
lustre/obdclass/cl_io.c
lustre/obdclass/cl_lock.c
lustre/obdclass/cl_object.c
lustre/obdclass/cl_page.c
lustre/obdecho/echo_client.c
lustre/osc/osc_cache.c
lustre/osc/osc_cl_internal.h
lustre/osc/osc_internal.h
lustre/osc/osc_io.c
lustre/osc/osc_lock.c
lustre/osc/osc_object.c
lustre/osc/osc_page.c
lustre/osc/osc_request.c
lustre/tests/sanityn.sh