Whamcloud - gitweb
LU-1070 agl: update lock state when AGL upcall
authorFan Yong <yong.fan@whamcloud.com>
Mon, 20 Feb 2012 10:37:36 +0000 (18:37 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 14 Mar 2012 19:29:22 +0000 (15:29 -0400)
commit0125d830821f08854adc587f831d06bf30ccbfe8
tree4de6c674df4868f24e0901e5c06a20ed605b13df
parentfb05f2d177fbcfc2499008a4bb04fdf64ab19466
LU-1070 agl: update lock state when AGL upcall

The AGL RPC sponsor may exits the cl_lock processing without
wait() called before related OSC lock upcall(). So when AGL
upcall(), it needs to update the cl_lock state according to
the enqueue result through the general cl_lock API wait().

Originally, it is done in "lov_lock_unuse()" against toplock.
But osc_lock upcall() is against sublock. So the sublock state
may be un-updated and inconsistent with the low layer osc_lock
state, then causes the sublock cannot be cached.

On the other hand, cl_lock::cll_descr::cld_enq_flags should not be
changed during unuse() for passing parameter, as the replacement,
it can be done through cl_lock::cll_flags.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I4bc4c0ef0b93d5e0c2e59304158a35c57635ad70
Reviewed-on: http://review.whamcloud.com/2099
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/cl_object.h
lustre/lov/lov_lock.c
lustre/osc/osc_lock.c