Whamcloud - gitweb
LU-1299 clio: a combo patch to fix cl_lock
In this patch, the following issues are fixed:
* redefine cl_lock_error(). There are two kinds of error when
enqueuing a cl_lock: internal errors return from server side and
local error for example interrupted by signal when waiting for a
lock. Obviously the latter one is not fatal so we shouldn't err the
lock out;
* for fault handling, only signal SIGKILL and SIGTERM is not allowed;
* handle return code of ll_fault correctly;
* redefine ->unuse() to release resource it held if enqueuing lock
failed;
* in cl_lock_hold_release(), only CLS_CACHED mode lock will be cached,
for locks in other states, they will be cancelled voluntarily;
* fix the problem that cfs_block_sigs() is wrongly used as
cfs_restore_sigs() and implementation of cfs_block_sigs() was wrong
* Unuse method releases the underneath resources even error occurs, so
we should set the lock to be CLS_NEW anyway.
* other minor fixes.
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Iffce8be356723781b8f33ec9bdc2cf73e9e07138
Reviewed-on: http://review.whamcloud.com/2574
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 files changed: