Whamcloud - gitweb
LU-3433 clio: wrong cl_lock usage 09/6709/3
authorVitaly Fertman <vitaly_fertman@xyratex.com>
Thu, 6 Jun 2013 19:40:32 +0000 (23:40 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 10 Aug 2013 04:12:37 +0000 (04:12 +0000)
commit521335cefe670efa2dc34c5db522a283f318447e
treecd231667a7dc428870ad8e3f045da191d02cd65a
parentf5e8090ae871c6075c29bb378da1204ef9c7beeb
LU-3433 clio: wrong cl_lock usage

granted lock is moved to HELD state in cl_wait_try() only which is
done after upcall for non-agl locks. as the result, lock unuse moves
cl_lock not to CACHED state, but to NEW state. A parallel thread
gets this lock and tries to enqueue it - instead of re-using a
cached lock, cl_enqueue_try() initiates a new enqueue and gets to
osc_lock_enqueue() where it asserts:

LASSERTF(ols->ols_state == OLS_NEW, ...);

the state of osc lock is RELEASED already - moved here by unuse.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Change-Id: I611a6e8778871da184db13434d223036625443c8
Reviewed-on: http://review.whamcloud.com/6709
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osc/osc_lock.c